[regression] Boost 1.70.0: iostreams can't detect ZLIB library on iOS
- Dominant language
- C++
- Stars
- 251
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
Xcode version:
> xcodebuild -version
Xcode 9.4.1
Build version 9F2000
`boost.user.jam` content:
> export TOPDIR=`pwd`
> cat $TOPDIR/boost.user.jam
using darwin : iphoneos
: xcrun clang++ -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/develop/ide/xcode/9.4.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk
: /Applications/develop/ide/xcode/9.4.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
: arm iphone
;
using darwin : iphonesimulator
: xcrun clang++ -arch i386 -arch x86_64 -isysroot /Applications/develop/ide/xcode/9.4.1/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk
: /Applications/develop/ide/xcode/9.4.1/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
: x86 iphone
;
Third party:
> ls $TOPDIR/third_party/include/{zlib.h,bzlib.h}
/.../third_party/include/bzlib.h
/.../third_party/include/zlib.h
> lipo -info $TOPDIR/third_party/lib/{libz.a,libbz2.a}
Architectures in the fat file: /.../third_party/lib/libz.a are: i386 armv7 armv7s x86_64 arm64
Architectures in the fat file: /.../third_party/lib/libbz2.a are: i386 armv7 armv7s x86_64 arm64
Download and unpack:
> wget https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.bz2
> tar xf boost_1_70_0.tar.bz2
> cd boost_1_70_0/
Bootstrap and build:
> ./bootstrap.sh --with-libraries=iostreams --prefix=$TOPDIR/_install
> ./b2 \
"-d+2 --debug-configuration" \
toolset=darwin-iphoneos \
target-os=iphone \
architecture=arm \
instruction-set=armv7 \
-a \
link=static \
threading=multi \
variant=release,debug \
define=BOOST_SP_NO_SYNC \
--layout=tagged \
--user-config=$TOPDIR/boost.user.jam \
-s NO_COMPRESSION=0 \
-s NO_ZLIB=0 \
-s NO_BZIP2=0 \
-s ZLIB_INCLUDE=$TOPDIR/third_party/include \
-s ZLIB_LIBPATH=$TOPDIR/third_party/lib \
-s ZLIB_BINARY=z \
-s BZIP2_INCLUDE=$TOPDIR/third_party/include \
-s BZIP2_LIBPATH=$TOPDIR/third_party/lib \
-s BZIP2_BINARY=bz2 \
"cxxflags=-std=c++14 -miphoneos-version-min=9.3"
Output:
Performing configuration checks
...
Building the Boost C++ Libraries.
- zlib : no
- bzip2 : no
...
Component configuration:
...
- iostreams : building
...
In file `bin.v2/config.log`:
"xcrun" "clang++" "-arch" "armv7" "-arch" "armv7s" "-arch" "arm64"
"-isysroot" "/Applications/develop/ide/xcode/9.4.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk"
-L"/.../third_party/lib"
-o "bin.v2/standalone/ac/darwin-iphoneos/release/architecture-arm/instruction-set-armv7/link-static/target-os-iphone/threading-multi/visibility-hidden/z"
"bin.v2/standalone/ac/darwin-iphoneos/release/architecture-arm/instruction-set-armv7/link-static/target-os-iphone/threading-multi/visibility-hidden/main-z.o"
-lrt
-lz
-pthread -fvisibility=hidden -fvisibility-inlines-hidden -Wl,-dead_strip -no_dead_strip_inits_and_terms -arch armv7
Error:
ld: library not found for -lrt
The same configuration worked fine with Boost 1.65.1. Since Boost 1.66.0 it is not working.
Contributor guide
Assessment
This issue has not been assessed yet.