Boost logo

Boost-Build :

From: Frank Birbacher (bloodymir.crap_at_[hidden])
Date: 2008-06-08 14:18:41


Hi Jurko!

Jurko Gospodnetić schrieb:
> Hi Frank.
>
> Ok, I finally got some time to play around with this some more.

Great! I appreciate it! :D

> Now since in your model you link to the date_time library twice -
> once as a static library and once as a shared library it is
> understandable why this does not link

Right. But ...

> On the other hand, I do not understand why GCC compiles. It has
> equivalent symbols defined in CommonLib static library and the date_time
> shared library but somehow manages to choose which symbols to map.

I think the date_time lib which is statically linked into the CommonLib
might not actually export its symbols. And thus it would not interfere
with the date_time lib on "top level".

Or the linker can track from which file these symbols come originally
and sees they are the same and thus issues no error.

> I tried working around the problem by forcing CommonLib to link to the
> shared date_time library by setting the <link>shared property explicitly
> for the Utils alias when listing it as a source for the CommonLib
> target. That gave me the following diagram (explicitly marked targets
> whose <link> property changed from the previous example using
> ***NOW-SHARED***):
[snip]
> Unfortunately this did not make MSVC build successfully either even
> though it uses only a single shared date_time library.

I think this is due to the fact: on windows there is a "fake" shared
linking. Shared linking is done by statically linking to an "import lib"
which only has function stubs and which loads the DLL on startup. Thus
there are duplicate symbols again (two import libs statically linked,
same problem as before).

> I then tried reproducing an equivalent problem using only shared
> libraries by without using boost libraries and was unsuccessful. I could
> not get it to fail... and whatever I did the behavior was 'logical' and
> build either failed on both gcc & msvc or succeeded on both. I'll try
> again when I get enough time to trim down the boost library sources.

Oho, sounds interesting. I await your results! :)

> I'll let you know when I get time to look into this again. So far I
> have not been able to look into your 'bundle' construct.

Meanwhile I substituted more of my "libs" by "bundles". I can now build
the whole project with link=shared,static. :) This is important for work.

Thank you for looking into this problem! I try to establish use of bjam
instead of make. Easy usage of bjam is absolutely necessary for this.

Regards,
Frank


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