I want to build FFTW library for iPhone and use this script:
#!/bin/bash
export SDKVER="6.0"
export DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer"
export SDKROOT="$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk"
export CFLAGS="$CPPFLAGS -isysroot $SDKROOT"
export LDFLAGS="$CFLAGS -Wl,-syslibroot $SDKROOT"
export CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
export LD=$DEVROOT/usr/bin/ld
export PREFIX="$HOME/Desktop/mylib"
./configure --prefix="$PREFIX" --enable-single --host=arm-apple-darwin
make
make install
Then I import libfftw3f.a and fftw3.h in Xcode in my project, link this library in Build Phases.
When I try to compile, Xcode gives me this warning:
ld: warning: ignoring file /Users/Adem/Desktop/mylib/lib/libfftw3f.a, file was built for archive which is not the architecture being linked (armv7s): /Users/Adem/Desktop/mylib/lib/libfftw3f.a
What am I doing wrong?
Try adding -arch armv7 to your CFLAGS (and hence also to your LDFLAGS)
Related
I am trying to compile a C library to use it in my iOS project, and I want to embed bitcode.
I can successfully build static libraries targeting each arch. And those static library do contain bitcode (checked using otool), but the dynamic library doesn't contain bitcode. Why? Is bitcode not supported in dylib?
The library I am trying to build is xz. Here is the script
build_iOS()
{
ARCH=$1
if [ $ARCH == "i386" ] || [ $ARCH == "x86_64" ];
then
SDKROOT="$(xcodebuild -version -sdk iphonesimulator | grep -E '^Path' | sed 's/Path: //')"
else
SDKROOT="$(xcodebuild -version -sdk iphoneos | grep -E '^Path' | sed 's/Path: //')"
fi
export CC="$(xcrun -sdk iphoneos -find clang)"
export CFLAGS="-fembed-bitcode -isysroot $SDKROOT -arch ${ARCH} -miphoneos-version-min=9.0"
export LDFLAGS="-arch ${ARCH} -isysroot $SDKROOT"
if [ $ARCH == "i386" ] || [ $ARCH == "x86_64" ];
then
./configure --prefix=$XZPATH/build/iOS/$ARCH --host=i686-apple-darwin11 --disable-static --enable-shared
else
./configure --prefix=$XZPATH/build/iOS/$ARCH --host=arm-apple-darwin --disable-static --enable-shared
fi
make && make install && make clean
}
build_iOS i386
build_iOS x86_64
build_iOS armv7
build_iOS armv7s
build_iOS arm64
Thanks!
It looks like I cannot add bitcode to dylibs. I tried building several dylibs, then use otool -l path_to_dylib | grep bitcode to test if they contain any bitcode, all got nothing.
More evidence:
in Xcode(7.3.1), macOS (previously called OS X) targets don't have enable bitcode option in build settings
in the bitcode section of App Thinning, Apple didn't mentioned bitcode on macOS. Plus, App Thinning is only available on iOS, watchOS and tvOS.
I currently don't know why macOS apps don't have enable bitcode option in build setting. Maybe it's because Mac App store is not the only way for distributing mac apps? And people might copy one mac app from one mac app to another using USB sticks?
I was not able to verify bitcode in my bitcode enabled dynamic library via cmd line tools (otool, file or clang). Also comparing the diff between bitcode and non-bitcode build showed no difference, except the filesize.
Interestingly when using the dynamic library withouth bitcode enabled in an actual app and archiving xcode will fail to archive when I use the non-bitcode build:
ld: bitcode bundle could not be generated because '...' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture armv7
When building the dylib with bitcode enabled the filesize increases a lot and also xcode does not fail on archiving a sample project with bitcode enabled. So I am pretty sure that bitcode must be included in the dynamic lib, although we haven't found a way to verify that via cmd line tools yet...
I'm trying to compile a project developed in C language for iOS devices. It uses custom library file, libcurl, libcrypto, libssl and libpthread. I have successfully compiled it for Mac OS X, but having issues compiling it for iOS. Also, any help I try to find online is more of Xcode GUI help, and I need command line help for it. Need to compile it through commands instead of Xcode GUI.
First it needs to compile couple of C files, then make a static library file out of these compiled files, which further used when compiling a native binary.
This is how I generated iOS arm ouptut files from c files inside file01:
Store the iphoneos sdk path in environemnt variable:
CC="$(xcrun --sdk iphoneos9.2 --find clang) -isysroot $(xcrun --sdk iphoneos9.2 --show-sdk-path) -arch armv7 -arch armv7s -arch arm64 -arch armv6 -arch arm64"
Compile the c files in file01 with command:
$CC -c -O2 *.c
To check which architect these files are compiled for can be checked with this lipo command. Example:
$ lipo -info example_file01.o
Architectures in the fat file: example_file01.o are: armv7 armv7s armv6 arm64
To make a static library file I can get iOS ar file path using command:
$ xcrun --sdk iphoneos9.2 --find ar /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
I could store the path in an environment variable, but it was not working throwing error not recognising ar command arguments rcu. So, used the ar path instead to create the library file with this command:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar rcu ../output/libfile01.a *.o
If checking which architectures this lib file supports it gives this output:
$ lipo -info ../output/libfile01.a
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: archive with no architecture specification: ../output/libfile01.a (can't determine architecture for it)
But, it should have given output similar to this one:
$ lipo -info ../ios/lib/libcurl.a
Architectures in the fat file: ../ios/lib/libcurl.a are: i386 armv7 armv7s x86_64 arm64
This is causing error when trying compiling files in using the generated static lib file with command:
$CC -o ../output/FinalProjectFile -O2 *.c ../output/libfile01.a ../ios/lib/libcurl.a ../ios/lib/libssl.a ../ios/lib/libcrypto.a -lpthread -lm
Error: ld: warning: ignoring file ../output/libfile01.a, file was built for archive which is not the architecture being linked (armv7): ../output/libfile01.a
Thanks for help
I finally solved the issue by using different argument for ar.
Instead of using
$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar rcu ../output/libfile01.a *.o
used
$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar -rcs ../output/libfile01.a *.o
The only difference was it's -rcs instead of rcu.
When checking the info of this libfile it shows the output like this:
$ lipo -info ../output/libfile01.a
Architectures in the fat file: ../output/libfile01.a are: armv7 armv7s armv6 arm64
How can I install latest ffmpeg ios libraries armv7, armv7s, i386 and universal on Mac with 10.8?
After a couple of days I have made step by step instructions for this install:
FFmpeg Build Instructions MAC 10.8 or better
Copy ffmpeg-2.0.tar.bz2 (https://ffmpeg.org/releases/ffmpeg-1.0.7.tar.bz2, https://ffmpeg.org/download.html) and Unzip to Documents folder
Make sure you have the latest Command Line Tools under Xcode >; Preferences >; Downloads >; Components
Install gas-preprocessor
Click on the ZIP icon to download https://github.com/mansr/gas-preprocessor.
Copy gas-preprocessor.pl to /usr/bin directory.
Change permission of gas-preprocessor.pl by setting the privilege to Read & Write for all.
Bug in xcrun starting in version 10.8
open terminal and paste in following command and press enter:
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer/"
cd to ffmpeg-2 folder and paste in following command and press enter:
mkdir armv7
mkdir armv7s
mkdir i386
mkdir -p universal/lib
To config armv7s library paste in following command and press enter:
./configure --prefix=armv7s --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" --extra-cflags="-arch armv7s -mfpu=neon -miphoneos-version-min=6.1" --extra-ldflags="-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1" --arch=arm --cpu=cortex-a9 --enable-pic
(Note same rule as above: if config fails go to
Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
and make sure that the sdk folder is iPhoneOS6.1.sdk, if not change
the config command to reflect iPhoneOSx.x.sdk and change all targets
to x.x)
To build and install armv7s library paste in following command and press enter:
make clean && make && make install
To config i386 (so simulator will work ) library paste in following command and press enter:
./configure --prefix=i386 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc" --extra-cflags="-arch i386" --extra-ldflags="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk" --arch=i386 --cpu=i386 --enable-pic --disable-asm
(Note: this is not the same command as the previous two config
commands, if you just arrow up to them this will fail)
To build and install i386 library paste in following command and press enter:
make clean && make && make install
To make universal library ( which is the library added to xcode ) paste in following command and press enter:
cd armv7/lib
for file in *.a
do
cd ../..
xcrun -sdk iphoneos lipo -output universal/lib/$file -create -arch armv7 armv7/lib/$file -arch armv7s armv7s/lib/$file -arch i386 i386/lib/$file
echo "Universal $file created."
cd -
done
cd ../..
Support universal ffmpeg library for iOS7 and XCode5:
Make sure you have the latest Command Line Tools under Xcode >; Preferences >; Downloads >; Components
Install gas-preprocessor
Click on the ZIP icon to download https://github.com/mansr/gas-preprocessor.
Copy gas-preprocessor.pl to /usr/bin directory.
Change permission of gas-preprocessor.pl by setting the privilege to Read & Write for all.
Download my shell script from: https://gist.github.com/m1entus/6983547
Run sh build-ffmpeg.sh.
I needed arm64 support and this script worked for me: https://github.com/kewlbear/FFmpeg-iOS-build-script
Use
./build-ffmpeg.sh arm64 x86_64
for iOS 64-bit and simulator architecture. Then copy the contents in the "fat" directory into your Xcode project.
The only modification I made to the script was uncommenting this line:
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-avresample"
to compile the libavresample library.
Edit: It's not working with armv7 and armv7s however, using iOS 7.1 SDK. If I find a solution I'll post here.
For building ffmpeg iOS libraries you can use this little scripts.
Download ffmpeg source
Download https://github.com/wang-bin/build_ffmpeg
Open terminal and run export FFSRC=/path/to/ffmpeg
Goto build_ffmpeg folder and run: ./ios.sh
After successful building, result will be in sdk-ios folder
Add include folder and lib folder in your Xcode project
I want to use Assimp in my upcoming ios project but having hard time to make it work. I followed the instructions from this:
How to build ASSIMP Library for iOS (Device and Simulator) with boost-library?
But Terminal keep telling me this:
rm: CMakeCache.txt: No such file or directory
/Users/hengchinsoon/Desktop/assimp/port/iOS/build_ios.sh: line 40: cmake: command not found
Building armv6 library
make: *** No rule to make target `clean'. Stop.
make: *** No rule to make target `assimp'. Stop.
cp: ./lib/libassimp.a: No such file or directory
rm: CMakeCache.txt: No such file or directory
/Users/hengchinsoon/Desktop/assimp/port/iOS/build_ios.sh: line 51: cmake: command not found
Building armv7 library
make: *** No rule to make target `clean'. Stop.
make: *** No rule to make target `assimp'. Stop.
cp: ./lib/libassimp.a: No such file or directory
rm: CMakeCache.txt: No such file or directory
/Users/hengchinsoon/Desktop/assimp/port/iOS/build_ios.sh: line 62: cmake: command not found
Building i386 library
make: *** No rule to make target `clean'. Stop.
make: *** No rule to make target `assimp'. Stop.
cp: ./lib/libassimp.a: No such file or directory
rm: ./lib/libassimp.a: No such file or directory
So I checked the assimp root folder and found out that there isn't any lib folder(which from the github descriptions, that is for windows usage). So i just made lib folder and try again. But still not working.
Can anybody share with me which part I did wrongly? Thanks!
Say if I successfully install whatever I need to install, then how to really use the library?
Should I copy the lib/ios/ folder into my ios projects?
What I want to do is to import some .blend files then I can experiment on the shader and other cool stuffs.
I am decent ios developer and have basic understanding of OpenGL ES. Somehow the Assimp document confused me about what it does. I am not so sure if I don't understand Assimp at the core concept level or at the programming level. But I am still convinced that it is very flexible and powerful.
Thanks for helping.
I'm guessing that you are using the "buil_ios.sh" script, in that script there are a few errors.
You should first download Cmake from : Cmake Download
Install Cmake and then do the following.
First of all, I think that besides that output you are getting some message that tells you that some options that you put in the Cmake are not being used. That's because in the script the name of some vars are not well written.
Besides this, you should change the CMakeLists.txt file so you don't get an error while you try to build the library:
Define here the needed parameters
set (ASSIMP_SV_REVISION 1023) <-- It should be less than 1024.
set (ASSIMP_VERSION ${ASSIMP_VERSION_MAJOR}) <-- here you will find some parameters like this. (parameter0).(parameter1)...
Mac OS doesn't like to put names using this nomenclature: parameter0.parameter1.paramter.2.a I guess it's because of the '.'.
So after a long day I finally managed to build the library. Another options is to get the library compiled from the project openframeworks, the path it's this: "/addons/ofxAssimpModelLoader/libs/assimp/lib/ios/assimp.a"
Here you have a link to the library
There you can find the library already compiled for the arm6 arm7 and i386 architectures.
I'm going to put you the script modified here.
#!/bin/sh
# build.sh
#######################
# BUILD ASSIMP for iOS and iOS Simulator
#######################
BUILD_DIR="./lib/ios"
IOS_BASE_SDK="5.0"
IOS_DEPLOY_TGT="3.2"
setenv_all()
{
# Add internal libs
export CFLAGS="$CFLAGS"
export CPP="$DEVROOT/usr/bin/llvm-cpp-4.2"
export CXX="$DEVROOT/usr/bin/llvm-g++-4.2"
export CXXCPP="$DEVROOT/usr/bin/llvm-cpp-4.2"
export CC="$DEVROOT/usr/bin/llvm-gcc-4.2"
export LD=$DEVROOT/usr/bin/ld
export AR=$DEVROOT/usr/bin/ar
export AS=$DEVROOT/usr/bin/as
export NM=$DEVROOT/usr/bin/nm
export RANLIB=$DEVROOT/usr/bin/ranlib
export LDFLAGS="-L$SDKROOT/usr/lib/"
export CPPFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS
}
setenv_arm6()
{
unset DEVROOT SDKROOT CFLAGS CC LD CPP CXX AR AS NM CXXCPP RANLIB LDFLAGS CPPFLAGS CXXFLAGS
export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneOS$IOS_BASE_SDK.sdk
export CFLAGS="-arch armv6 -pipe -no-cpp-precomp -isysroot $SDKROOT -miphoneos-version-min=$IOS_DEPLOY_TGT -I$SDKROOT/usr/include/"
setenv_all
rm CMakeCache.txt
cmake -G 'Unix Makefiles' -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_ARM6_TOOLCHAIN.cmake -DENABLE_BOOST_WORKAROUND=ON -DBUILD_STATIC_LIB=ON -DASSIMP_BUILD_STATIC_LIB=ON
}
setenv_arm7()
{
unset DEVROOT SDKROOT CFLAGS CC LD CPP CXX AR AS NM CXXCPP RANLIB LDFLAGS CPPFLAGS CXXFLAGS
export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneOS$IOS_BASE_SDK.sdk
export CFLAGS="-arch armv7 -pipe -no-cpp-precomp -isysroot $SDKROOT -miphoneos-version-min=$IOS_DEPLOY_TGT -I$SDKROOT/usr/include/"
setenv_all
rm CMakeCache.txt
cmake -G 'Unix Makefiles' -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_ARM7_TOOLCHAIN.cmake -DENABLE_BOOST_WORKAROUND=ON -DBUILD_STATIC_LIB=ON -DASSIMP_BUILD_STATIC_LIB=ON
}
setenv_i386()
{
unset DEVROOT SDKROOT CFLAGS CC LD CPP CXX AR AS NM CXXCPP RANLIB LDFLAGS CPPFLAGS CXXFLAGS
export DEVROOT=/Developer/Platforms/iPhoneSimulator.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneSimulator$IOS_BASE_SDK.sdk
export CFLAGS="-arch i386 -pipe -no-cpp-precomp -isysroot $SDKROOT -miphoneos-version-min=$IOS_DEPLOY_TGT"
setenv_all
rm CMakeCache.txt
cmake -G 'Unix Makefiles' -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_i386_TOOLCHAIN.cmake -DENABLE_BOOST_WORKAROUND=ON -DBUILD_STATIC_LIB=ON -DASSIMP_BUILD_STATIC_LIB=ON
}
create_outdir()
{
for lib_i386 in `find $BUILD_DIR/i386 -name "lib*\.a"`; do
lib_arm6=`echo $lib_i386 | sed "s/i386/arm6/g"`
lib_arm7=`echo $lib_i386 | sed "s/i386/arm7/g"`
lib=`echo $lib_i386 | sed "s/i386\///g"`
echo 'Creating fat binary...'
lipo -arch armv6 $lib_arm6 -arch armv7 $lib_arm7 -arch i386 $lib_i386 -create -output $lib
done
echo 'Done! You will find the libaries and fat binary library in /lib/ios'
}
cd ../../
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR/arm6 $BUILD_DIR/arm7 $BUILD_DIR/i386
setenv_arm6
echo 'Building armv6 library'
make clean
make assimp -j 8 -l
cp ./lib/libassimp.a $BUILD_DIR/arm6/
setenv_arm7
echo 'Building armv7 library'
make clean
make assimp -j 8 -l
cp ./lib/libassimp.a $BUILD_DIR/arm7/
setenv_i386
echo 'Building i386 library'
make clean
make assimp -j 8 -l
cp ./lib/libassimp.a $BUILD_DIR/i386/
rm ./lib/libassimp.a
create_outdir
I read somewhere that an alternative to this is to use openframeworks since it already incorporate assimp lib.
http://www.openframeworks.cc/download/
look for ios version. and inside there is a folder contain example/ios/assimpExample/ folder would be a good starting point.
Have fun!:D
The boost root for me on Mac with the latest version of Homebrew is the following:
BOOST_ROOT=~/.homebrew/Cellar/boost/1.53.0
Your version of boost may be different, so the last folder will vary. But as of a recent homebrew version, Cellar gets install within the current user's home directory.
Can someone tell me, where to find a detailed guide, how to build the Boost-Libraries for using it on the iPhone-Device.
I've allready build the libs for Mac and can use them in my project (only on iPhone-Simulator). While building the project for iPhone-Device, XCode haunts me a warning: "file is not of required architecture" ond some other errors.
Please Help
Start a new project in Xcode using the iPhone Static Library project template.
Then import the source and headers, and compile it that way. The result should be an iPhone compatible static library
I started here:
http://lists.boost.org/boost-build/2009/02/21326.php
With most of Boost you probably don't need to actually compile it, just include the useful headers. In my case, I just did the compiler define in my own Xcode project.
Hey I have updated Pete Goodliffes script in my openFrameworks addon:
It currently has arm64, armv7, i386, x86_64
Boost 1.59.0 or previous
libc++ / std=c++11 -- Now optional release for libstdc++
Precompiled and Script to build yourself (so if you need libstdc++ quite easy to change)
Supports Xcode 7
[https://github.com/danoli3/ofxiOSBoost][1]
For boost libraries which have only headers files (.hpp) you can just set header search path from your project to them.
For boost libraries with sources you can build static libraries for both ios phone/simulator with next simple steps:
Download and unpack a boost release archive (from https://www.boost.org/users/download/) e.g.: https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2
Run bootstrap.sh with needed libraries to build for instance 'context' (format =library1,library2,...):
./bootstrap.sh --with-libraries=context
Add toolsets with correct paths to installed SDKs to project-config.jam:
# IOS ARM64
using clang : iphoneos
: xcrun clang -arch arm64 -stdlib=libc++ -std=c++11 -miphoneos-version-min=12.0 -fvisibility-inlines-hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
;
# IOS x86_64
using clang : iphonesimulator
: xcrun clang -arch x86_64 -stdlib=libc++ -std=c++11 -miphoneos-version-min=12.0 -fvisibility-inlines-hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
;
Create and run build.sh script (where lib name is libboost_<name>.a):
lib=libboost_context.a
dir='stage/lib'
# Build arm64
./b2 -a -j4 toolset=clang-iphoneos binary-format=mach-o abi=aapcs link=static stage
mv $dir/$lib $dir/arm64_$lib
# Build x86_64
./b2 -a -j4 toolset=clang-iphonesimulator binary-format=mach-o abi=sysv link=static stage
mv $dir/$lib $dir/x86_64_$lib
# Make fat
lipo -create $dir/arm64_$lib $dir/x86_64_$lib -output $dir/$lib
Now you have next compiled static libraries in "/stage/lib" dir for boost context: arm64_libboost_context.a, x86_64_libboost_context.a and fat one libboost_context.a.
We use boost too. To simplify its inclusion into new applications I have created a Xcode project you can drop into your workspace to include boost. It is based on a Makefile so you need the Xcode commandline tools installed.
The project is here https://github.com/Cogosense/iOSBoostFramework.
Clone the project into your workspace, then click on Menu File->"Add Files to workspace". Select iOSBoostFramework/iOSBoostFramework.xcodeproj in the file finder and click add.
The Makefile in the iOSBoostFramework directory controls what is built and how it is built. There is support for Xcode workspace dependencies, bitcode generation, and only the target architectures selected by Xcode are built.
The following libraries are built test, thread, atomic, signals, filesystem, regex, program_options, system date_time, serialization, exception, locale, and random.
All the separate libraries and architectures are combined, the final build output is a FAT boost.framework Framework bundle which can be linked into the application.
The version of boost is specified in the Makefile (currently 1.64.0), it is downloaded, built for all active architectures and installed in the BUILT_PRODUCTS_DIR specified by xcode.
The previous answer helped me when I wanted to build boost for the arm simulator. When you have a Mac with M1 processor and want to use the simulator, you cannot use the arm64 build for the iPhone.
I added this to the project-config.jam:
# IOS Arm Simulator
using clang : iphonesimulatorarm64
: xcrun clang -arch arm64 -stdlib=libc++ -std=c++11 -miphoneos-version-min=10.0 -fvisibility-inlines-hidden -target arm64-apple-ios10.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk ;
Then pass toolset=clang-iphonesimulatorarm64 to the b2 command.