Boost logo

Boost-Build :

Subject: Re: [Boost-build] --layout=system for *nix vendors
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-11-03 01:33:46


On Monday 03 November 2008 07:00:29 Steve M. Robbins wrote:
> On Wed, Oct 29, 2008 at 07:27:59PM +0300, Vladimir Prus wrote:
> > On Wednesday 29 October 2008 18:03:32 Philipp Thomas wrote:
>
> > > Using layout=system isn't an option as that also results in sonames that
> > > aren't really usable.
>
> > I presume you actually want version in soname. Look how it's done in versioned branch:
> >
> > result = $(result).$(BOOST_VERSION) ;
> >
> > If you replicate this, you'll get:
> >
> > libboost_whatever.so.1.36.1
> >
> > or something -- which seems about right.
>
> That seems about right, except that the multithreaded variant will be
> named libboost_whatever. On the other hand, the default Boost
> installation (i.e. using --layout=versioned) includes <threading> so
> that the single threaded variant (if built) is named libboost_whatever
> while the multithreaded one is named libboost_whatever-mt.
>
> This seems likely to cause confusion with Jamfiles, autoconf macros
> and CMake macros that attempt to find the right library name. On
> some systems -lboost_whatever is single-threaded while on others
> it is multithreaded.
>
> How about the following change, which retains <base> <threading>
> <runtime> for --layout=system but also appends $(BOOST_VERSION) when
> appropriate?

So, with --layout=system we will get names like:

        libboost_filesystem-mt.so.1.37.0

? I believe this is step in the right direction. Philipp, what do you think?

Personally, I think believe we should drop threading and always build with MT mode,
as that's what other libraries seem to be.

> I'm putting the entire rule here, since the diff is actually larger
> (and harder to read):
>
> # This rule is called by Boost.Build to determine the name of target. We use it
> # to encode the build variant, compiler name and boost version in the target
> # name.
> #
> rule tag ( name : type ? : property-set )
> {
> if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
> {
> local result = [ common.format-name
> <base> <threading> <runtime> -$(BUILD_ID)
> : $(name) : $(type) : $(property-set) ] ;
>
> if $(layout) = versioned
> {
> result = [ common.format-name
> <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
> -$(BUILD_ID)
> : $(name) : $(type) : $(property-set) ] ;
> }

I'd prefer the above to be if/else, but that's a detail -- as soon we agree what we
want I'll adjust it.

Thanks,
Volodya


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