Boost logo

Boost-Build :

From: Daniel Schlyder (daniel_at_[hidden])
Date: 2004-08-22 10:46:25


Toon Knapen:
> Since version 1.134 of boost/tools/build/v1/boost-base.jam (created on
> the 12th of August) the libraries (specified by means of <find-library>
> in the requirements section of the exe) are sorted lexicographically. On
> almost all platforms however (windows is an exception I believe) all
> libraries need to be in a specific order. Until version 1.133 of
> boost-base.jam the order in the Jamfile was respected in the link-line.

> I tried to understand which modif actually performs this sort but my
> understanding of bjam language is not sufficient yet ;-(

Found this in gcc-tools.jam:

<quote>
# for gcc, we repeat all libraries so that dependencies are always resolved
actions gcc-Link-action bind NEEDLIBS NEEDIMPS
</quote>

The comment is incorrect. Only NEEDLIBS are repeated; FINDLIBS are not.
Repeating FINDLIBS would fix linking on GCC. Not sure if this could be
considered a fix or just an ugly work-around, but I think it would be good to
add this to remove link order problem completely. Order in requirements section
wasn't respected fully before this latest bjam change, anyway. For example,
I've got the following code:

mingw_gcc = mingw gcc ;
debug_release = debug release ;
<$(mingw_gcc)><$(debug_release)><find-library>alogg
<$(mingw_gcc)><debug><find-library>alld_s
<$(mingw_gcc)><release><find-library>alleg_s
If order in Jamfile was respected (or didn't matter), I could rewrite it as

<find-library>alogg
<debug><find-library>alld_s
<release><find-library>alleg_s
Nicer, don't you think?

Oh well, maybe this is handled much better in BBv2. Is anyone working on adding
support for MinGW to v2?

--
Daniel Schlyder
http://bitblaze.com/ ------------7E113152EA8B6C6 Content-Type: application/octet-stream; name="bbv1-gcc_link_order.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bbv1-gcc_link_order.diff"
[Attachment content not displayed.] ------------7E113152EA8B6C6-- 

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