|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-01-15 05:02:54
Rene Rivera wrote:
> In trying to get the regression tests working better on OpenBSD I ran into
> an interesting problem.
>
> The OpenBSD linker requires that shared libraries have version numbers.
> Right now this problem manifests itself in the thread test failing to link.
> To be clear here's an example:
>
> If one has:
>
> libfoo.so
>
> And does a:
>
> g++ ... -L"." -lfoo
>
> It fails to find the library. But if you have:
>
> libfoo.so.0.0
> [or]
> libfoo.so.0.0.0
>
> Then the link succeeds.
>
> To say the least this is a pain in the ass :-(
I'm afraid that this statement applies to libraries in general.
> So two questions come to mind:
>
> 1. Do I "fix" this in BBV1; by providing a version number of "0.0" when none
> is given on OpenBSD platform?
So the users would end up with libfoo.so.0.0 symlink, pointing to libfoo.so ?
I think it's reasonable.
> 2. Do we have anything in the design of BBV2 to handle such a platform
> requirement?
I need to understand how this should be handled, first. There's a rule/action
pair gcc.link-dll. I think version numbers should be handled by them?
So, you'd have
toolset.flags gcc VERSION_NUMBER : version-number ;
and
actions gcc.link-dll
{
<ordinary-stuff>
ln -s $(<) $(<).$(VERSION_NUMBER)
}
The last line should be tweaked to expand to nothing with VERSION_NUMBER
is empty, but you get the idea. Then, on all platforms but OpenBSD,
the default value of VERSION_NUMBER will be "", and on OpenBSD it will be
"0.0". Will that work?
- 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