GithubHelp home page GithubHelp logo

faithfracture / apple-boost-buildscript Goto Github PK

View Code? Open in Web Editor NEW
278.0 13.0 109.0 182 KB

Script for building Boost for Apple platforms (iOS, iOS Simulator, tvOS, tvOS Simulator, OS X)

Shell 93.16% Objective-C 5.36% Objective-C++ 1.48%
boost ios ios-simulator tvos tvos-simulator macos build-script apple-platforms

apple-boost-buildscript's Introduction

Apple-Boost-BuildScript

Script for building Boost for Apple platforms (iOS, iOS Simulator, tvOS, tvOS Simulator, macOS)

This is a new location for my previous GIST: https://gist.github.com/faithfracture/c629ae4c7168216a9856

Builds a Boost framework for iOS, iOS Simulator, tvOS, tvOS Simulator, and macOS (including Apple Silicon). Creates a set of universal libraries that can be used on iOS/tvOS/macOS and in the iOS/tvOS simulators. Then creates a pseudo-framework to make using boost in Xcode less painful.

To configure the script, define:

   BOOST_VERSION:     Which version of Boost to build (e.g. 1.70.0)
   BOOST_LIBS:        Which Boost libraries to build
   IOS_SDK_VERSION:   iOS SDK version (e.g. 12.0)
   MIN_IOS_VERSION:   Minimum iOS Target Version (e.g. 11.0)
   TVOS_SDK_VERSION:  tvOS SDK version (e.g. 12.0)
   MIN_TVOS_VERSION:  Minimum tvOS Target Version (e.g. 11.0)
   MACOS_SDK_VERSION:  macOS SDK version (e.g. 10.14)
   MIN_MACOS_VERSION:  Minimum macOS Target Version (e.g. 10.12)
   MACOS_SILICON_SDK_VERSION: macOS SDK version for Apple Silicon (e.g. 11.0)
   MIN_MACOS_SILICON_VERSION: Minimum macOS Target Version for Apple Silicon (e.g. 11.0)

If a boost tarball (a file named β€œboost_$BOOST_VERSION2.tar.bz2”) does not exist in the current directory, this script will attempt to download the version specified. You may also manually place a matching tarball in the current directory and the script will use that.

usage: ./boost.sh [{-ios,-tvos,-macos} ...] options

Run ./boost.sh -h for descriptions of all options.

apple-boost-buildscript's People

Contributors

blloyd75 avatar cbasile avatar chaoren-fly avatar deadpikle avatar faithfracture avatar gtbx avatar guillaumealgis avatar mathplayer avatar mbendiksen avatar mobileben avatar netromdk avatar paynerc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apple-boost-buildscript's Issues

SDK cannot be located

Clean installed Catalina, Xcode and I got error when I wanted to build boost library with command:

./boost.sh -ios -macos --ios-archs "armv7 armv7s arm64 arm64e" --min-ios-version 10.3 --universal

xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'iphoneos'
xcrun: error: SDK "appletvos" cannot be located
xcrun: error: SDK "appletvos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'appletvos'
xcrun: error: SDK "appletvos" cannot be located
xcrun: error: SDK "appletvos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'appletvos'
xcrun: error: SDK "appletvsimulator" cannot be located
xcrun: error: SDK "appletvsimulator" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'appletvsimulator'

Then I found an issue where command:
xcode-select -print-path
returns:
/Library/Developer/CommandLineTools
instead of:
/Applications/Xcode.app/Contents/Developer

Changed root folder with command:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

After that everything is fine.

Boost Test does not build for tvOS

/boost/test/impl/execution_monitor.ipp makes a call to signaltstack, which is not available in the tvOS SDK. Right now, I'm just stripping the test library from the $BOOST_LIBS variable if bootstrapping for tvOS, which just means you can't use the boost test framework for tvOS. Ideally, there should be a patch for boost or add a patch to this script to fix that.

Undefined symbols for architecture arm64

Hello,

I got a problem like this,

Undefined symbols for architecture arm64:
"typeinfo for boost::archive::detail::basic_pointer_oserializer", referenced from:

and I used serialization libraries with LLVM 8.0 - c++, any solutions for this?

Thank you.

Boost 1.63 fails with Xcode 9 for iOS

./boost.sh --boost-version 1.63.0 --boost-libs "system date_time thread chrono atomic random filesystem regex" -ios
BUILD_IOS: YES
BUILD_TVOS: NO
BUILD_MACOS: NO
BOOST_VERSION: 1.63.0
IOS_SDK_VERSION: 11.2
MIN_IOS_VERSION: 10.0
TVOS_SDK_VERSION: 11.2
MIN_TVOS_VERSION: 10.0
MACOS_SDK_VERSION: 10.13
MIN_MACOS_VERSION: 10.10
MACOS_ARCHS: x86_64 (1)
BOOST_LIBS: system date_time thread chrono atomic random filesystem regex
BOOST_SRC: /Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0
IOS_BUILD_DIR: /Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/build/boost/1.63.0/ios/build
MACOS_BUILD_DIR: /Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/build/boost/1.63.0/macos/build
IOS_FRAMEWORK_DIR: /Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/build/boost/1.63.0/ios/framework
MACOS_FRAMEWORK_DIR: /Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/build/boost/1.63.0/macos/framework
XCODE_ROOT: /Applications/Xcode.app/Contents/Developer
THREADS: -j8

...

Invent missing headers
cp: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/usr/include/crt_externs.h: No such file or directory

...

Error staging iPhone. Check log.

ios-build.log
/Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0/tools/build/src/build/feature.jam:494: in validate-value-string from module feature
error: "iphone-11.2" is not a known value of feature
error: legal values:
/Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0/tools/build/src/build/feature.jam:364: in expand-subfeatures-aux from module feature
/Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0/tools/build/src/build/feature.jam:425: in feature.expand-subfeatures from module feature
/Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0/tools/build/src/build/build-request.jam:20: in apply-to-property-set from module build-request
(builtin):-1: in sequence.transform from module sequence
/Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0/tools/build/src/build/build-request.jam:32: in build-request.expand-no-defaults from module build-request
/Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0/tools/build/src/build-system.jam:692: in load from module build-system
/Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0/tools/build/src/kernel/modules.jam:295: in import from module modules
/Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
/Users/ki/ws-xm/xmios/common-libs/cpprestsdk/Build_iOS/boostoniphone/src/boost_1_63_0/boost-build.jam:17: in module scope from module

Building fails if Xcode is renamed with space in the name

