building boost 1.39 on iphone os3.0
Hi, I understand a lot of effort is being spent on making boost easy to compile and so on but as far as my experience goes, that's always a bit painful... So here's what I'm going to do as a background task: I'm going to play it dumb (eg. not spend 30 minutes on the web everytime I hit something) and tell you all about it :-) My goal here is to compile boost 1.39 on the iphone os3.0. Note that I already compiled 1.38 on os21 and os30 so I have gathered some experience already, but as I said, I'm playing it dumb. So: - getting boost from the web, uncompress and so on - boostrap, so far so good - add my user-config with: ################################################################# # Compiler configuration using darwin : 4.0.1~iphone : /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch arm : <striper> : <architecture>arm <target-os>iphone <macosx-version>iphone-3.0 ; using darwin : 4.0.1~iphonesim : /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 : <striper> : <architecture>x86 <target-os>iphone <macosx-version>iphonesim-3.0 ; ################################################################# - and type ./bjam BUT, here we go, first problem, my user-config.jam seems to be ignored. the compiler used is "g++": "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" still the doc says: On startup, Boost.Build searches and reads two configuration files: site-config.jam and user-config.jam. On top of that, the project-config.jam file says: # Compiler configuration. This definition will be used unless # you already have defined some toolsets in your user-config.jam # file. if ! darwin in [ feature.values <toolset> ] { using darwin ; } Anybody get any idea? Frank
gtsml owevwr wrote:
Hi,
I understand a lot of effort is being spent on making boost easy to compile and so on but as far as my experience goes, that's always a bit painful... So here's what I'm going to do as a background task: I'm going to play it dumb (eg. not spend 30 minutes on the web everytime I hit something) and tell you all about it :-)
My goal here is to compile boost 1.39 on the iphone os3.0. Note that I already compiled 1.38 on os21 and os30 so I have gathered some experience already, but as I said, I'm playing it dumb.
So: - getting boost from the web, uncompress and so on - boostrap, so far so good - add my user-config with:
At what location?
BUT, here we go, first problem, my user-config.jam seems to be ignored. the compiler used is "g++": "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2"
still the doc says: On startup, Boost.Build searches and reads two configuration files: site-config.jam and user-config.jam.
If you put user-config.jam in your home directory, things should work. - Volodya
thanks, Ok, looking at the resulting libs, I realized that the gcc version in my ~/user-config.jam file was wrong, here's the new one: ################################################################# # Compiler configuration using darwin : 4.2.1~iphone : /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch arm : <striper> : <architecture>arm <target-os>iphone <macosx-version>iphone-3.0 ; using darwin : 4.2.1~iphonesim : /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 : <striper> : <architecture>x86 <target-os>iphone <macosx-version>iphonesim-3.0 ; ################################################################# Ok, I wanted to play it dumb, but here is a shortcut. An estimate is that each option in the following incantation took me 30 minutes of search on the net. So here is the command line I used to build boost for the iphone device (as opposed to the simulator) ./bjam toolset=darwin architecture=arm target-os=iphone macosx-version=iphone-3.0 link=static threading=single define=_LITTLE_ENDIAN include=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/armv6-apple-darwin9 Compilation succeded, so that's all good. I still three questions thought: 1) couldn't I make the command line shorter? maybe by migrating some of the stuff in the last command line to the user-config.jam? If so, an example would be great (for the include option for instance) 2) I'm now worrying a bit about the name of the generated lib: libboost_filesystem-xgcc42-1_39.a Is that what I should expect? On boost 1.38.0, it was libboost_filesystem.a 3) Btw, how do I know which compiler (exact path) I'm using for sure because all I can see is "darwin.compile.c++"? Thanks, Frank
gtsml owevwr wrote:
thanks,
Ok, looking at the resulting libs, I realized that the gcc version in my ~/user-config.jam file was wrong, here's the new one:
################################################################# # Compiler configuration using darwin : 4.2.1~iphone : /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch arm : <striper> : <architecture>arm <target-os>iphone <macosx-version>iphone-3.0 ; using darwin : 4.2.1~iphonesim : /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 : <striper> : <architecture>x86 <target-os>iphone <macosx-version>iphonesim-3.0 ; #################################################################
Ok, I wanted to play it dumb, but here is a shortcut. An estimate is that each option in the following incantation took me 30 minutes of search on the net.
So here is the command line I used to build boost for the iphone device (as opposed to the simulator)
./bjam toolset=darwin architecture=arm target-os=iphone macosx-version=iphone-3.0 link=static threading=single define=_LITTLE_ENDIAN
include=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/armv6-apple-darwin9
Compilation succeded, so that's all good. I still three questions thought:
1) couldn't I make the command line shorter? maybe by migrating some of the stuff in the last command line to the user-config.jam? If so, an example would be great (for the include option for instance)
If you have project-config.jam created already, you can add: project : requirements <include>/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/armv6-apple-darwin9 ; to it.
2) I'm now worrying a bit about the name of the generated lib: libboost_filesystem-xgcc42-1_39.a Is that what I should expect? On boost 1.38.0, it was libboost_filesystem.a
You have have used --layout=system previously, with 1.38.
3) Btw, how do I know which compiler (exact path) I'm using for sure because all I can see is "darwin.compile.c++"?
bjam -n <other options> - Volodya
project : requirements
Actually, in the case of this include, that should be ideally added at the toolset level (that's not project specific, that's compiler specific). That could be added at a project level but depending on which toolset is used then. Ok, it might be time for me to dive into the boost.build doc... Thanks a *lot* for your help, Frank
participants (2)
-
gtsml owevwr
-
Vladimir Prus