OS X Build failed unistd.h: No such file or directory
Closed this issue · 3 comments
chrstnwhlrt commented
The build fails with
"g++" -O3 -finline-functions -Wno-inline -Wall -pedantic -Wextra -Wno-long-long -DBOOST_ALL_NO_LIB=1 -DBOOST_All_STATIC_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"." -c -o "/tmp/ndk-christian/tmp/build-57372/build-boost/armeabi-v7a/gnu-4.9/build/boost/bin.v2/libs/chrono/build/gcc-arm/release/abi-aapcs/binary-format-elf/link-static/target-os-android/threading-multi/thread_clock.o" "libs/chrono/src/thread_clock.cpp"
In file included from ./boost/config.hpp:48:0,
from ./boost/chrono/config.hpp:15,
from ./boost/chrono/detail/inlined/thread_clock.hpp:14,
from libs/chrono/src/thread_clock.cpp:18:
./boost/config/stdlib/libstdcpp3.hpp:78:22: fatal error: unistd.h: No such file or directory
# include <unistd.h>
^
compilation terminated.
...failed updating 3 targets...
ERROR: Couldn't build Boost 1.65.1 armeabi-v7a libraries
XCode works, I did xcode-select --install
but it didn't help..
dec1 commented
I take it you're building with ndk 16 beta?
If not please provide more details
chrstnwhlrt commented
@dec1 Oh yes I am using the android studio 3 beta 6 - which seems to ship with the ndk 16rc1. Reverted the ndk and the build worked just fine.
dec1 commented
Ok.
If you want to build with the new ndk 16 beta you can try the new ndk 16 branch:
https://github.com/dec1/Boost-for-Android/tree/ndk_16