Sometimes I'll rename Xcode.app to Xcode 9.4.app. If I do this, the script fails to build, presumably because of spaces in the path. Renaming it back to Xcode.app and resetting everything fixes it. Is it possible to support spaces in XCODE_PATH?

It would be good to have a fat library for iOS

Currently you have "universal" binaries for ARM or Intel. And of course slices. But no universal at which contains both ARM and Intel. This is helpful to have.

Note I am working on a pull request for this.

Universal binaries with more than one arch for macOS fail on creating xcframework

As reported in #49:

If you try to build a .xcframework file with i386 and x86_64, it will fail with a similar error to the following:

Both macos-i386 and macos-x86_64 represent two equivalent library definitions.

I did a lot of digging, and it turns out the one other case I can find of this is in Firebase by Google. See comments at https://github.com/firebase/firebase-ios-sdk/blob/master/ZipBuilder/Sources/ZipBuilder/FrameworkBuilder.swift#L757

The gist: some binaries need to be lipo'd together before sticking them in the xcframework, especially noticed with macOS. We need to lipo all the macOS (including silicon!) libboost.a files together before putting them in the xcframework file.

This actually makes a lot of sense -- this way, you can distribute one raw binary to all your macOS users, and this has "backwards compatibility" to old versions of macOS because of the lipo -- the end executable you distribute has the lipo'd version, not 2 different libs (one for x64 and one for arm64, for example).

build but use error

when I build this project, and use arm64, libboost.a, then "Undefined symbols for architecture arm64", it is very strange, I use the others's boost, it is ok, why?
how to use the libboost.a?

Build for iOS does not produce framework

Hi, thanks for the useful script!

I've tried run this command but it doesn't produce boost.framework file:
./boost.sh -ios --boost-version 1.70.0 --boost-libs "date_time regex system thread" --min-ios-version 11.0

Running the build for macOS can produce the framework fine:
./boost.sh -macos --boost-version 1.70.0 --boost-libs "date_time regex system thread" --min-macos-version 10.11 --macos-archs "i386 x86_64"

Not sure if I need to do something else. My Xcode is 10.2.1, my system is Mac 10.14.5.

Thanks :)

Several fatal errors building

Hello,

When building using:

./boost.sh -ios --boost-libs all --no-framework

There is a slew of fatal errors. After this, there are of course other issues in the unpack, etc since files are missing. Not sure if the issue here is using the "all". Also curious (side question), does this build the multi-threaded (mt) versions?

BTW, I'm using Xcode 8.3.2 (8E2002) and the command line tools that come with that.

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_context.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_context.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_context.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_context.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_coroutine.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_coroutine.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_coroutine.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_coroutine.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_coroutine2.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_coroutine2.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_coroutine2.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_coroutine2.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_fiber.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_fiber.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_fiber.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_fiber.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_graph_parallel.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_graph_parallel.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_graph_parallel.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_graph_parallel.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_locale.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_locale.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_locale.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_locale.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_math.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_math.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_math.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_math.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_metaparse.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_metaparse.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_metaparse.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_metaparse.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_mpi.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_mpi.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_mpi.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_mpi.a (No such file or directory)

Collaborator(s)

Would anyone like to be added as a collaborator to this project? We don't currently support Apple Silicon directly at my shop and I don't have access to an Apple Silicon Mac, so I don't have any way to test / validate PRs regarding that architecture. We've also moved to using Conan for our C++ dependencies at my shop and there's a fair amount of maintenance for Apple (and Android) platforms that I have to do there as well. I'm finding I'm just not having time to keep up with verifying PRs for this like I should be.

XCFramework missing boost/asio/ssl.hpp

I've tried a few different versions of Boost (1.76.0, 1.79.0 and 1.80.0 for example) and the final XCFramework seems to have excluded boost/asio/ssl.hpp. boost/asio is there, and there's other stuff in there. Am I missing a library or other setting? I'm trying to update the boost library and need openssl support in the new xcframework.

Boost build is ignoring macosx-version-min

As of boost 1.61.0, setting the min macOS version is totally ignored. I even tried forcing it to use an older version of the macOS SDK instead of using the current and setting a min version and it's completely ignoring that and using whatever the most current (default) macOS SDK is.

I read some things saying that it's a boost build bug & I need to update some jam file. I'll get around to that eventually (like, probably when it becomes an error rather than a warning...)

Add command line option for macos architecture

Some projects still require boost for macos to have fat binaries with both i386 and x86_64. This can be easily accomplished by modifying the MACOS_ARCHS variable in boost.sh, however it would be cleaner for users to have a command line option to set this.

Add in support for building with hidden visibility

There can be times when hidden visibility needs to be enabled. I've run across this situation where you can end up with linker warnings such as

global weak symbol 'typeinfo for boost::system::error_category::std_category' from file 'boost/lib/libboost_system.a(error_code.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

Note I already create a branch in my fork and will create a PR for this once I've run run my build a bit more.

The addition is straight-forward. The main portion is

        --hidden-visibility)
            CXX_FLAGS="$CXX_FLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
            ;;

Updates for armv7s support and locale support from iOS and iPhoneSimulator SDKs

I didn't want to go to the hassle of making a fork and make a pull request, so here is a simple patch that adds support for the armv7s architecture also as well as adds the appropriate flags to get locale support using the XCode toolchain for iconv.

I only tested it on iOS (not tvOS or others), but the associated changes may be similar.

Finally, I had to follow the recommendation from the blog https://github.com/faithfracture/Apple-Boost-BuildScript and modify the darwin.jam file to change "-arch arm" to "-arch armv7". I am not quite sure why I had to do that to get everything to compile.
armv7s_and_locale_support.diff.zip

Getting error: "have the same architectures (arm64) and can't be in the same fat output file"

For some reason build fails with this error:
iphoneos/arm64/libboost_system.a and iphonesimulator/arm64/libboost_system.a have the same architectures (arm64) and can't be in the same fat output file

Command line:

./boost.sh -ios -j 4 --boost-version 1.73.0 --ios-sdk 13.4 --ios-archs "armv7 arm64" --min-ios-version 10.2 --universal --boost-libs "system filesystem thread timer date_time chrono regex serialization atomic program_options locale"

Is there something wrong with my command line?

XCode Version 12.3 (12C33)
MacOS BigSur 11.5.2 (20G95)

Full build log:

./boost.sh -ios -j 4  --boost-version 1.73.0 --ios-sdk 13.4 --ios-archs "armv7 arm64" --min-ios-version 10.2 --universal --boost-libs "system filesystem thread timer date_time chrono regex serialization atomic program_options locale"
BOOST_VERSION       : 1.73.0

