Boost logo

Boost-Build :

Subject: Re: [Boost-build] Building fat libraries on OSX
From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2016-12-11 15:51:43


Le 22/11/2016 à 13:59, Raffi Enficiaud a écrit :
> Le 22/11/2016 à 10:57, Raffi Enficiaud a écrit :
>> Hi all,
>>
>> Building fat libraries (i386, x64) on OSX does not seem to work as
>> expected with b2. I am using XCode 8 / Clang8.
>>
>> ../b2 toolset=clang address-model=32_64 architecture=x86 cxxflags="-arch
>> x86_64 -arch i386 -std=c++11 -stdlib=libc++" linkflags="-stdlib=libc++"
>> --prefix=`pwd`/../${build_folder} --without-log --layout=versioned
>> install
>>
>> - address-model=32_64 has no effect, I need to add "-arch x86_64 -arch
>> i386"
>>
>> - static libraries are fine:
>> $ lipo -info boost_1_62_0/lib/libboost_thread-clang-darwin42-mt-1_62.a
>> Architectures in the fat file: lib/libboost_thread-
>> clang-darwin42-mt-1_62.a are: x86_64 i386
>>
>> - shared libraries are not:
>> $ lipo -info
>> boost_1_62_0/lib/libboost_thread-clang-darwin42-mt-1_62.dylib
>> Architectures in the fat file: lib/libboost_thread-
>> clang-darwin42-mt-1_62.dylib are: x86_64
>>
>>
>> Does anyone has experience with this? I have the feeling that setting
>> "cxxflags" removes the effect of "address-model=32_64", can anyone
>> confirm?
>> how can I build boost with clang and C++11 mode?
>>
>> Thanks in advance,
>> Raffi
>>
>
> BTW, this is working when I do not specify the toolset, as mentioned here:
> http://stackoverflow.com/questions/19897761/how-to-make-boost-dylibs-universal-i386-x86-64-on-os-x
>
>
> so the toolset=clang is missing something.

Ping? I am still interested in having fat libraries on OSX.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk