Boost C++ Libraries: Ticket #13272: boost.serialization compile problem on Android https://svn.boost.org/trac10/ticket/13272 <p> Hello, in attempt to build boost for android with more or less reasonable strict settings (-Werror) I uncovered some bugs which I cannot report on github because these projects have Issues disabled. </p> <pre class="wiki">clang-darwin.compile.c++ android-build/boost/bin.v2/ libs/serialization/build/clang-darwin-5.0~x86/debug/ address-model-32/link-static/target-os-android/threading- multi/polymorphic_iarchive.o In file included from libs/serialization/src/polymorphic_iarchive.cpp:20: In file included from ./boost/archive/polymorphic_iarchive.hpp:32: ./boost/archive/detail/iserializer.hpp:69:7: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined] #if ! DONT_USE_HAS_NEW_OPERATOR ^ ./boost/archive/detail/iserializer.hpp:63:12: note: expanded from macro 'DONT_USE_HAS_NEW_OPERATOR' || defined(__SUNPRO_CC) &amp;&amp; (__SUNPRO_CC &lt; 0x590) \ ^ ./boost/archive/detail/iserializer.hpp:212:9: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined] #if DONT_USE_HAS_NEW_OPERATOR ^ ./boost/archive/detail/iserializer.hpp:63:12: note: expanded from macro 'DONT_USE_HAS_NEW_OPERATOR' || defined(__SUNPRO_CC) &amp;&amp; (__SUNPRO_CC &lt; 0x590) \ ^ 2 errors generated. "/usr/local/opt/android-ndk/android-ndk-r16-beta1// toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-fvisibility=hidden" "-fvisibility-inlines-hidden" "-Wno-unused-local-typedef" -x c++ -ftemplate-depth-255 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++14 -O0 -g -O0 -fno-inline -Wall -g --target=i686-none-linux-android --gcc-toolchain=/usr/local/opt/android-ndk/android-ndk- r16-beta1//toolchains/x86-4.9/prebuilt/darwin-x86_64 --sysroot=/usr/local/opt/android-ndk/android-ndk-r16-beta1//sysroot -isystem /usr/local/opt/android-ndk/android-ndk-r16-beta1// sources/cxx-stl/llvm-libc++/include -isystem /usr/local/opt/android-ndk/ android-ndk-r16-beta1//sources/cxx-stl/llvm-libc++abi/include -isystem /usr/local/opt/android-ndk/android-ndk-r16-beta1//sources/android/support/include -isystem /usr/local/opt/android-ndk/android-ndk-r16-beta1//sysroot/usr/include -isystem /usr/local/opt/android-ndk/android-ndk-r16-beta1// sysroot/usr/include/i686-linux-android -DANDROID -D__ANDROID_API__=21 -ffunction-sections -funwind-tables -fstack-protector-strong -fno-limit-debug-info -fPIC -no-canonical-prefixes -mstackrealign -Wa,--noexecstack -Wformat -Werror=format-security -Wall -Werror -Wshadow -march=i686 -DBOOST_ALL_NO_LIB=1 -D_LITTLE_ENDIAN -I"." -c -o "android-build/boost/bin.v2/libs/serialization/build/ clang-darwin-5.0~x86/debug/address-model-32/link-static/ target-os-android/threading-multi/polymorphic_iarchive.o" "libs/serialization/src/polymorphic_iarchive.cpp" </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13272 Trac 1.4.3 Berkus <berkus@…> Wed, 25 Oct 2017 08:44:38 GMT version changed https://svn.boost.org/trac10/ticket/13272#comment:1 https://svn.boost.org/trac10/ticket/13272#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.63.0</span> → <span class="trac-field-new">Boost 1.65.0</span> </li> </ul> Ticket Berkus <berkus@…> Wed, 25 Oct 2017 09:04:20 GMT <link>https://svn.boost.org/trac10/ticket/13272#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13272#comment:2</guid> <description> <p> This is using <code>clang</code> toolchain on <code>Android NDK r16 beta1</code>. </p> <p> <a class="ext-link" href="https://github.com/twilio/twilio-boost-build/blob/android-ndk-16/boost.sh#L526"><span class="icon">​</span>Reference to user-config.jam for the build</a> </p> </description> <category>Ticket</category> </item> <item> <author>Berkus <berkus@…></author> <pubDate>Wed, 25 Oct 2017 12:58:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13272#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13272#comment:3</guid> <description> <p> Xref <a class="ext-link" href="https://github.com/boostorg/serialization/issues/70"><span class="icon">​</span>https://github.com/boostorg/serialization/issues/70</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>