Boost logo

Boost Users :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2007-05-24 19:38:25


Braden McDaniel wrote:
> Rene Rivera wrote:
>
> [snip]
>
>> The libs versioned creates are internally versioned. It only creates
>> *links/copies* with the unversioned names.
>
> Yes; it's exactly this copy that I'd like to suppress. Is there a way to
> do that? (Brutal modifications to the Boost build infrastructure are
> welcome suggestions; I just need some direction here.)

Open up boost-root/Jamfile.v2 and comment out, or delete, these lines:

     generate stage-unversioned : stage-proper :
       <generating-rule>@make-unversioned-links ;
     explicit stage-unversioned ;

     generate install-unversioned : install-proper :
       <generating-rule>@make-unversioned-links ;
     explicit install-unversioned ;

>> For example, in Windows, if
>> you link to the unversioned DLL link library (boost_*.lib), the
>> resulting binary will depend on the versioned DLLs. Same applies on the
>> Unix side.
>
> I don't think so. Looking at Solaris, anyway:
>
> $ ls -shF lib/libboost_thread*
> 1.0K lib/libboost_thread-sw-mt-d-1_34.so@
> 240K lib/libboost_thread-sw-mt-d-1_34.so.1.34.0*
> 240K lib/libboost_thread-sw-mt-d.so*
>
> That's after building with "variant=debug link=shared threading=multi".
> The first listed there is a symlink; the latter two are not. I'm
> reasonably sure that if I linked against the last one in this listing,
> that dependency is exactly what I'd get.

That would be a mistaken expectation ;-) Note that those last two are
exactly the same size. They aren't copies and rebuilt libs. They are
hard-links to the same inode. As in it executes:

     ln libboost_thread-sw-mt-d-1_34.so.1.34.0 libboost_thread-sw-mt-d.so

Hence the soname in the library is still the versioned in both. Which is
what ELF, and others, will use to reference to link in the future to the
library. Of course the soname only applies to platforms which have such
support. So your statement may be true in some minority of platforms.
Additionally, for Windows, the link library that matches the DLL refers
to the versioned DLL, since it's just a copy of the versioned link library.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net