You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I have to build Boost-for-Android because it's needed in this project "sh1r0/caffe-android-lib".
My system is OSX 10.10 Yosemite, My Android NDK version is "r10e", after clone this project, I download the "boost_1_55_0.tar.bz2" and put it inside Boost-for-Android folder
cd Boost-for-Android
basically i need to compile part of boost for android-caffe project with this command:
so that it recognize the newest "r10e" NDK version, and in "r10e" NDK, it only contains androideabi-4.8 and androideabi-4.9, there isn't androideabi-4.6 anymore.
Actually there is no "/Users/ABC/Work/Libs/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.6/include" and "/Users/ABC/Work/Libs/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include" folders, that's why it cannot find exception.hpp.
about "build-android.py" file: "$PROGDIR" is "Boost-for-Android" folder, "$BOOST_DIR" is "boost_1_xx_x" folder, by default every time you run "./build-android.py" it will delete the "boost_1_xx_x" folder and "build" folder, then unzip the "boost_1_xx_x.tar.bz2" again, which is a bit annoying when you are debugging the compilation errors, you can comment line 148-151
then when you run "build-android.py", it will only delete build folder.
Also by default "build-android.py" will copy "configs/user-configboost-1_xx_x.jam" to be "boost_1_xx_x/tools/build/v2/user-config.jam" in line 353 after apply patches to boost, and it actually calls "boost_1_xx_x/tools/build/v2/user-config.jam" file's configurations when it complies. If you comment the line 148-151 as i mentioned above, running "build-android.py" will not copy jam file anymore, so you will need to change "boost_1_xx_x/tools/build/v2/user-config.jam" instead of "configs/user-configboost-1_xx_x.jam" when fix the second type of error.
After all i only built few modules (date_time,math,random,thread,system), and i got stucked in the second type of error for almost a whole day, as i found in "Boost-for-Android/boost_1_55_0/boost" folder there is also "exception.hpp" file and a "exception" folder, at first i thought it was trying to include this header file instead of the "exception.hpp" in NDK folder, so i tried to include "Boost-for-Android/boost_1_55_0/boost" many times but still got the same error untill i found there is no ".../gnu-libstdc++/4.6/..." folders inside NDK.
I still got a "link.jam: No such file or directory" thing, but the compilation finished and seems all the libraries i need are built, hope it works fine in run time.
The text was updated successfully, but these errors were encountered:
ZhengRui
changed the title
Share my experience
Share my experience Boost 1.55 on OSX 10.10 Yosemite
Jun 10, 2015
Today I have to build Boost-for-Android because it's needed in this project "sh1r0/caffe-android-lib".
My system is OSX 10.10 Yosemite, My Android NDK version is "r10e", after clone this project, I download the "boost_1_55_0.tar.bz2" and put it inside Boost-for-Android folder
cd Boost-for-Android
basically i need to compile part of boost for android-caffe project with this command:
error:
Undefined or not supported Android NDK version!
fix:
in "build-android.sh" file, after
add
so that it recognize the newest "r10e" NDK version, and in "r10e" NDK, it only contains androideabi-4.8 and androideabi-4.9, there isn't androideabi-4.6 anymore.
error:
In file included from ./boost/date_time/gregorian/greg_month.hpp:12:0, from libs/date_time/src/gregorian/greg_month.cpp:14: ./boost/date_time/constrained_value.hpp:12:21: fatal error: exception: No such file or directory #include <exception> ^ compilation terminated. "arm-linux-androideabi-g++" -ftemplate-depth-128 -D__arm__ -D_REENTRANT -D_GLIBCXX__PTHREADS -O3 -finline-functions -Wno-inline -Wall -fexceptions -frtti -fpic -ffunction-sections -funwind-tables -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -I/Users/ABC/Work/Libs/android-ndk-r10e/platforms/android-9/arch-arm/usr/include -Wa,--noexecstack -DANDROID -D__ANDROID__ -DNDEBUG -O2 -g -I/Users/ABC/Work/Libs/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.6/include -I/Users/ABC/Work/Libs/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -pthread -DBOOST_ALL_NO_LIB=1 -DBOOST_DATE_TIME_STATIC_LINK -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "bin.v2/libs/date_time/build/gcc-androidR8e/release/link-static/target-os-linux/threading-multi/gregorian/greg_month.o" "libs/date_time/src/gregorian/greg_month.cpp" ...failed gcc.compile.c++ bin.v2/libs/date_time/build/gcc-androidR8e/release/link-static/target-os-linux/threading-multi/gregorian/greg_month.o...
fix:
in "configs/user-config-boost-1_55_0.jam", since the "TOOLSET" for "r10e" is "androidR8e" in "build-android.sh" file, so after
i change
to be
Actually there is no "/Users/ABC/Work/Libs/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.6/include" and "/Users/ABC/Work/Libs/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include" folders, that's why it cannot find exception.hpp.
about "build-android.py" file: "$PROGDIR" is "Boost-for-Android" folder, "$BOOST_DIR" is "boost_1_xx_x" folder, by default every time you run "./build-android.py" it will delete the "boost_1_xx_x" folder and "build" folder, then unzip the "boost_1_xx_x.tar.bz2" again, which is a bit annoying when you are debugging the compilation errors, you can comment line 148-151
then when you run "build-android.py", it will only delete build folder.
Also by default "build-android.py" will copy "configs/user-configboost-1_xx_x.jam" to be "boost_1_xx_x/tools/build/v2/user-config.jam" in line 353 after apply patches to boost, and it actually calls "boost_1_xx_x/tools/build/v2/user-config.jam" file's configurations when it complies. If you comment the line 148-151 as i mentioned above, running "build-android.py" will not copy jam file anymore, so you will need to change "boost_1_xx_x/tools/build/v2/user-config.jam" instead of "configs/user-configboost-1_xx_x.jam" when fix the second type of error.
After all i only built few modules (date_time,math,random,thread,system), and i got stucked in the second type of error for almost a whole day, as i found in "Boost-for-Android/boost_1_55_0/boost" folder there is also "exception.hpp" file and a "exception" folder, at first i thought it was trying to include this header file instead of the "exception.hpp" in NDK folder, so i tried to include "Boost-for-Android/boost_1_55_0/boost" many times but still got the same error untill i found there is no ".../gnu-libstdc++/4.6/..." folders inside NDK.
I still got a "link.jam: No such file or directory" thing, but the compilation finished and seems all the libraries i need are built, hope it works fine in run time.
The text was updated successfully, but these errors were encountered: