|
Boost-Build : |
Subject: Re: [Boost-build] vacpp.jam
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-03-13 15:13:16
On Friday 13 March 2009 20:48:49 Jim Hague wrote:
> I just updated an elderly BBv2 install to the current Subversion, and I'm
> having a couple of problems with vacpp.jam.
Hi Jim,
> 1. Including a external pre-built static library gives me
>
> Error: ambiguity found when searching for best transformation
> Trying to produce type 'LIB' from:
> Generators that succeeded:
> - builtin.prebuilt
> - vacpp.prebuilt
> First generator produced:
> - { /usr/local/lib/liblog4cplus.a.STATIC_LIB }
> Second generator produced:
> - { /usr/local/lib/liblog4cplus.a.STATIC_LIB }
>
> Blundering about somewhat at random, I found that the following patch
> allowed compilation to proceed. But I must admit I have no real
> understanding of what is going on here; I'm hoping some who knows the code
> can explain.
>
> diff -r 5b628f6ec088 boost-build/tools/vacpp.jam
> --- a/boost-build/tools/vacpp.jam Fri Mar 13 16:42:46 2009 +0000
> +++ b/boost-build/tools/vacpp.jam Fri Mar 13 17:30:22 2009 +0000
> @@ -16,7 +16,8 @@
>
> feature.extend toolset : vacpp ;
> toolset.inherit vacpp : unix ;
> -generators.override vacpp.prebuilt : builtin.lib-generator ;
> +generators.override vacpp.prebuilt : builtin.prebuilt ;
> generators.override vacpp.searched-lib-generator : searched-lib-generator
> ;
This is the right fix. I've checked it in in SVN.
> 2. My project fails to build properly because a build tool built during the
> build, which links against some component libraries, apparently has some of
> those components removed.
>
> The offender is the '-qtwolink' link option. The docs at
> http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/index.jsp?topic=/co
>m.ibm.vacpp7a.doc/compiler/ref/ruopttwo.htm describe this option; in brief,
> it causes the linker to attempt to 'minimize the number of static
> constructors included from libraries and object files. [...] All static
> constructors in .o files and object files are invoked. This generates
> larger executable files, but ensures that placing a .o file in a library
> does not change the behavior of a program.'
>
> I suggest that this should only be applied by vacpp.jam as an option; I
> think it too aggressive for a universal link option.
I must admit I don't understand neither the problem your had, nor the
linker option. But if you say this option breaks builds, then so it does :-)
I've removed it, in SVN HEAD. Can you update and see if things are better?
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