Open jonmcclung opened 6 years ago
FWIW, I think that the "unescaped special character" can be solved by applying the following regex to jam files: <compileflags>(.*)\$\{PlatformOS\}(.*) -> <compileflags>"$1${PlatformOS}$2"
Have you tried the PR 135. With this Version I could compile Boost on macOS.
@Manromen I did try that PR, yes. Ultimately I just ended up using the prebuilt libraries from https://github.com/dec1/Boost-for-Android
For anyone who came here because of the same problem:
The prebuilt libraries I linked to above did not end up working in the long run. I suspect they used a different version of the STL than me, but I can't be sure. What I ultimately did to get it working was create a Ubuntu virtual machine and do everything in there. I still had to perform many of the fixes from #135 as well as the fix I mentioned about "unescaped special character," but was ultimately able to get them working.
For anyone who came here because of the same problem:
The prebuilt libraries I linked to above did not end up working in the long run. I suspect they used a different version of the STL than me, but I can't be sure. What I ultimately did to get it working was create a Ubuntu virtual machine and do everything in there. I still had to perform many of the fixes from #135 as well as the fix I mentioned about "unescaped special character," but was ultimately able to get them working.
I have the same problem, and I open another issue in yesterday.Linker to boost::filesystem error I just ended up using the prebuilt libraries too. I hope that you can search it with google, don't upset about it for 4 hours.
I have a working travis CI that builds this repo (a fork). Maybe this will help you: https://travis-ci.org/Manromen/Boost-for-Android
There are also prebuild libraries at the fork you could give a try: https://github.com/Manromen/Boost-for-Android/releases
I have been struggling with this for a few days now, and I'd really appreciate some help. I am building on macOS 10.12.5 and my target is armv7a android with NDK r17b using clang/llvm, not gcc. I have gotten a number of errors, and it seems like the only way to make one go away is to generate another. My error does seem to be related to this StackOverflow post.
Here are the steps I have followed:
git clone https://github.com/moritz-wundke/Boost-for-Android.git
per #135
./build-android.sh $ANDROID_NDK_ROOT --with-libraries=thread,filesystem,date_time,system,atomic --arch=armeabi-v7a
---------------
Build using NDK
---------------
Building boost for android for armeabi-v7a Adding pathname: /Users/jonmcclung/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin /Users/jonmcclung/Downloads/Boost-for-Android/boost_1_67_0/tools/build/src/user-config.jam:70: Unescaped special character in argument$(AndroidNDKRoot)/toolchains/aarch64-linux-android-4.9/prebuilt/${PlatformOS}-x86_64
/Users/jonmcclung/Downloads/Boost-for-Android/boost_1_67_0/tools/build/src/user-config.jam:107: Unescaped special character in argument $(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/${PlatformOS}-x86_64
/Users/jonmcclung/Downloads/Boost-for-Android/boost_1_67_0/tools/build/src/user-config.jam:149: Unescaped special character in argument $(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/${PlatformOS}-x86_64
/Users/jonmcclung/Downloads/Boost-for-Android/boost_1_67_0/tools/build/src/user-config.jam:191: Unescaped special character in argument $(AndroidNDKRoot)/toolchains/mips64el-linux-android-4.9/prebuilt/${PlatformOS}-x86_64
/Users/jonmcclung/Downloads/Boost-for-Android/boost_1_67_0/tools/build/src/user-config.jam:229: Unescaped special character in argument $(AndroidNDKRoot)/toolchains/mips64el-linux-android-4.9/prebuilt/${PlatformOS}-x86_64
/Users/jonmcclung/Downloads/Boost-for-Android/boost_1_67_0/tools/build/src/user-config.jam:267: Unescaped special character in argument $(AndroidNDKRoot)/toolchains/x86-4.9/prebuilt/${PlatformOS}-x86_64
/Users/jonmcclung/Downloads/Boost-for-Android/boost_1_67_0/tools/build/src/user-config.jam:305: Unescaped special character in argument $(AndroidNDKRoot)/toolchains/x86_64-4.9/prebuilt/${PlatformOS}-x86_64
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: ../build/build/armeabi-v7a/boost/bin.v2/libs/date_time/build/clang-darwin-armeabiv7a/release/link-static/target-os-android/threading-multi/libboost_date_time-clang-darwin-mt-a32-1_67.a the table of contents is empty (no object file members in the library define global symbols)
/Users/jonmcclung/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: boost_atomic-clang-darwin-mt-a32-1_67: no archive symbol table (run ranlib)