On Wed, Mar 29, 2017 at 2:16 PM, John Maddock
I'm still not able to build boost though. I did try switching to API 21 but I get a different set of errors:
In file included from libs\atomic\src\lockpool.cpp:16: In file included from .\boost/config.hpp:57: In file included from .\boost/config/platform/linux.hpp:74: In file included from .\boost/config/posix_features.hpp:18: In file included from C:/android/ndk/platforms/android-21/arch-arm/usr/include\unistd.h:34: In file included from C:/android/ndk/platforms/android-21/arch-arm/usr/include\sys/select.h:35: C:/android/ndk/platforms/android-21/arch-arm/usr/include\signal.h:86:18: error: expected ';' at end of declaration list sighandler_t sa_handler; ^
C:/android/ndk/platforms/android-21/arch-arm/usr/include\asm/signal.h:101:22: note: expanded from macro 'sa_handler' #define sa_handler _u._sa_handler ^
OK, so you suckered me into this.... just installed Android NDK and it's a quoting problem, but what the issue is I'm not sure. For example b2 invokes the compiler inside quotes like this:
"clang++" <options> file.cpp
Which produces:
'M:\data\boost\boost\\clang38++.exe' is not recognized as an internal or external command, operable program or batch file.
So then you go into clang++cmd and maybe edit it so the %~dp0\ prefix is removed from the clang38 invocation (that's what I did anyway). Now you get:
.\boost/config/stdlib/libstdcpp3.hpp:78:12: fatal error: 'unistd.h' file not found # include
Even though if you search the toolset it clearly does have several copies of unistd.h there.
And I'm wondering if you tried to fix that by editing the .cmd file and it's further messed up clang's include paths?
Note that at any time, invoking clang via:
clang++ <options> file.cpp
Will work just fine.
So in effect Boost.Build has been broken by trying to do the right thing and always quote the compiler invocation (and I'm pretty sure not quoting would break a bunch of other toolsets).
So... which libraries do you require.... since most of them are "just a bunch of source files" the easiest solution would be to build what you need manually with something like:
clang++ -c -I. -O3 -shared libs/boost-library-you-want/src/*.cpp mylibraryname.so
which worked for me with a cursory test on Boost.System and Regex
Hopefully someone can suggest a better long term fix, John.
+boost again Yeah, you are running into the exact same set of issues I am. First I ran into the %~dp0 issue, removed that, then the next thing is it can't find any files. I started using the boost cmake build process here: https://github.com/Orphis/boost-cmake This works perfectly once I specify a toolchain file to CMake for the android NDK. Note that this solution means boost builds with the rest of my targets, which isn't ideal, but at least boost builds properly... I really hate bjam/b2 with a passion. For as great as boost is as a library, it's completely out of left field that they deal with this garbage build system.