Closed mobileben closed 7 years ago
Regarding my q about multi-threaded I sort of think yes, because of the threads setting. I'm just used to seeing boost libs with mt and non-mt variants.
I did also just find that if I just build the defaults (no --boost-libs) then it will build fine. Not sure if this is the intent but the libraries in Apple-Boost-BuildScript/build/boost/1.63.0/ios/prefix/lib only contain the iPhone architectures as opposed to including the simulator versions as well.
The fatal errors are being output because there are several boost libraries that aren't available on iOS (and tvOS). Part of the build scipt strips these out and uses the modified library list to bootstrap boost. However, that filtered list isn't making it to the phase builds libboost.a
(the 'super library' that contains all of the other binaries scrunched into one big one). The build isn't failing becaues of this and the resulting libraries all work just fine. I'll fix the script though so it doesn't try to run lipo on libraries it shouldn't.
Regarding the prefix directory only containing the iPhone arches and not the simulator, that is expected. The prefix directory is really only there so we can grab the headers. If you don't build the framework, you'll want to grab libboost.a
from each of the arch directories in the <platform>/build
directory, as well as the includes in <platform>/prefix/include
.
Oh, also, regarding your question about multi-threading, yes, this is build with multi-threading support. It's not explicitly in the call to b2
, but my understanding is that threading=multi
is the default.
Note that most of the lipo errors have been fixed, but there's still a problem with a few libraries (fiber, locale, and metaparse) where there's no apparent problem building them, but no binary is emitted. I'm not sure what the cause of this is yet. I'm doing some investigating and I'll either fix it or open another issue for that.
Thanks so much for getting to this quickly. And this repo was very helpful.
I hacked together a script to build the universal fat lib version. Something like this more or less:
libs=(atomic chrono date_time exception filesystem prg_exec_monitor program_options random signals system test_exec_monitor thread timer unit_test_framework)
for i in ${libs[@]}; do
echo $i
lipo ../../iphone-build/stage/lib/libboost_$i.a ../../iphonesim-build/stage/lib/libboost_$i.a -create -output libboost_$i.a
do
If you wanted I could fork and then put that somewhere so people could create a unified lib. I'd clean up the script of course and make it search the stage/lib
directory for the actual libs built and then submit a pull request. Or I could just do that and send you the cleaned up script.
Regarding multi-threaded, I looked at the build logs more carefully and it is indeed multi-threaded. In the event you do want the -mt, you can always add the --layout=tagged
to add it (you probably already know that). It may be helpful to more clearly identify that they are indeed multi-threaded.
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)