Boost logo

Boost-Build :

From: Michael van der Westhuizen (r1mikey_at_[hidden])
Date: 2005-10-10 13:00:32


Hi Rush,

On 10/10/05, Rush Manbert <rush_at_[hidden]> wrote:
> Hi,
>
> This was originally posted on the Boost Users list, but Gennadiy
> Rozental suggested that I should post here, as he suspects a problem in
> the Darwin tool set support.

Tiger is quite different to previous versions due to GCC 4. Quite a
few of the tricks people were using will not work any more on Tiger,
and the linker is ridiculously strict. My input on this problem
below...

> When building Boost 1.33.0 on Mac OSX 10.4, using gcc 4.0, the build
> fails to link 6 targets. The attached zip file contains two build output
> transcripts. The big one is for everything, and the smaller one is from
> when I tried a second time. Each time, I built with this command
> (modified for output filename):
>
> bjam -sTOOLS=darwin --layout=versioned
> --prefix=/Users/rmanbert/Builds/Boost/boost_1_33_0/prefix
> --exec-prefix=/Users/rmanbert/Builds/Boost/boost_1_33_0/exec-prefix
> --builddir=/Users/rmanbert/Builds/Boost/boost_1_33_0 | tee
> /Users/rmanbert/Builds/Boost/boost_1_33_0/BoostBuildOutput_1_33_0_Full.txt
>
> - Rush

I took a quick look at the logs you sent, and at the 1.33.0
darwin-tools.jam, and I'd suggest that instead of calling ar/ranlib
and ld directly, the toolset should use libtool (it's not GNU libtool)
and g++ directly.

I submitted changes to ACE recently to get ACE+TAO building on MacOS
10.4, the gist of which were:

Use 'g++ -fno-common -dynamiclib -flat_namespace' as the linker
Use '-fno-common' as an argument to g++ (for shared objects)
Use 'libtool -static' as the archive linker

In my private build system I use the following basic flags:

C Archiver: libtool
C Linker: gcc
C Dynamic linker: gcc

C++ Archiver: libtool
C++ Linker: g++
C++ Dynamic linker: g++

C and C++ PIC Flags: -fPIC -fno-common

C and C++ Dynamic linker flags: -fPIC -fno-common -dynamiclib
-undefined dynamic_lookup -Wl,-install_name,lib$(PROJECT).$(SOEXT)
(where PROJECT is the library name and SOEXT is .dylib)

C Archiver flags: -static

I hope this helps a bit. I would update the Jamfile and submit it, but
I haven't been building Boost on OSX (yet - headers only for now), and
Boost.Build never ceases to defeat me when I try to do anything in it
(which is why I'm on this list - trying to learn!)

I'd be happy to work with any Boost.Build contributer to help improve
the quality of Darwin support.

Regards,
Michael

 


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