Re: [Boost-users] [boost] Going insane trying to build boost for android
On Sun, Mar 26, 2017 at 12:04 PM, John Maddock
So outside of what I'm already doing, how do I properly tell boost about C++14? I'm sending down a cxxflag for it in my jam file right now, but that's the only way I've been able to find out how to do it from my Google searching.
Nod. As far as I know that's the only way, two questions:
* If you build something with the -d2 option do you see all the -std= compiler flags you expect to see? * If you do so, can you build and *run* libs/config/test/config_info and report the output?
(Re-included the boost ML) With the -d2 option added, this is what I see: clang-linux.compile.c++.without-pth bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o "C:/android/ndk/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++" -c -x c++ -O3 -Wno-inline -Wall --sysroot=C:/android/ndk/platforms/android-15/arch-arm -IC:/android/ndk/sources/cxx-stl/llvm-libc++abi/include -IC:/android/ndk/sources/cxx-stl/llvm-libc++/include -IC:/android/ndk/sources/android/support/include -std=c++14 -fno-strict-aliasing -D__GLIBC__ -DANDROID -D__ANDROID__ -D_GLIBCXX__PTHREADS -D__arm__ -D_REENTRANT -O2 -DNDEBUG -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_SOURCE -DBOOST_ATOMIC_STATIC_LINK=1 -DNDEBUG -I"." -o "bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o" "libs\atomic\src\lockpool.cpp" 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:15: C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:108:9: error: no member named 'strtold' in the global namespace using ::strtold; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:126:9: error: no member named '_Exit' in the global namespace using ::_Exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:149:9: error: no member named 'at_quick_exit' in the global namespace using ::at_quick_exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:150:9: error: no member named 'quick_exit' in the global namespace using ::quick_exit; ~~^ 4 errors generated. I do see -std=c++14 in there. As for your second question, why would building and running config_info help? I'm cross compiling, so I can't run this on Windows. If you could provide explicit instructions so I properly understand what you want me to do, that would be ideal. Thanks.
If only boost was available as a cmake script... On Sun, 26 Mar 2017 at 19:39, Robert Dailey via Boost-users < boost-users@lists.boost.org> wrote:
On Sun, Mar 26, 2017 at 12:04 PM, John Maddock
wrote: So outside of what I'm already doing, how do I properly tell boost about C++14? I'm sending down a cxxflag for it in my jam file right now, but that's the only way I've been able to find out how to do it from my Google searching.
Nod. As far as I know that's the only way, two questions:
* If you build something with the -d2 option do you see all the -std= compiler flags you expect to see? * If you do so, can you build and *run* libs/config/test/config_info and report the output?
(Re-included the boost ML)
With the -d2 option added, this is what I see:
clang-linux.compile.c++.without-pth
bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o
"C:/android/ndk/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++" -c -x c++ -O3 -Wno-inline -Wall --sysroot=C:/android/ndk/platforms/android-15/arch-arm -IC:/android/ndk/sources/cxx-stl/llvm-libc++abi/include -IC:/android/ndk/sources/cxx-stl/llvm-libc++/include -IC:/android/ndk/sources/android/support/include -std=c++14 -fno-strict-aliasing -D__GLIBC__ -DANDROID -D__ANDROID__ -D_GLIBCXX__PTHREADS -D__arm__ -D_REENTRANT -O2 -DNDEBUG -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_SOURCE -DBOOST_ATOMIC_STATIC_LINK=1 -DNDEBUG -I"." -o
"bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o" "libs\atomic\src\lockpool.cpp"
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:15: C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:108:9: error: no member named 'strtold' in the global namespace using ::strtold; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:126:9: error: no member named '_Exit' in the global namespace using ::_Exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:149:9: error: no member named 'at_quick_exit' in the global namespace using ::at_quick_exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:150:9: error: no member named 'quick_exit' in the global namespace using ::quick_exit; ~~^ 4 errors generated.
I do see -std=c++14 in there.
As for your second question, why would building and running config_info help? I'm cross compiling, so I can't run this on Windows. If you could provide explicit instructions so I properly understand what you want me to do, that would be ideal.
Thanks. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I do see -std=c++14 in there.
As for your second question, why would building and running config_info help? I'm cross compiling, so I can't run this on Windows. If you could provide explicit instructions so I properly understand what you want me to do, that would be ideal.
OK, you are configured correctly. I'd missed that you were cross-compiling, in that situation Boost.Config's build time checks *will always fail* and that's why you're seeing the messages you are. That shouldn't unduly effect the building of the libraries - these checks are mainly used for the tests - but it's an open bug that needs to be fixed. HTH, John. --- This email has been checked for viruses by AVG. http://www.avg.com
On 26/03/2017 21:14, Richard Hodges via Boost-users wrote:
With the -d2 option added, this is what I see:
clang-linux.compile.c++.without-pth bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o
"C:/android/ndk/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++" -c -x c++ -O3 -Wno-inline -Wall --sysroot=C:/android/ndk/platforms/android-15/arch-arm -IC:/android/ndk/sources/cxx-stl/llvm-libc++abi/include -IC:/android/ndk/sources/cxx-stl/llvm-libc++/include -IC:/android/ndk/sources/android/support/include -std=c++14 -fno-strict-aliasing -D__GLIBC__ -DANDROID -D__ANDROID__ -D_GLIBCXX__PTHREADS -D__arm__ -D_REENTRANT -O2 -DNDEBUG -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_SOURCE -DBOOST_ATOMIC_STATIC_LINK=1 -DNDEBUG -I"." -o "bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o" "libs\atomic\src\lockpool.cpp"
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:15: C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:108:9: error: no member named 'strtold' in the global namespace using ::strtold; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:126:9: error: no member named '_Exit' in the global namespace using ::_Exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:149:9: error: no member named 'at_quick_exit' in the global namespace using ::at_quick_exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:150:9: error: no member named 'quick_exit' in the global namespace using ::quick_exit; ~~^ 4 errors generated.
Those errors are all from <cstdlib> and therefore outside our control - suggest you try getting a hello-world app that includes <cstdlib> compiling before tackling Boost? A quick Google didn't help with those errors unfortunately, but they do look like a clang setup or misconfiguration issue. HTH, John. --- This email has been checked for viruses by AVG. http://www.avg.com
On Mon, Mar 27, 2017 at 2:42 AM, John Maddock via Boost-users
On 26/03/2017 21:14, Richard Hodges via Boost-users wrote:
With the -d2 option added, this is what I see:
clang-linux.compile.c++.without-pth
bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o
"C:/android/ndk/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++" -c -x c++ -O3 -Wno-inline -Wall --sysroot=C:/android/ndk/platforms/android-15/arch-arm -IC:/android/ndk/sources/cxx-stl/llvm-libc++abi/include -IC:/android/ndk/sources/cxx-stl/llvm-libc++/include -IC:/android/ndk/sources/android/support/include -std=c++14 -fno-strict-aliasing -D__GLIBC__ -DANDROID -D__ANDROID__ -D_GLIBCXX__PTHREADS -D__arm__ -D_REENTRANT -O2 -DNDEBUG -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_SOURCE -DBOOST_ATOMIC_STATIC_LINK=1 -DNDEBUG -I"." -o
"bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o" "libs\atomic\src\lockpool.cpp"
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:15: C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:108:9: error: no member named 'strtold' in the global namespace using ::strtold; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:126:9: error: no member named '_Exit' in the global namespace using ::_Exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:149:9: error: no member named 'at_quick_exit' in the global namespace using ::at_quick_exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:150:9: error: no member named 'quick_exit' in the global namespace using ::quick_exit; ~~^ 4 errors generated.
Those errors are all from <cstdlib> and therefore outside our control - suggest you try getting a hello-world app that includes <cstdlib> compiling before tackling Boost? A quick Google didn't help with those errors unfortunately, but they do look like a clang setup or misconfiguration issue.
That won't do me any good because I'm already using this toolchain perfectly fine via CMake and ndk-build. bjam isn't working, maybe because I haven't set up the config.jam file properly. I'm not sure at this point. Boost is the only thing not working here. Because of these compiler errors, I'm assuming I'm missing some include paths but I'm not sure what I'm missing. Clang annoyingly doesn't say when includes can't be found, instead it just says it can't find symbols (I find this horrible). Hoping someone with experience using NDK can give me some pointers here. My concern with the cxx tests not working is that it may disable C++14 features of boost when I build it. Isn't that the whole point of testing for those features, so that bjam can programmatically disable them when building? I just want to make sure of that... if that's not what they're for, then I honestly don't see a point in them. Also there used to be CMake support for building boost a few years ago, but I think the project is dead. Would be nice if boost developers used CMake instead of this niche build system. If it was using CMake I'd already be done.
On Mar 26, 2017, at 3:14 PM, Richard Hodges via Boost-users
wrote: If only boost was available as a cmake script…
This script will build boost using cmake's toolchain: https://github.com/pfultz2/cget/blob/master/cget/cmake/boost.cmake It basically translates cmake's settings to a user-config.jam file, and then calls boost build. It hasn’t been tested with cross compiling or android yet, so it may still need some work depending on how you setup your cmake toolchain file. Paul
participants (4)
-
John Maddock
-
Paul Fultz II
-
Richard Hodges
-
Robert Dailey