|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-05-30 01:34:25
On Monday 26 May 2008 17:25:37 Anthony Novatsis wrote:
> Dear All,
>
> I am currently trying to create a shared library using boost-build with
> version naming so that ldconfig will automatically create the necessary
> symbolic links after installation. Normally, the [gcc] command line for
> this is something similar to the following.
>
> gcc -shared -Wl,-h,libstuff.so.0 -o libstuff.so.0.0 stuff.o -lc
>
> whereby a shared library called libstuff.so.0.0 will be created and then
> when ldconfig is executed (with appropriate path setup), the symbolic link
> libstuff.so.0 will be created which points to the libstuff.so.0.0 file.
>
> Using boost-build, I have created a tag rule which modifies the name of the
> shared library (type SHARED_LIB) to include the version number which
> correctly modifies the soname to the name returned from the rule (with major
> version number). The resulting command line is as follows:
>
> "g++" -o "bin/gcc-4.1.1/release/libstuff.so.0" -Wl,-h -Wl,libstuff.so.0
> -shared -Wl,--start-group "bin/gcc-4.1.1/release/stuff.o" -Wl,--end-group
> -Wl,--strip-all
>
> However, as seen above, it also modifies the object name to the same value.
> What I need is to modify the object name to a different value (with the
> major and minor version numbers). The desired command line is as follows:
>
> "g++" -o "bin/gcc-4.1.1/release/libstuff.so.0.0" -Wl,-h -Wl,libstuff.so.0
> -shared -Wl,--start-group "bin/gcc-4.1.1/release/stuff.o" -Wl,--end-group
> -Wl,--strip-all
>
> Does anybody know how I achieve this with boost-build?
I don't think it's possible currently, but I can implement this. What option
would be better:
- A way to specify the exact soname (parameter to -h)
- A way to say how many elements must be stripped -- either 0, so
that soname would be libstuff.so.0.0, or 1, so that soname would be libstuff.so.0
or 2 (which does not make sense in your case, but will help for libraries using
3-component version).
- Volodya
>
> Any help would be appreciated.
>
> Regards,
> Anthony
>
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