BUILD_IOS           : YES
IOS_ARCHS           : armv7
IOS_SDK_VERSION     : 13.4
IOS_SDK_PATH        : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk
IOSSIM_SDK_PATH     : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk
MIN_IOS_VERSION     : 10.2

BUILD_TVOS          : NO
TVOS_SDK_VERSION    : 14.3
TVOS_SDK_PATH       : /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.3.sdk
TVOSSIM_SDK_PATH    : /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator14.3.sdk
MIN_TVOS_VERSION    : 11.0

BUILD_MACOS         : NO
MACOS_ARCHS         : i386
MACOS_SDK_VERSION   : 11.1
MACOS_SDK_PATH      : /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
MIN_MACOS_VERSION   : 10.12

BUILD_MACOS_SILICON : NO
MACOS_SILICON_ARCHS : arm64
MACOS_SILICON_SDK_VERSION: 11.1
MACOS_SILICON_SDK_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
MIN_MACOS_SILICON_VERSION: 11
BUILD_MAC_CATALYST  : NO
MAC_CATALYST_ARCHS  : x86_64
MAC_CATALYST_SDK_VERSION: 11.1
MAC_CATALYST_SDK_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
MIN_MAC_CATALYST_VERSION: 13.0

BOOST_LIBS          : system filesystem thread timer date_time chrono regex serialization atomic program_options locale
BOOST_SRC           : /Users/roky/projects/Apple-Boost-BuildScript/src/boost_1_73_0
XCODE_ROOT          : /Applications/Xcode.app/Contents/Developer
IOS_BUILD_DIR       : /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build
TVOS_BUILD_DIR      : /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/tvos/release/build
MACOS_BUILD_DIR     : /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/macos/release/build
MACOS_SILICON_BUILD_DIR: /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/macos-silicon/release/build
MAC_CATALYST_BUILD_DIR: /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/mac-catalyst/release/build
THREADS             : -j4
BUILD_VARIANT       : release

Cleaning everything

Done
=================================================================

Unpacking boost into /Users/roky/projects/Apple-Boost-BuildScript/src...
    ...unpacked as /Users/roky/projects/Apple-Boost-BuildScript/src/boost_1_73_0

Done
=================================================================

Inventing missing headers
cp: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/crt_externs.h: No such file or directory
cp: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/bzlib.h: No such file or directory

Done
=================================================================

Patching boost in /Users/roky/projects/Apple-Boost-BuildScript/src/boost_1_73_0
patching file src/tools/darwin.jam

Done
=================================================================

Updating boost into /Users/roky/projects/Apple-Boost-BuildScript/src/boost_1_73_0...

Done
=================================================================

Bootstrap libs system filesystem thread timer date_time chrono regex serialization atomic program_options locale
Bootstrapping for iOS (with libs system,filesystem,thread,timer,date_time,chrono,regex,serialization,atomic,program_options,locale)
Building Boost.Build engine with toolset clang... tools/build/src/engine/b2
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam for clang...

Bootstrapping is done. To build, run:

    ./b2
    
To generate header files, run:

    ./b2 headers

To adjust configuration, edit 'project-config.jam'.
Further information:

   - Command line help:
     ./b2 --help
     
   - Getting started guide: 
     http://www.boost.org/more/getting_started/unix-variants.html
     
   - Boost.Build documentation:
     http://www.boost.org/build/


Done
=================================================================

Building Boost for iPhone

Done
=================================================================

Building Boost for iPhoneSimulator

Done
=================================================================

Splitting all existing fat binaries...
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_locale.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphone-build/stage/lib/libboost_locale.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_locale.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_locale.a (No such file or directory)
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: iphonesim-build/stage/lib/libboost_locale.a (No such file or directory)
Decomposing each architecture's .a files
Decomposing libboost_system.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/system
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/system
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/system
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/system
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/system
Decomposing libboost_filesystem.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/filesystem
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/filesystem
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/filesystem
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/filesystem
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/filesystem
Decomposing libboost_thread.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/thread
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/thread
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/thread
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/thread
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/thread
Decomposing libboost_timer.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/timer
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/timer
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/timer
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/timer
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/timer
Decomposing libboost_date_time.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/date_time
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/date_time
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/date_time
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/date_time
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/date_time
Decomposing libboost_chrono.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/chrono
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/chrono
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/chrono
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/chrono
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/chrono
Decomposing libboost_regex.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/regex
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/regex
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/regex
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/regex
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/regex
Decomposing libboost_serialization.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/serialization
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/serialization
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/serialization
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/serialization
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/serialization
Decomposing libboost_atomic.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/atomic
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/atomic
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/atomic
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/atomic
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/atomic
Decomposing libboost_program_options.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/program_options
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/program_options
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/program_options
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/program_options
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/program_options
Decomposing libboost_locale.a
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/obj/locale
ar: ../../libboost_locale.a: No such file or directory
mv: rename *.o to locale_*.o: No such file or directory
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/obj/locale
ar: ../../libboost_locale.a: No such file or directory
mv: rename *.o to locale_*.o: No such file or directory
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/obj/locale
ar: ../../libboost_locale.a: No such file or directory
mv: rename *.o to locale_*.o: No such file or directory
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/obj/locale
ar: ../../libboost_locale.a: No such file or directory
mv: rename *.o to locale_*.o: No such file or directory
Unpacking /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/obj/locale
ar: ../../libboost_locale.a: No such file or directory
mv: rename *.o to locale_*.o: No such file or directory
Linking each architecture into an uberlib ( libboost_system.a libboost_filesystem.a libboost_thread.a libboost_timer.a libboost_date_time.a libboost_chrono.a libboost_regex.a libboost_serialization.a libboost_atomic.a libboost_program_options.a libboost_locale.a => libboost.a )
rm: /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/armv7/libboost.a: No such file or directory
rm: /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/arm64/libboost.a: No such file or directory
rm: /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphoneos/libboost.a: No such file or directory
rm: /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/i386/libboost.a: No such file or directory
rm: /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/x86_64/libboost.a: No such file or directory
rm: /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/arm64/libboost.a: No such file or directory
rm: /Users/roky/projects/Apple-Boost-BuildScript/build/boost/1.73.0/ios/release/build/iphonesimulator/libboost.a: No such file or directory
Archiving system
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving filesystem
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving thread
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving timer
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving date_time
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving chrono
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving regex
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving serialization
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving atomic
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving program_options
...ios-armv7
...ios-arm64
...ios-sim-i386
...ios-sim-x86_64
...ios-sim-arm64
Archiving locale
...ios-armv7
ar: obj/locale/*.o: No such file or directory
...ios-arm64
ar: obj/locale/*.o: No such file or directory
...ios-sim-i386
ar: obj/locale/*.o: No such file or directory
...ios-sim-x86_64
ar: obj/locale/*.o: No such file or directory
...ios-sim-arm64
ar: obj/locale/*.o: No such file or directory
Creating universal library...
... system
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: iphoneos/arm64/libboost_system.a and iphonesimulator/arm64/libboost_system.a have the same architectures (arm64) and can't be in the same fat output file

Aborted: Lipo system failed

Not clear how to pass array to --boost-libs or --ios-archs

From the docs it should be the following format and it doesn't work for me:

--ios-archs "(archs, ...)"
--boost-libs "{all|none|(lib, ...)}"

I was able to pass parameters only with following format --ios-archs:

--ios-archs "armv7 arm64"

and the same format didn't work for --boost-libs parameter. Single arguments worked fine:

--boost-libs thread

Universal Binary Possible?

Hi,

Great script!

I am trying to build a universal fat library for ios that includes arm64, armv7 and armv7s. Thats all those architectures in one file for each boost lib.

How would i do this with your script?

Using xcframework in Ccode

I've compiled Boost 1_74_0 for macOS and iOS with no problems thanks to this script.

I've added the framework to my project with the "Do Not Embed" setting and I can run the app with no problems with the debugger attached in Xcode. However when I archive the project, the resulting app fails to launch and shows an error which suggests that something is going wrong in the creating one or more of the Boost objects, presumably because of a linking problem that I obviously don't understand.

If I change the framework to "Embed & Sign" then I get the error "code object is not signed at all" for libboost.a and I can't run the app.

Sorry if this is a bit of a basic question, but what's the best way to link/embed the xcframework?

Dynamic framework

Is there a way of building a dynamic cocoa touch framework of Boost with your script?

Scrunching / Framework doesn't work when multiple targets are specified

If you specify both -macos and -ios targets, the scrunchAllLibsTogetherInOneLibPerPlatform step won't work correctly, and as a result of that buildFramework also. The scrunch function loops over all the libs defined in BOOSTRAP_LIBS. Since this can be different for each platform depending on the libraries specified, things get a little messed up.

I think I broke this when I figuring out which libraries are actually available on which platforms.

You can still build each platform individually though, so do that as a work around for the time being.

I think the solution for this will be the same thing as #15.

Building boost 1.80.0 with BCP (thinning)

Currently the build is broken for the latest 1.80.0 version of Boost when thinning is enabled (the default).

Example of build output :

[errno 2] boostcpp.jam (No such file or directory)
Jamroot:153: in modules.load
ERROR: rule "boostcpp.set-version" unknown in module "Jamfile</Users/guillaume/Projects/Ipso/Apple-Boost-BuildScript/src/boost_1_80_0_thinned>".
/Users/guillaume/Projects/Ipso/Apple-Boost-BuildScript/src/boost_1_80_0/tools/build/src/build/project.jam:372: in load-jamfile
/Users/guillaume/Projects/Ipso/Apple-Boost-BuildScript/src/boost_1_80_0/tools/build/src/build/project.jam:64: in load
/Users/guillaume/Projects/Ipso/Apple-Boost-BuildScript/src/boost_1_80_0/tools/build/src/build/project.jam:142: in project.find
/Users/guillaume/Projects/Ipso/Apple-Boost-BuildScript/src/boost_1_80_0/tools/build/src/build-system.jam:618: in load
/Users/guillaume/Projects/Ipso/Apple-Boost-BuildScript/src/boost_1_80_0/tools/build/src/kernel/modules.jam:294: in import
/Users/guillaume/Projects/Ipso/Apple-Boost-BuildScript/src/boost_1_80_0/tools/build/src/kernel/bootstrap.jam:135: in module scope

I'm not quite sure what is happening, it seems B2 / BCP changed something in this release of boost, the content of the src/boost_1_80_0_thinned has changed from the previous versions.

Help welcome.

In the meantime, if you need to build Boost 1.80.0 you can pass the --no-thinning parameter to the script.

Boost filesystem directory_iterator problem on iOS?

Hi, I'm having a weird problem, and before I raise it to the boost folks, I was hoping I can get your "Boost on iOS" opinion, as I'm not a boost expert (barely c++ capable).

When I use the boost filesystem::directory_iterator in my iOS program, it just plain doesn't work.

I started by building the current boost library using your script:

./boost.sh -ios -macos --boost-version 1.73.0 --ios-sdk 13.4 --ios-archs "armv7 arm64" --min-ios-version 10.2 --hidden-visibility --universal --boost-libs "date_time filesystem program_options regex system"

directory_iterator wasn't working and sometimes crashed in the project I'm working on, so I created a new Xcode project (attached below) to narrow it down. All I did was:

  • Build a new single-view project in Xcode
  • Rename AppDelegate.m to AppDelegate.mm
  • Add the code (bottom of this post) to didFinishLaunchingWithOptions
  • Add boost headers to Header Search Path
  • Add library directory to Library Search paths
  • Add libboost_filesystem.a to "Link Binary with Libraries" phase
  • Then run the program.

I'm using current Xcode Version 11.4.1 (11E503a) on current MacOS: 10.15.4 (19E287) and current iOS: 13.4.1 (17E262).

Results: the itr->path exists; once for each file, but is always empty, giving error msg: "" does not exist. I point out that the preceding Cocoa access to the same directory works fine. so the file(s) are there, and the app has rights to get to them. As discussed below, sometimes I also get a malloc crash in directory.cpp > dir_itr_close when the for-loop finishes.

I did the same steps on a macOS version (both a command line version in main.mm and a sandboxed app version in applicationDidFinishLaunching; also attached for your interest). No changes to code at all, and both worked fine, either giving me a listing of my real Documents directory, or just showing the dummy file in the sandboxed Documents.

What triggered my investigation, was that I got two warning messages when compiling in my real project (these are the ones from the test project; I compressed the long names to $DerivedData). As discussed below, these only appear when I compile on the simulator with Inline Methods Hidden: NO

Direct access in function 'boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, unsigned int, boost::system::error_code*)' from file '$DerivedData/boost-ios/build/iOS/libboost_filesystem.a(directory.o)' to global weak symbol 'boost::system::detail::is_generic_value(int)::gen' from file '$DerivedData/Debug-iphonesimulator/testBoost.build/Objects-normal/x86_64/AppDelegate.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.>

Direct access in function 'boost::system::detail::system_error_category::default_error_condition(int) const' from file '$DerivedData/boost-ios/build/iOS//libboost_filesystem.a(directory.o)' to global weak symbol 'boost::system::detail::is_generic_value(int)::gen' from file '$DerivedData//Debug-iphonesimulator/testBoost.build/Objects-normal/x86_64/AppDelegate.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

So, with that clue... I tried changing Xcode's Hidden options. In the test project, if I set Inline Methods Hidden (matching the compilation), then I get no warnings, empty file names reported and then a malloc crash. If I turn it off, I get the warnings, empty file names, but no crash. The Symbols Hidden by Default option seems to have no effect in either case. I note that the warnings only appear when I'm compiling on the simulator, but the other results are the same.

I then rebuilt the boost library removing the --hidden-visibility option. Absolutely no effect: Inline Methods hidden still gives no warning, no names and malloc crash; Inline Methods hidden off still gives warning, no names, and no malloc crash.

So, any obvious things I've missed, or suggestions for other things to try before escalating to the boost group?

thx
/Hugh

 using namespace std;
namespace fs = boost::filesystem;

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
 //Create a temp file to list
  NSString * objCPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
  fs::path doc_path(objCPath.fileSystemRepresentation);
  fs::ofstream( doc_path / "/dummyFile.txt" );
 // fs::ofstream( doc_path / "/dummyFile2.txt" );
  
  NSLog(@"Directory Contents: %@", [[NSFileManager defaultManager] contentsOfDirectoryAtPath:objCPath error:nil]);

  fs::directory_iterator end_itr;  // default construction yields past-the-end
  for (fs::directory_iterator itr(doc_path); itr != end_itr; ++itr) {
   fs::path path = itr->path();
   //
    if (exists(path))
      if (is_regular_file(path))
        std::cout << path << "; file size is " << file_size(path) << '\n';
      else if (is_directory(path))
        std::cout << path << " is a directory\n";
      else
        std::cout << path << "exists, but is neither a file nor a directory\n";
    else
      cout << path << " does not exist\n";
  }
  cout << "All done";
  return YES;

TestBoost.zip

Building framework should have an option to put the header files in Headers/boost

Some libraries such as cpprestsdk expect boost to have "boost" in the path. For example: "boost/align.hpp".

It would be nice to have a switch to be able to build it this way.

Note that I use the static libs. But I'm working on iOS compatibility with cpprestsdk and wanted to test that my changes work with a boost framework.

https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-iOS

They actually now recommend your repo (although they didn't provide a link, it's referenced).

Building locale can fail on macOS

When I run the following command:

./boost.sh -macos --boost-version 1.70.0 --macos-sdk 10.14 --min-macos-version 10.10 --macos-archs "i386 x86_64" --universal --framework-header-root --boost-libs "chrono date_time filesystem locale system timer"

The build fails with the following error:

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: i386/libboost_locale.a (No such file or directory)

Looking earlier in the build log and poking around on disk, I can see that there are no build files for locale. macos-build.log has a helpful error:

Boost.Locale needs either iconv or ICU library to be built

The docs for locale (here) state the following:

Building Boost.Locale
Dependencies

    ICU library 3.6 or above is strongly recommended
    If no ICU library is given, iconv support is required under POSIX platforms.

Platform Notes

    If you use Boost.Locale on Windows with MinGW/GCC < 4.5 you'll be able to use static version only. Mingw/GCC prior to 4.5 have no support of dynamic runtime linking.
    Using Boost.Locale DLL's with MinGW gcc also requires dynamic linking with the runtime libraries libstdc++ and libgcc. Some gcc builds use static linking by default so make sure you use correct link options with your compiler when you build your own programs.
    The AIX's iconv misses important character sets that Boost.Locale requires, so you need to either use GNU iconv or link with ICU library.
    If iconv library is not found on Darwin/Mac OS X builds make sure there is no multiple iconv installations and provide -sICONV_PATH build option to point to correct location of iconv library.

I'm looking into what this would take to fix now, as which iconv on my system returns a valid, usable binary.

http://metashapes.com/blog/building-boost-locale-ios/ has some interesting details, but adding -I$XCODE_ROOT/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${MACOS_SDK_VERSION}.sdk/usr/include/ -L$XCODE_ROOT/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${MACOS_SDK_VERSION}.sdk/usr/lib/ to EXTRA_MACOS_SDK_FLAGS doesn't seem to work.

Boost Context iOS

Has anyone else managed to get context in iOS?

There are a few SO topics on the issue

Seems to have made it work with Danoli3's repo.

Boost built and ready for iOS/macOS (repo)

Just to help and save other developers time

I've made a repository which contains Boost and OpenSSL built and ready for iOS and macOS architectures.

Includes thread-safe libraries aswell!

If possible, do not close this issue, just trying to help!

Cannot build versions of Boost older than 1.68.0 for non-32-bit architectures

I tried to build a couple of boost libs for ios 11.0 and higher (so 64 bits only, aka arm64 architecture), this is what I call:

./boost.sh -ios --ios-archs arm64 --boost-version 1.63.0 --boost-libs "filesystem system program_options"

The build fails, due to those errors:

clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

It seems it tries to build for 32-bit even though we specify arm64 as the only architecture. When looking at the log, I see the compiler makes some calls to -arch arm and not just "-arch" "arm64", which I would guess is the cause of the issue:

"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/codecvt_error_category.o" "libs/filesystem/src/codecvt_error_category.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/codecvt_error_category.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/path.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

Edit: I can confirm that when running the clang++ command above without the -arch arm flag, it builds the object file just fine. I couldn't figure out in boost.sh why/where that flag is added though.

Full log:

Performing configuration checks

    - 32-bit                   : no
    - 64-bit                   : no
    - arm                      : no
    - mips1                    : no
    - power                    : no
    - sparc                    : no
    - x86                      : no
    - combined                 : no
    - symlinks supported       : yes

Component configuration:

    - atomic                   : not building
    - chrono                   : not building
    - container                : not building
    - context                  : not building
    - coroutine                : not building
    - coroutine2               : not building
    - date_time                : not building
    - exception                : not building
    - fiber                    : not building
    - filesystem               : building
    - graph                    : not building
    - graph_parallel           : not building
    - iostreams                : not building
    - locale                   : not building
    - log                      : not building
    - math                     : not building
    - metaparse                : not building
    - mpi                      : not building
    - program_options          : building
    - python                   : not building
    - random                   : not building
    - regex                    : not building
    - serialization            : not building
    - signals                  : not building
    - system                   : building
    - test                     : not building
    - thread                   : not building
    - timer                    : not building
    - type_erasure             : not building
    - wave                     : not building

...patience...
...found 1066 targets...
...updating 59 targets...
common.mkdir iphone-build/stage
common.mkdir iphone-build/boost/bin.v2/libs
common.mkdir iphone-build/boost/bin.v2/libs/system
common.mkdir iphone-build/stage/lib
common.mkdir iphone-build/boost/bin.v2/libs/filesystem
common.mkdir iphone-build/boost/bin.v2/libs/program_options
common.mkdir iphone-build/boost/bin.v2/libs/system/build
common.mkdir iphone-build/boost/bin.v2/libs/filesystem/build
common.mkdir iphone-build/boost/bin.v2/libs/program_options/build
common.mkdir iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone
common.mkdir iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone
common.mkdir iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone
common.mkdir iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release
common.mkdir iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release
common.mkdir iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release
common.mkdir iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm
common.mkdir iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm
common.mkdir iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm
common.mkdir iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static
common.mkdir iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static
common.mkdir iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static
common.mkdir iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2
common.mkdir iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2
common.mkdir iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2
common.mkdir iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone
common.mkdir iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone
common.mkdir iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone
common.mkdir iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi
common.mkdir iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi
common.mkdir iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi
darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/codecvt_error_category.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/codecvt_error_category.o" "libs/filesystem/src/codecvt_error_category.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/codecvt_error_category.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/path.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/path.o" "libs/filesystem/src/path.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/path.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/error_code.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/error_code.o" "libs/system/src/error_code.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/error_code.o...
...skipped <piphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>libboost_system.a(clean) for lack of <piphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>error_code.o...
...skipped <piphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>libboost_system.a for lack of <piphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>error_code.o...
...skipped <piphone-build/stage/lib>libboost_system.a for lack of <piphone-build/boost/bin.v2/libs/system/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>libboost_system.a...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/operations.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/operations.o" "libs/filesystem/src/operations.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/operations.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/path_traits.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/path_traits.o" "libs/filesystem/src/path_traits.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/path_traits.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/portability.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/portability.o" "libs/filesystem/src/portability.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/portability.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/unique_path.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/unique_path.o" "libs/filesystem/src/unique_path.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/unique_path.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/cmdline.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/cmdline.o" "libs/program_options/src/cmdline.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/cmdline.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/config_file.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/config_file.o" "libs/program_options/src/config_file.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/config_file.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/parsers.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/parsers.o" "libs/program_options/src/parsers.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/parsers.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/options_description.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/options_description.o" "libs/program_options/src/options_description.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/options_description.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/variables_map.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/variables_map.o" "libs/program_options/src/variables_map.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/variables_map.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/value_semantic.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/value_semantic.o" "libs/program_options/src/value_semantic.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/value_semantic.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/positional_options.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/positional_options.o" "libs/program_options/src/positional_options.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/positional_options.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/utf8_codecvt_facet.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/utf8_codecvt_facet.o" "libs/program_options/src/utf8_codecvt_facet.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/utf8_codecvt_facet.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/convert.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/convert.o" "libs/program_options/src/convert.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/convert.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/winmain.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/winmain.o" "libs/program_options/src/winmain.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/winmain.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/split.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/split.o" "libs/program_options/src/split.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/split.o...
...skipped <piphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>libboost_program_options.a(clean) for lack of <piphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>cmdline.o...
...skipped <piphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>libboost_program_options.a for lack of <piphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>cmdline.o...
...skipped <piphone-build/stage/lib>libboost_program_options.a for lack of <piphone-build/boost/bin.v2/libs/program_options/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>libboost_program_options.a...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/utf8_codecvt_facet.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/utf8_codecvt_facet.o" "libs/filesystem/src/utf8_codecvt_facet.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/utf8_codecvt_facet.o...
darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/windows_file_codecvt.o
clang: error: invalid iOS deployment version '-miphoneos-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "-arch" "arm64" "-fembed-bitcode" "-Wno-unused-local-typedef" "-Wno-nullability-completeness" "-DBOOST_AC_USE_PTHREADS" "-DBOOST_SP_USE_PTHREADS" "-g" "-DNDEBUG" "-mios-version-min=11.0"  -ftemplate-depth-128 -O3 -Wall -gdwarf-2 -fexceptions -Wno-inline -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -pthread -arch arm -std=c++14 -stdlib=libc++  -arch arm64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -D_LITTLE_ENDIAN  -I"." -c -o "iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/windows_file_codecvt.o" "libs/filesystem/src/windows_file_codecvt.cpp"

...failed darwin.compile.c++ iphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi/windows_file_codecvt.o...
...skipped <piphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>libboost_filesystem.a(clean) for lack of <piphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>codecvt_error_category.o...
...skipped <piphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>libboost_filesystem.a for lack of <piphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>codecvt_error_category.o...
...skipped <piphone-build/stage/lib>libboost_filesystem.a for lack of <piphone-build/boost/bin.v2/libs/filesystem/build/darwin-12.2~iphone/release/architecture-arm/link-static/macosx-version-iphone-12.2/target-os-iphone/threading-multi>libboost_filesystem.a...
...failed updating 20 targets...
...skipped 9 targets...
...updated 30 targets...

System:

  • macOS Mojave v10.14.5
  • Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  • XCode v10.2.1 (10E1001)

Thanks for your work, it looks pretty fantastic. Looking forward to using it!

Cannot build for tvOS with Xcode 9

Building for tvOS fails with a bunch of errors about members of cmath not being in the global namespace.

Building works fine still for iOS and macOS.

Probably an issue with include path configuration.

building iostreams (missing objects)

hey guys !
i'm trying to build iostreams for ios using this script ...
i have added iostreams to BOOST_LIBS and i was able to build iostream, BUT...
it seams that the static lib i got is missing some objects.. for example zlib, gzip ....
can i do anything about that ?

thanks !!!!

Unable to build boost: Error staging iPhone.

Hi, I'm trying to build boost 1.70.0 but it always error out for some reason, my XCode version is 14.1, please help.

  • The script: ./boost.sh -ios --boost-version 1.70.0 --min-ios-version 12.0 --boost-libs 'atomic chrono date_time exception filesystem program_options random system thread test'
  • Console log:
BOOST_VERSION       : 1.70.0

BUILD_IOS           : YES
IOS_ARCHS           : arm64
IOS_SDK_VERSION     : 16.1
IOS_SDK_PATH        : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.1.sdk
IOSSIM_SDK_PATH     : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk
MIN_IOS_VERSION     : 12.0

BUILD_TVOS          : NO
TVOS_SDK_VERSION    : 16.1
TVOS_SDK_PATH       : /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS16.1.sdk
TVOSSIM_SDK_PATH    : /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator16.1.sdk
MIN_TVOS_VERSION    : 13.0

BUILD_MACOS         : NO
MACOS_ARCHS         : i386
MACOS_SDK_VERSION   : 13.0
MACOS_SDK_PATH      : /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk
MIN_MACOS_VERSION   : 10.12

BUILD_MACOS_SILICON : NO
MACOS_SILICON_ARCHS : arm64
MACOS_SILICON_SDK_VERSION: 13.0
MACOS_SILICON_SDK_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk
MIN_MACOS_SILICON_VERSION: 11
BUILD_MAC_CATALYST  : NO
MAC_CATALYST_ARCHS  : x86_64
MAC_CATALYST_SDK_VERSION: 13.0
MAC_CATALYST_SDK_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk
MIN_MAC_CATALYST_VERSION: 14.0

BOOST_LIBS          : atomic chrono date_time exception filesystem program_options random system thread test
BOOST_SRC           : /Users/vutien/Downloads/Apple-Boost-BuildScript-master/src/boost_1_70_0
XCODE_ROOT          : /Applications/Xcode.app/Contents/Developer
IOS_BUILD_DIR       : /Users/vutien/Downloads/Apple-Boost-BuildScript-master/build/boost/1.70.0/ios/release/build
TVOS_BUILD_DIR      : /Users/vutien/Downloads/Apple-Boost-BuildScript-master/build/boost/1.70.0/tvos/release/build
MACOS_BUILD_DIR     : /Users/vutien/Downloads/Apple-Boost-BuildScript-master/build/boost/1.70.0/macos/release/build
MACOS_SILICON_BUILD_DIR: /Users/vutien/Downloads/Apple-Boost-BuildScript-master/build/boost/1.70.0/macos-silicon/release/build
MAC_CATALYST_BUILD_DIR: /Users/vutien/Downloads/Apple-Boost-BuildScript-master/build/boost/1.70.0/mac-catalyst/release/build
THREADS             : -j8
BUILD_VARIANT       : release

Cleaning everything

Done
=================================================================

Downloading boost 1.70.0 from https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 93.3M  100 93.3M    0     0  2195k      0  0:00:43  0:00:43 --:--:-- 1515k

Done
=================================================================

Unpacking boost into /Users/vutien/Downloads/Apple-Boost-BuildScript-master/src...
    ...unpacked as /Users/vutien/Downloads/Apple-Boost-BuildScript-master/src/boost_1_70_0

Done
=================================================================

Inventing missing headers

Done
=================================================================

Patching boost in /Users/vutien/Downloads/Apple-Boost-BuildScript-master/src/boost_1_70_0
patching file 'src/tools/darwin.jam'

Done
=================================================================

Updating boost into /Users/vutien/Downloads/Apple-Boost-BuildScript-master/src/boost_1_70_0...

Done
=================================================================

Bootstrapping for bcp (with libs atomic,chrono,date_time,exception,filesystem,program_options,random,system,thread,test)
Building Boost.Build engine with toolset darwin... tools/build/src/engine/bin.macosxarm/b2
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam for darwin...

Bootstrapping is done. To build, run:

    ./b2
    
To generate header files, run:

    ./b2 headers

To adjust configuration, edit 'project-config.jam'.
Further information:

   - Command line help:
     ./b2 --help
     
   - Getting started guide: 
     http://www.boost.org/more/getting_started/unix-variants.html
     
   - Boost.Build documentation:
     http://www.boost.org/build/


Done
=================================================================

Thinning boost in /Users/vutien/Downloads/Apple-Boost-BuildScript-master/src/boost_1_70_0_thinned (input is /Users/vutien/Downloads/Apple-Boost-BuildScript-master/src/boost_1_70_0)
Performing configuration checks

    - default address-model    : 64-bit
    - default architecture     : arm
    - has_icu builds           : no
...patience...
...found 1032 targets...
...updating 59 targets...
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/add_dependent_lib.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/add_path.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/bcp_imp.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/copy_path.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/file_types.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/fileview.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/main.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/path_operations.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/scan_cvs_path.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/licence_info.o
tools/bcp/licence_info.cpp:716:48: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
   static const boost::regex e("(^)?[^-(<a-zA-Z<C0>-<FE>]+(([(<].*)?$)?");
                                               ^~~~ ~~~~
1 warning generated.
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/scan_licence.o
clang-darwin.compile.c++ bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/output_licence_info.o
In file included from tools/bcp/output_licence_info.cpp:17:
In file included from ./boost/lexical_cast.hpp:32:
In file included from ./boost/lexical_cast/try_lexical_convert.hpp:44:
In file included from ./boost/lexical_cast/detail/converter_lexical.hpp:54:
./boost/lexical_cast/detail/converter_lexical_streams.hpp:285:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                    sprintf(begin, 
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from tools/bcp/output_licence_info.cpp:17:
In file included from ./boost/lexical_cast.hpp:32:
In file included from ./boost/lexical_cast/try_lexical_convert.hpp:44:
In file included from ./boost/lexical_cast/detail/converter_lexical.hpp:54:
./boost/lexical_cast/detail/converter_lexical_streams.hpp:297:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                    sprintf(begin, 
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from tools/bcp/output_licence_info.cpp:17:
In file included from ./boost/lexical_cast.hpp:32:
In file included from ./boost/lexical_cast/try_lexical_convert.hpp:44:
In file included from ./boost/lexical_cast/detail/converter_lexical.hpp:54:
./boost/lexical_cast/detail/converter_lexical_streams.hpp:310:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                    sprintf(begin, 
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
3 warnings generated.
clang-darwin.compile.c++ bin.v2/libs/filesystem/build/clang-darwin-14.0/release/link-static/visibility-hidden/codecvt_error_category.o
clang-darwin.compile.c++ bin.v2/libs/filesystem/build/clang-darwin-14.0/release/link-static/visibility-hidden/operations.o
clang-darwin.compile.c++ bin.v2/libs/filesystem/build/clang-darwin-14.0/release/link-static/visibility-hidden/path.o
clang-darwin.compile.c++ bin.v2/libs/filesystem/build/clang-darwin-14.0/release/link-static/visibility-hidden/path_traits.o
clang-darwin.compile.c++ bin.v2/libs/filesystem/build/clang-darwin-14.0/release/link-static/visibility-hidden/portability.o
clang-darwin.compile.c++ bin.v2/libs/filesystem/build/clang-darwin-14.0/release/link-static/visibility-hidden/unique_path.o
clang-darwin.compile.c++ bin.v2/libs/filesystem/build/clang-darwin-14.0/release/link-static/visibility-hidden/utf8_codecvt_facet.o
clang-darwin.compile.c++ bin.v2/libs/filesystem/build/clang-darwin-14.0/release/link-static/visibility-hidden/windows_file_codecvt.o
clang-darwin.archive bin.v2/libs/filesystem/build/clang-darwin-14.0/release/link-static/visibility-hidden/libboost_filesystem.a
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/c_regex_traits.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/cpp_regex_traits.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/cregex.o
libs/regex/build/../src/cregex.cpp:374:24: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
         int r = (std::sprintf)(buf, "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
1 warning generated.
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/fileiter.o
libs/regex/build/../src/fileiter.cpp:857:17: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
      r = (std::sprintf)(buf, "%s%s", root, name);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
libs/regex/build/../src/fileiter.cpp:859:17: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
      r = (std::sprintf)(buf, "%s%s%s", root, _fi_sep, name);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
2 warnings generated.
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/icu.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/instances.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/posix_api.o
libs/regex/build/../src/posix_api.cpp:175:27: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            int r = (std::sprintf)(localbuf, "%d", i);
                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
libs/regex/build/../src/posix_api.cpp:187:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
      int r = (std::sprintf)(localbuf, "%d", 0);
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
2 warnings generated.
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/regex.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/regex_debug.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/regex_raw_buffer.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/regex_traits_defaults.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/static_mutex.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/w32_regex_traits.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/wc_regex_traits.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/wide_posix_api.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/winstances.o
clang-darwin.compile.c++ bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/usinstances.o
clang-darwin.archive bin.v2/libs/regex/build/clang-darwin-14.0/release/link-static/visibility-hidden/libboost_regex.a
clang-darwin.link bin.v2/tools/bcp/clang-darwin-14.0/release/link-static/bcp
common.copy dist/bin/bcp
...updated 59 targets...
Active source dir is now /Users/vutien/Downloads/Apple-Boost-BuildScript-master/src/boost_1_70_0_thinned

Done
=================================================================

Bootstrapping for iOS (with libs atomic,chrono,date_time,exception,filesystem,program_options,random,system,thread,test)
Building Boost.Build engine with toolset darwin... tools/build/src/engine/bin.macosxarm/b2
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam for darwin...

Bootstrapping is done. To build, run:

    ./b2
    
To generate header files, run:

    ./b2 headers

To adjust configuration, edit 'project-config.jam'.
Further information:

   - Command line help:
     ./b2 --help
     
   - Getting started guide: 
     http://www.boost.org/more/getting_started/unix-variants.html
     
   - Boost.Build documentation:
     http://www.boost.org/build/


Done
=================================================================

Building Boost for iPhone
Error staging iPhone. Check log.

Fatal Error when I run the script on an M1 Mac

I'm running on an M1 Mac with the latest Xcode. I tried running the script with the following settings:

./boost.sh -ios -macos

And I got this output error:

...
Splitting all existing fat binaries...
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: input file (iphonesim-build/stage/lib/libboost_atomic.a) must be a fat file when the -thin option is specified

I ran the same command on my old Intel Mac from 2016 and it worked beautifully.

Unknown macosx-version build error

I am getting a strange error building boost 1.65.1 using Xcode 9.0

error: "iphone-11.0" is not a known value of feature
error: legal values: "iphonesim-11.0"

I am getting a similar error trying to build macos. I am not sure if the problem is with boost itself or the build script.

I ran this command to do the build:

./boost.sh -ios --boost-version 1.65.1

Unary operator expected

As an FYI, I have pulled the latest and this this warning. Not sure if this is expected or not:

Bootstrapping for iOS (with libs atomic,chrono,container,date_time,exception,fiber,filesystem,graph,graph_parallel,iostreams,locale,log,metaparse,,program_options,python,random,regex,serialization,signals,system,test,thread,timer,type_erasure,wave)
./bootstrap.sh: line 90: test: =: unary operator expected

The command I used with

./boost.sh -ios --boost-libs all --no-framework

Ignoring building Boost.Locale for iOS

This script is ignoring building Boost.Locale.
I know how to build Boost.Locale for MacOS.
I've tried to add ICU support but it's not working with your script.

How to build boost python with python3

Seems like it should be possible to build boost python with a python3 install from python.org, installed in:

/Library/Frameworks/Python.framework/Versions/3.9

I've tweaked the boost.sh script with:

./bootstrap.sh --with-libraries="$BOOST_LIBS_COMMA" --with-python=python3 --with-python-root=/Library/Frameworks/Python.framework/Versions/3.9/ --with-python-version=3.9

and it still insists on building:

src/boost_1_75_0/macos-build/stage/lib/libboost_python27.a

Given that Apple is going to remove Python in the next version of macOS, it would seem like the need to update the script to build from python.org's default install directory (or at least pass through the appropriate params).

Anyone else tried this and succeeded?

license

what is the license of this build script?

Accepting pull requests?

Hi,

I spent the last few days working on this script in our fork (https://github.com/ipsosante/Apple-Boost-BuildScript) to make it work for us. I'd be happy to upstream some of our fixes and improvements that would benefit more than just us, so I was wondering if you were accepting PR / had the time to review them?

Some of the changes are :

  • Fix warnings and errors detected by shellcheck
  • Fix #45 by automatically patching boost
  • Fix #34
  • Use bcp to reduce the resulting framework size
  • Cleanup the custom b2 toolsets used
  • Add function to build a XCFramework

Let me know if you're interested and I'll send PR your way :)

Include all library files when building fat library

Currently, the script only combines libraries provided in --boost-libs, by iterating for NAME in $BOOTSTRAP_LIBS; do.

However, boost binary has dependencies, e.g, if I build log, then here is what are actually built (by default), log library and all its dependencies.

libboost_atomic.a
libboost_chrono.a         
libboost_date_time.a      
libboost_filesystem.a     
libboost_log.a           
libboost_log_setup.a      
libboost_regex.a          
libboost_system.a         
libboost_thread.a

The outputted libboost.a, however, only consists of libboost_log.a.

Sometimes, this can be worked around by also providing the list of dependencies in --boost-libs, but libboost_log_setup.a is not a standalone library, so this won't work.

Why not just take all .a files in stage folder as target library files?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.