<!-- This issue tracker is only for technical issues related to Bitcoin Core. <!-- Describe the issue -->
I want to build the Mac Wallet (branch: master) on my Debian 9 VM but I get stuck with the dependencies always at the same time. I am running make HOST=x86_64-apple-darwin16 -j2 in the depends folder and that's what I get:
<!--- What behavior did you expect? -->
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
In file included from ./boost/thread/detail/config.hpp:11:
In file included from ./boost/config.hpp:57:
In file included from ./boost/config/platform/macos.hpp:28:
./boost/config/detail/posix_features.hpp:18:15: fatal error: 'unistd.h' file not found
# include <unistd.h>
^
1 error generated.
...failed clang-darwin.compile.c++ bin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/future.o...
clang-darwin.compile.c++ bin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o
"clang++" "-target" "x86_64-apple-darwin16" "-mmacosx-version-min=10.12" "--sysroot" "/root/bitcoin/depends/SDKs/MacOSX10.11.sdk" "-mlinker-version=253.9" "-stdlib=libc++" -x c++ -fvisibility-inlines-hidden -std=c++11 -fvisibility=hidden -I/root/bitcoin/depends/x86_64-apple-darwin16/include -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -Wextra -Wno-long-long -Wno-unused-parameter -Wno-variadic-macros -Wunused-function -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o "bin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"
In file included from libs/thread/src/pthread/thread.cpp:9:
In file included from ./boost/thread/detail/config.hpp:11:
In file included from ./boost/config.hpp:57:
In file included from ./boost/config/platform/macos.hpp:28:
./boost/config/detail/posix_features.hpp:18:15: fatal error: 'unistd.h' file not found
# include <unistd.h>
^
1 error generated.
...failed clang-darwin.compile.c++ bin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o...
...skipped <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a(clean) for lack of <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
...skipped <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
...skipped <p/root/bitcoin/depends/work/build/x86_64-apple-darwin16/boost/1_70_0-7789d044840/stage/lib>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a...
...failed updating 37 targets...
...skipped 24 targets...
...updated 43 targets...
funcs.mk:251: recipe for target '/root/bitcoin/depends/work/build/x86_64-apple-darwin16/boost/1_70_0-7789d044840/./.stamp_built' failed
make: *** [/root/bitcoin/depends/work/build/x86_64-apple-darwin16/boost/1_70_0-7789d044840/./.stamp_built] Error 1
(The MacOSX10.11.sdk.tar.gz is located in depends/SDKs.)
With google I found out that it might be a problem with clang, and while analyzing the make output I found that line:
/root/bitcoin/depends/sources/clang-llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz: OK
This looks not right for me, but I don't know if the issue is because of that.
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
<!-- Any extra information that might be useful in the debugging process. -->