Obtuse error if Xcode components need to be updated #13601

issue Sjors openend this issue on July 5, 2018
  1. Sjors commented at 9:03 pm on July 5, 2018: member

    Today I got flooded with this error while trying to make depends:

     0    "/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"
     1
     2In file included from libs/test/src/unit_test_log.cpp:16:
     3In file included from ./boost/test/impl/unit_test_log.ipp:19:
     4In file included from ./boost/test/unit_test_log.hpp:18:
     5In file included from ./boost/test/tree/observer.hpp:17:
     6In file included from ./boost/test/detail/global_typedef.hpp:15:
     7In file included from ./boost/test/utils/basic_cstring/basic_cstring.hpp:20:
     8In file included from ./boost/test/utils/basic_cstring/basic_cstring_fwd.hpp:19:
     9In file included from ./boost/detail/workaround.hpp:41:
    10In file included from ./boost/config.hpp:57:
    11In file included from ./boost/config/platform/macos.hpp:28:
    12./boost/config/posix_features.hpp:18:15: fatal error: 'unistd.h' file not found
    13#     include <unistd.h>
    14              ^~~~~~~~~~
    151 error generated.
    16...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.

  2. fanquake added the label macOS on Jul 5, 2018
  3. jonasschnelli commented at 8:07 am on July 19, 2018: contributor
    I’m not sure if we should add toolchain specific support to our build system. But however, as a first step, we should mention that in the build-osx doc.
  4. ch4ot1c commented at 4:26 pm on August 20, 2018: contributor

    Gah! Spent a while troubleshooting before I found this thread.

    Following @Sjors’ suggestion, I had already run xcode-select --install - but tried again and was prompted for a new install! I had just updated to High Sierra (10.13.6), so I had to re-run it (to accept ToS, and install). This fixed the build problem; simply make clean, ./autogen.sh, ./configure, make.

  5. fanquake commented at 5:56 am on October 20, 2018: member
    Agree with @jonasschnelli. I don’t think we want to add anything Xcode specific to our build system, like a check for the .app etc. We already suggest running xcode-select install in the build docs. Trying to account for all the ways a users system might not be correct/ready for building after a macOS or Xcode upgrade seems out of scope for us.
  6. fanquake closed this on Nov 2, 2018

  7. Sjors commented at 11:55 am on May 3, 2019: member

    In addition you may need to do this:

    open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

    This error keeps coming back at semi random intervals.

  8. MarcoFalke locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me