OSX Snow Leopard: Build boost 1.47.0 for 32 and 64 bit

I'm going crazy ... I'm currently trying to upgrade my project from 1.44.0 to 1.47.0 on the osx snow leopard. I want to build it with the following command:

./b2 macosx-version=10.6 link=static address-model=32_64 threading=multi stage

where I expect it to give me a static vein assembly that supports i386 as well as x86_64. In any case, obviously this is not the case, because if I request lipo -infofrom the received libs, they are all x86_64.- What can I do to solve this problem? Could the script build be broken?

+5
source share
6 answers

I got it to work using this assembly:

./b2 link = static threading = multi toolset = darwin cxxflags = "- arch i386 -arch x86_64" macosx-version = 10.6 stage

+2

, .

./b2 link=static threading=multi toolset=darwin cxxflags="-arch i386 -arch x86_64" target-os=darwin address-model=32_64 stage
+2

, Boost 1.49 MacOSX 10.6, , architecture = x86, address-model = 32_64.

+1

, 32- 64- . , , , , :

./b2 threading=multi toolset=darwin architecture=x86 target-os=darwin address-model=32_64 stage

1.51.0 Mountain Lion.

+1

"", :

./b2 macosx-version=10.6 link=static address-model=32_64 architecture=combined threading=multi stage
0
source

I had problems creating combined 32/64 versions, and eventually they started building two separately (I had to add the cxx -arch i386 flag to the 32-bit assembly) and use lipo to combine them. For instance:

./bjam link=static release install address-model=32 --prefix=$prefix_dir-x86" --python-buildid=2.7 python=2.7 --with-python cxxflags="-fPIC -Wfatal-errors -arch i386" -s NO_BZIP2=1 -s NO_ZLIB=1
./bjam link=static release install address-model=64 --prefix=$prefix_dir-x64" --python-buildid=2.7 python=2.7 --with-python cxxflags="-fPIC -Wfatal-errors" -s NO_BZIP2=1 -s NO_ZLIB=1
lipo $prefix_dir-x86/lib/libboost_python-2_7.a $prefix_dir-x64/lib/libboost_python-2_7.a -output $prefix_dir-universal/libboost_python-2_7.a -create

Given that I still have 64-bit binaries (when I requested 32-bit), before adding "-arch i386", I suspect there is a problem with the bjam / b2 build script for 32-bit binaries on macos

0
source

All Articles