[Boost-bugs] [Boost C++ Libraries] #12217: boost.iostreams on Android can't find ZLIB

Subject: [Boost-bugs] [Boost C++ Libraries] #12217: boost.iostreams on Android can't find ZLIB
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-20 10:09:21


#12217: boost.iostreams on Android can't find ZLIB
------------------------------+-----------------------
 Reporter: ruslan_baratov@… | Owner: turkanis
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: iostreams
  Version: Boost 1.61.0 | Severity: Problem
 Keywords: |
------------------------------+-----------------------
 boost.iostreams on Android can't find ZLIB if host is Linux. Works fine
 for OSX host.

 Build options:
 {{{
 -a
 link=static
 threading=multi
 variant=debug,release
 --layout=tagged
 toolset=gcc-ndk
 --user-
 config=/home/travis/.hunter/_Base/1e7fc8f/3bce312/7416caa/Build/Boost/__iostreams/Build/boost.user.jam
 --with-iostreams
 -s
 NO_COMPRESSION=0
 -s
 NO_ZLIB=0
 -s
 NO_BZIP2=1
 -s
 ZLIB_INCLUDE=/home/travis/.hunter/_Base/1e7fc8f/3bce312/7416caa/Install/include
 -s
 ZLIB_LIBPATH=/home/travis/.hunter/_Base/1e7fc8f/3bce312/7416caa/Install/lib
 -s
 ZLIB_BINARY=zd
 linkflags= -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections
 -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,nocopyreloc -fPIE -pie
 -j
 2
 }}}

 boost.user.jam content:
 {{{
 using gcc
   : ndk
   : "/home/travis/build/ruslo/hunter_sandbox/_ci/android-ndk-
 r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-
 linux-androideabi-g++" -fexceptions -frtti -Wno-psabi
 --sysroot=/home/travis/build/ruslo/hunter_sandbox/_ci/android-ndk-
 r10e/platforms/android-19/arch-arm -funwind-tables -finline-limit=64
 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp
 -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack
 -std=c++11 -DANDROID -isystem /home/travis/build/ruslo/hunter_sandbox/_ci
 /android-ndk-r10e/platforms/android-19/arch-arm/usr/include -isystem
 /home/travis/build/ruslo/hunter_sandbox/_ci/android-ndk-r10e/sources/cxx-
 stl/gnu-libstdc++/4.9/include -isystem
 /home/travis/build/ruslo/hunter_sandbox/_ci/android-ndk-r10e/sources/cxx-
 stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem
 /home/travis/build/ruslo/hunter_sandbox/_ci/android-ndk-r10e/sources/cxx-
 stl/gnu-libstdc++/4.9/include/backward
   : <archiver> "/home/travis/build/ruslo/hunter_sandbox/_ci/android-ndk-
 r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-
 linux-androideabi-gcc-ar"
 ;
 }}}

 On Linux '-lrt' library added and it breaks ZLIB linking test:
 {{{
 "/.../android-ndk/android-ndk-r10e/toolchains/arm-linux-
 androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++"
 "-fexceptions"
 "-frtti"
 "-Wno-psabi"
 "--sysroot=/.../android-ndk/android-ndk-r10e/platforms/android-19/arch-
 arm"
 "-funwind-tables"
 "-finline-limit=64"
 "-fsigned-char"
 "-no-canonical-prefixes"
 "-march=armv7-a"
 "-mfloat-abi=softfp"
 "-mfpu=neon"
 "-fdata-sections"
 "-ffunction-sections"
 "-Wa,--noexecstack"
 "-std=c++11"
 "-DANDROID"
 "-isystem"
 "/.../android-ndk/android-ndk-r10e/platforms/android-19/arch-
 arm/usr/include"
 "-isystem"
 "/.../android-ndk/android-ndk-r10e/sources/cxx-stl/gnu-
 libstdc++/4.9/include"
 "-isystem"
 "/.../android-ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs
 /armeabi-v7a/include"
 "-isystem"
 "/.../android-ndk/android-ndk-r10e/sources/cxx-stl/gnu-
 libstdc++/4.9/include/backward"
 -L"/.../hunter/_Base/xxxxxxx/3bce312/7416caa/Install/lib"
 -Wl,-R
 -Wl,"/.../hunter/_Base/xxxxxxx/3bce312/7416caa/Install/lib"
 -Wl,-rpath-link
 -Wl,"/.../hunter/_Base/xxxxxxx/3bce312/7416caa/Install/lib"
 -o
 "bin.v2/standalone/ac/gcc-ndk/debug/link-static/threading-multi/zd"
 -Wl,--start-group
 "bin.v2/standalone/ac/gcc-ndk/debug/link-static/threading-multi/main.o"
 -Wl,-Bstatic
 -lzd
 -Wl,-Bdynamic
 -lrt <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 -Wl,--end-group
 -g
 -pthread
 -Wl,--fix-cortex-a8
 -Wl,--no-undefined
 -Wl,--gc-sections
 -Wl,-z,noexecstack
 -Wl,-z,relro
 -Wl,-z,now
 -Wl,-z,nocopyreloc
 -fPIE
 -pie

 /.../android-ndk/android-ndk-r10e/toolchains/arm-linux-
 androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-
 androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot
 find -lrt
 }}}

 There is no '-lrt' on OSX and same configuration works fine:
 {{{
 "/.../android-ndk/android-ndk-r10e/toolchains/arm-linux-
 androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++"
 "-fexceptions"
 "-frtti"
 "-Wno-psabi"
 "--sysroot=/.../android-ndk/android-ndk-r10e/platforms/android-19/arch-
 arm"
 "-funwind-tables"
 "-finline-limit=64"
 "-fsigned-char"
 "-no-canonical-prefixes"
 "-march=armv7-a"
 "-mfloat-abi=softfp"
 "-mfpu=neon"
 "-fdata-sections"
 "-ffunction-sections"
 "-Wa,--noexecstack"
 "-std=c++11"
 "-DANDROID"
 "-isystem"
 "/.../android-ndk/android-ndk-r10e/platforms/android-19/arch-
 arm/usr/include"
 "-isystem"
 "/.../android-ndk/android-ndk-r10e/sources/cxx-stl/gnu-
 libstdc++/4.9/include"
 "-isystem"
 "/.../android-ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs
 /armeabi-v7a/include"
 "-isystem"
 "/.../android-ndk/android-ndk-r10e/sources/cxx-stl/gnu-
 libstdc++/4.9/include/backward"
 -L"/.../hunter/_Base/xxxxxxx/3bce312/7416caa/Install/lib"
 -Wl,-R
 -Wl,"/.../hunter/_Base/xxxxxxx/3bce312/7416caa/Install/lib"
 -Wl,-rpath-link
 -Wl,"/.../hunter/_Base/xxxxxxx/3bce312/7416caa/Install/lib"
 -o
 "bin.v2/standalone/ac/gcc-ndk/debug/link-static/threading-multi/zd"
 -Wl,--start-group
 "bin.v2/standalone/ac/gcc-ndk/debug/link-static/threading-multi/main.o"
 -Wl,-Bstatic
 -lzd
 -Wl,-Bdynamic
 -Wl,--end-group
 -g
 -Wl,--fix-cortex-a8
 -Wl,--no-undefined
 -Wl,--gc-sections
 -Wl,-z,noexecstack
 -Wl,-z,relro
 -Wl,-z,now
 -Wl,-z,nocopyreloc
 -fPIE
 -pie
 }}}

 There should be no difference because same Android toolchain used on both
 hosts. OS of host should not affect Android build.

 * Linux log: https://s3.amazonaws.com/archive.travis-
 ci.org/jobs/131643137/log.txt
 * OSX log: https://s3.amazonaws.com/archive.travis-
 ci.org/jobs/131643139/log.txt

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12217>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC