Project

General

Profile

Actions

Bug #3795

closed

Build fails on macOS 10.12 with Xcode 8.0 (debug mode)

Added by Davide Pesavento about 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Build
Target version:
Start date:
10/03/2016
Due date:
% Done:

100%

Estimated time:
Tags:

Description

[ 32/305] Compiling tests/unit-tests/util/time-unit-test-clock.t.cpp
[ 33/305] Compiling tests/unit-tests/util/string-helper.t.cpp
[ 35/305] Compiling tests/unit-tests/util/segment-fetcher.t.cpp
[ 36/305] Compiling tests/unit-tests/util/notification-subscriber.t.cpp
[176/305] Compiling tests/unit-tests/util/notification-stream.t.cpp
In file included from ../tests/unit-tests/util/time-unit-test-clock.t.cpp:23:
In file included from /Users/davide/Documents/ndn-cxx/src/util/scheduler.hpp:26:
In file included from /Users/davide/Documents/ndn-cxx/src/util/monotonic_deadline_timer.hpp:31:
In file included from /usr/local/include/boost/asio/basic_deadline_timer.hpp:24:
In file included from /usr/local/include/boost/asio/basic_io_object.hpp:19:
In file included from /usr/local/include/boost/asio/io_service.hpp:767:
In file included from /usr/local/include/boost/asio/impl/io_service.hpp:71:
In file included from /usr/local/include/boost/asio/detail/task_io_service.hpp:196:
In file included from /usr/local/include/boost/asio/detail/impl/task_io_service.hpp:19:
In file included from /usr/local/include/boost/asio/detail/completion_handler.hpp:20:
In file included from /usr/local/include/boost/asio/detail/fenced_block.hpp:24:
/usr/local/include/boost/asio/detail/macos_fenced_block.hpp:45:5: error: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Werror,-Wdeprecated-declarations]
    OSMemoryBarrier();
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
In file included from ../tests/unit-tests/util/time-unit-test-clock.t.cpp:23:
In file included from /Users/davide/Documents/ndn-cxx/src/util/scheduler.hpp:26:
In file included from /Users/davide/Documents/ndn-cxx/src/util/monotonic_deadline_timer.hpp:31:
In file included from /usr/local/include/boost/asio/basic_deadline_timer.hpp:24:
In file included from /usr/local/include/boost/asio/basic_io_object.hpp:19:
In file included from /usr/local/include/boost/asio/io_service.hpp:767:
In file included from /usr/local/include/boost/asio/impl/io_service.hpp:71:
In file included from /usr/local/include/boost/asio/detail/task_io_service.hpp:196:
In file included from /usr/local/include/boost/asio/detail/impl/task_io_service.hpp:19:
In file included from /usr/local/include/boost/asio/detail/completion_handler.hpp:20:
In file included from /usr/local/include/boost/asio/detail/fenced_block.hpp:24:
/usr/local/include/boost/asio/detail/macos_fenced_block.hpp:51:5: error: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Werror,-Wdeprecated-declarations]
    OSMemoryBarrier();
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
2 errors generated.

In file included from ../tests/unit-tests/util/notification-subscriber.t.cpp:28:
In file included from /Users/davide/Documents/ndn-cxx/src/util/notification-subscriber.hpp:56:
In file included from /Users/davide/Documents/ndn-cxx/src/util/scheduler.hpp:26:
In file included from /Users/davide/Documents/ndn-cxx/src/util/monotonic_deadline_timer.hpp:31:
In file included from /usr/local/include/boost/asio/basic_deadline_timer.hpp:24:
In file included from /usr/local/include/boost/asio/basic_io_object.hpp:19:
In file included from /usr/local/include/boost/asio/io_service.hpp:767:
In file included from /usr/local/include/boost/asio/impl/io_service.hpp:71:
In file included from /usr/local/include/boost/asio/detail/task_io_service.hpp:196:
In file included from /usr/local/include/boost/asio/detail/impl/task_io_service.hpp:19:
In file included from /usr/local/include/boost/asio/detail/completion_handler.hpp:20:
In file included from /usr/local/include/boost/asio/detail/fenced_block.hpp:24:
/usr/local/include/boost/asio/detail/macos_fenced_block.hpp:45:5: error: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Werror,-Wdeprecated-declarations]
    OSMemoryBarrier();
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
In file included from ../tests/unit-tests/util/notification-subscriber.t.cpp:28:
In file included from /Users/davide/Documents/ndn-cxx/src/util/notification-subscriber.hpp:56:
In file included from /Users/davide/Documents/ndn-cxx/src/util/scheduler.hpp:26:
In file included from /Users/davide/Documents/ndn-cxx/src/util/monotonic_deadline_timer.hpp:31:
In file included from /usr/local/include/boost/asio/basic_deadline_timer.hpp:24:
In file included from /usr/local/include/boost/asio/basic_io_object.hpp:19:
In file included from /usr/local/include/boost/asio/io_service.hpp:767:
In file included from /usr/local/include/boost/asio/impl/io_service.hpp:71:
In file included from /usr/local/include/boost/asio/detail/task_io_service.hpp:196:
In file included from /usr/local/include/boost/asio/detail/impl/task_io_service.hpp:19:
In file included from /usr/local/include/boost/asio/detail/completion_handler.hpp:20:
In file included from /usr/local/include/boost/asio/detail/fenced_block.hpp:24:
/usr/local/include/boost/asio/detail/macos_fenced_block.hpp:51:5: error: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Werror,-Wdeprecated-declarations]
    OSMemoryBarrier();
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
2 errors generated.

In file included from ../tests/unit-tests/util/notification-stream.t.cpp:33:
In file included from ../tests/unit-tests/util/../identity-management-time-fixture.hpp:28:
In file included from ../tests/unit-tests/util/../unit-test-time-fixture.hpp:27:
In file included from /usr/local/include/boost/asio/io_service.hpp:767:
In file included from /usr/local/include/boost/asio/impl/io_service.hpp:71:
In file included from /usr/local/include/boost/asio/detail/task_io_service.hpp:196:
In file included from /usr/local/include/boost/asio/detail/impl/task_io_service.hpp:19:
In file included from /usr/local/include/boost/asio/detail/completion_handler.hpp:20:
In file included from /usr/local/include/boost/asio/detail/fenced_block.hpp:24:
/usr/local/include/boost/asio/detail/macos_fenced_block.hpp:45:5: error: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Werror,-Wdeprecated-declarations]
    OSMemoryBarrier();
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
In file included from ../tests/unit-tests/util/notification-stream.t.cpp:33:
In file included from ../tests/unit-tests/util/../identity-management-time-fixture.hpp:28:
In file included from ../tests/unit-tests/util/../unit-test-time-fixture.hpp:27:
In file included from /usr/local/include/boost/asio/io_service.hpp:767:
In file included from /usr/local/include/boost/asio/impl/io_service.hpp:71:
In file included from /usr/local/include/boost/asio/detail/task_io_service.hpp:196:
In file included from /usr/local/include/boost/asio/detail/impl/task_io_service.hpp:19:
In file included from /usr/local/include/boost/asio/detail/completion_handler.hpp:20:
In file included from /usr/local/include/boost/asio/detail/fenced_block.hpp:24:
/usr/local/include/boost/asio/detail/macos_fenced_block.hpp:51:5: error: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Werror,-Wdeprecated-declarations]
    OSMemoryBarrier();
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
2 errors generated.

