-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Labels
Description
Today I got flooded with this error while trying to make depends:
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-mmacosx-version-min=10.8" "-stdlib=libc++" -ftemplate-depth-128 -std=c++11 -fvisibility=hidden -I/Users/bitcoin/dev/bitcoin/depends/x86_64-apple-darwin17.6.0/include -O3 -Wall -pedantic -gdwarf-2 -fexceptions -Wno-long-long -Wno-inline -arch x86_64 -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_TIMER_STATIC_LINK=1 -DNDEBUG -I"." -c -o "bin.v2/libs/test/build/darwin-4.2.1/release/link-static/threading-multi/unit_test_log.o" "libs/test/src/unit_test_log.cpp"
In file included from libs/test/src/unit_test_log.cpp:16:
In file included from ./boost/test/impl/unit_test_log.ipp:19:
In file included from ./boost/test/unit_test_log.hpp:18:
In file included from ./boost/test/tree/observer.hpp:17:
In file included from ./boost/test/detail/global_typedef.hpp:15:
In file included from ./boost/test/utils/basic_cstring/basic_cstring.hpp:20:
In file included from ./boost/test/utils/basic_cstring/basic_cstring_fwd.hpp:19:
In file included from ./boost/detail/workaround.hpp:41:
In file included from ./boost/config.hpp:57:
In file included from ./boost/config/platform/macos.hpp:28:
./boost/config/posix_features.hpp:18:15: fatal error: 'unistd.h' file not found
# include <unistd.h>
^~~~~~~~~~
1 error generated.
...failed darwin.compile.c++ bin.v2/libs/test/build/darwin-4.2.1/release/link-static/threading-multi/unit_test_log.o...
A simple Google search reveals others seeing this and pointing out they need to do xcode-select --install
. To add a bit more confusion, this appears to be different from opening Xcode and letting it update command line tools.
For cross compilation the absence of the SDK has also confused people in the past with the same error, e.g. #10926
I wonder if we can detect if Xcode is missing and or xcode-select --install
is in need of being run, for the first time or again because Xcode was updated.
regulatre