Boost-for-Android icon indicating copy to clipboard operation
Boost-for-Android copied to clipboard

boost_1_56_0 build problem:libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported"

Open CaiCQ opened this issue 10 years ago • 3 comments

common.mkdir bin.v2/libs/context/build common.mkdir bin.v2/libs/context/build/gcc-androidR8e common.mkdir bin.v2/libs/context/build/gcc-androidR8e/release common.mkdir bin.v2/libs/context/build/gcc-androidR8e/release/link-static common.mkdir bin.v2/libs/context/build/gcc-androidR8e/release/link-static/threading-multi gcc.compile.c++ bin.v2/libs/context/build/gcc-androidR8e/release/link-static/threading-multi/unsupported.o libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported" #error "platform not supported" ^

"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/opt/Android/NDK/platforms/android-9/arch-arm/usr/include -Wa,--noexecstack -DANDROID -D__ANDROID__ -DNDEBUG -O2 -lstdc++ -std=c++11 -g -I/opt/Android/NDK/sources/cxx-stl/gnu-libstdc++/4.8/include -I/opt/Android/NDK/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -pthread  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG  -I"." -c -o "bin.v2/libs/context/build/gcc-androidR8e/release/link-static/threading-multi/unsupported.o" "libs/context/src/unsupported.cpp"

...failed gcc.compile.c++ bin.v2/libs/context/build/gcc-androidR8e/release/link-static/threading-multi/unsupported.o... ...skipped <pbin.v2/libs/context/build/gcc-androidR8e/release/link-static/threading-multi>libboost_context-gcc-mt-1_56.a for lack of <pbin.v2/libs/context/build/gcc-androidR8e/release/link-static/threading-multi>unsupported.o... ...failed updating 1 target... ...skipped 1 target... ...updated 9727 targets... ERROR: Failed to build boost for android! Done!

CaiCQ avatar Aug 29 '14 00:08 CaiCQ

Same on boost 1_57_0. Any fixes for this?

Bendr0id avatar Feb 05 '15 10:02 Bendr0id

Removing the option "-q" (Stop at first error) from the bjam call in build-android.sh fixed the build to run over but after compile is finished the error is still there.

Bendr0id avatar Feb 05 '15 10:02 Bendr0id

I finally got it working.

You have to disable context & coroutine.

Add: --without-context
--without-coroutine \

Thats my working bjam call: (tested on boost 1.57 and NDK r9c)

{ ./b2 -q
target-os=android
threading=multi
threadapi=pthread
toolset=$TOOLSET
$cxxflags
link=static
define=BOOST_MATH_DISABLE_FLOAT128
--without-context
--without-coroutine
--without-python
--without-mpi
--without-wave
--without-test
--without-graph
--without-graph_parallel
install 2>&1
|| { dump "ERROR: Failed to build boost for android!" ; exit 1 ; } } | tee -a $PROGDIR/build.log

Bendr0id avatar Feb 05 '15 11:02 Bendr0id