In file included from ../tests/unit-tests/util/segment-fetcher.t.cpp:22:
In file included from /Users/davide/Documents/ndn-cxx/src/util/segment-fetcher.hpp:25:
In file included from /Users/davide/Documents/ndn-cxx/src/util/scheduler.hpp:26:
In file included from /Users/davide/Documents/ndn-cxx/src/util/monotonic_deadline_timer.hpp:31:
In file included from /usr/local/include/boost/asio/basic_deadline_timer.hpp:24:
In file included from /usr/local/include/boost/asio/basic_io_object.hpp:19:
In file included from /usr/local/include/boost/asio/io_service.hpp:767:
In file included from /usr/local/include/boost/asio/impl/io_service.hpp:71:
In file included from /usr/local/include/boost/asio/detail/task_io_service.hpp:196:
In file included from /usr/local/include/boost/asio/detail/impl/task_io_service.hpp:19:
In file included from /usr/local/include/boost/asio/detail/completion_handler.hpp:20:
In file included from /usr/local/include/boost/asio/detail/fenced_block.hpp:24:
/usr/local/include/boost/asio/detail/macos_fenced_block.hpp:45:5: error: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Werror,-Wdeprecated-declarations]
    OSMemoryBarrier();
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
In file included from ../tests/unit-tests/util/segment-fetcher.t.cpp:22:
In file included from /Users/davide/Documents/ndn-cxx/src/util/segment-fetcher.hpp:25:
In file included from /Users/davide/Documents/ndn-cxx/src/util/scheduler.hpp:26:
In file included from /Users/davide/Documents/ndn-cxx/src/util/monotonic_deadline_timer.hpp:31:
In file included from /usr/local/include/boost/asio/basic_deadline_timer.hpp:24:
In file included from /usr/local/include/boost/asio/basic_io_object.hpp:19:
In file included from /usr/local/include/boost/asio/io_service.hpp:767:
In file included from /usr/local/include/boost/asio/impl/io_service.hpp:71:
In file included from /usr/local/include/boost/asio/detail/task_io_service.hpp:196:
In file included from /usr/local/include/boost/asio/detail/impl/task_io_service.hpp:19:
In file included from /usr/local/include/boost/asio/detail/completion_handler.hpp:20:
In file included from /usr/local/include/boost/asio/detail/fenced_block.hpp:24:
/usr/local/include/boost/asio/detail/macos_fenced_block.hpp:51:5: error: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Werror,-Wdeprecated-declarations]
    OSMemoryBarrier();
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
2 errors generated.

Related issues 1 (0 open1 closed)

Blocked by NFD - Feature #3791: Jenkins: macOS 10.12ClosedEric Newberry

Actions
Actions #1

Updated by Davide Pesavento about 8 years ago

  • Subject changed from Build fails on macOS 10.12 with Xcode 8.0 to Build fails on macOS 10.12 with Xcode 8.0 (debug mode)
Actions #2

Updated by Alex Afanasyev about 8 years ago

  • Status changed from New to Code review
  • Target version set to v0.6
  • % Done changed from 0 to 100
Actions #3

Updated by Alex Afanasyev about 8 years ago

from Davide:

https://gerrit.named-data.net/#/c/3263/3
I'd rather suppress the specific warning(s) by wrapping the affected headers with #pragma [GCC|clang] system_header, or by including boost headers with -isystem instead of -I

On the other hand, I'd agree that we shouldn't fail the build because we're using deprecated stuff (this applies also to NFD using deprecated ndn-cxx stuff). So if you want to go down this path then make the -Wno-error= suppression apply to every platform/compiler. Note that we should still consider implementing what I said above, to avoid spamming the build output with useless warnings.

The boost warnings right now are useless, but I'm not too happy having special handling to various includes. My preferred solution is to avoid failing when using deprecated code and just visualize the warnings.

Actions #4

Updated by Davide Pesavento about 8 years ago

Then add -Wno-error=deprecated-declarations to all platforms/compilers configurations, not just macOS. As I said, that's fine with me.

Actions #5

Updated by Alex Afanasyev about 8 years ago

Actions #6

Updated by Alex Afanasyev about 8 years ago

Just discovered interesting behavior. On a clean macOS 10.12 with just Command-Line tools installed, the deprecation warning does not appear at all. My guess is because OSAtomicDeprecated.h header is taken directly from /usr/include/libkern/OSAtomicDeprecated.h and not from XCode paths.

I am not planning to install XCode on slave nodes, but will proceed with the changes submitted to gerrit that disable debug compilation failure when using deprecated headers.

Actions #7

Updated by Davide Pesavento about 8 years ago

  • Status changed from Code review to Closed
  • Assignee set to Alex Afanasyev

All patches are in.

Actions #8

Updated by Junxiao Shi over 7 years ago

  • Status changed from Closed to Resolved
  • Assignee changed from Alex Afanasyev to Junxiao Shi

Deprecation of crypto::computeSha256Digest() causes repo-ng builds to fail because the build script is still erroring deprecations.
https://gerrit.named-data.net/4057 copies NFD's default-compiler-flags.py to repo-ng.

Actions #9

Updated by Junxiao Shi over 7 years ago

  • Status changed from Resolved to Closed
Actions #10

Updated by Davide Pesavento over 4 years ago

  • Tags set to macOS
Actions

Also available in: Atom PDF