You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2004/10/09 17:29:17 UTC
Subversion library version numbers
I'm using trunk@HEAD but I assume the following applies to the
branches as well:
$ svn --version | grep ^svn
svn, version 1.2.0 (dev build)
Look at this
$ objdump -p svn | grep libsvn_fs
NEEDED libsvn_fs-1.so.0
NEEDED libsvn_fs_fs-1.so.0
NEEDED libsvn_fs_base-1.so.0
$ objdump -p objdump -p libsvn_fs-1.so|grep SONAME
SONAME libsvn_fs-1.so.0
Is that .so.0 correct? Should it be .so.1?
Also look at this
$ ls libsvn_fs*
libsvn_fs-1.la libsvn_fs_base-1.la libsvn_fs_fs-1.la
libsvn_fs-1.so libsvn_fs_base-1.so libsvn_fs_fs-1.so
libsvn_fs-1.so.0 libsvn_fs_base-1.so.0 libsvn_fs_fs-1.so.0
libsvn_fs-1.so.0.0.0 libsvn_fs_base-1.so.0.0.0 libsvn_fs_fs-1.so.0.0.0
Is libsvn_fs-1.so.0.0.0 correct? Should it be libsvn_fs-1.so.1.2.0?
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Subversion library version numbers
Posted by Arkadiusz Miskiewicz <ar...@pld-linux.org>.
On Saturday 09 of October 2004 19:29, Philip Martin wrote:
> I'm using trunk@HEAD but I assume the following applies to the
> branches as well:
>
> $ svn --version | grep ^svn
> svn, version 1.2.0 (dev build)
[...]
> SONAME libsvn_fs-1.so.0
soname is for ABI versioning and it's unrelated to program versioning.
--
Arkadiusz MiĆkiewicz PLD/Linux Team
http://www.t17.ds.pwr.wroc.pl/~misiek/ http://ftp.pld-linux.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Subversion library version numbers
Posted by Joe Orton <jo...@manyfish.co.uk>.
On Sat, Oct 09, 2004 at 09:56:36PM +0100, Philip Martin wrote:
> Greg Hudson <gh...@MIT.EDU> writes:
>
> > As I understand it, symbol versioning would allow people to successfully
> > link against consumers of two different major versions of our
> > libraries. (The OSX two-level namespace would allow the same, I
> > believe.)
>
> That's right. I think we could also use it to prevent the internal
> svn_xxx__yyy symbols leaking out, although that may well require
> changes to the way the test suite is linked.
I've tried writing patches for this a few times using libtool's
-export-symbols-regex as attached, it's a little tricky coming up with a
good regex which defines only the public symbol names but not the __,
maybe I overcomplicated; and it reveals quite a few cases which strictly
look like interface violations currently:
add-cmd.o(.text+0x69): In function `svn_cl__add':
subversion/clients/cmdline/add-cmd.c:60: undefined reference to `svn_error__locate'
... and quite a few more like that in various places
log-cmd.o(.text+0x2d8): In function `log_message_receiver':
subversion/clients/cmdline/log-cmd.c:258: undefined reference to `svn_sort__hash'
ls-cmd.o(.text+0x19): In function `print_dirents':
subversion/clients/cmdline/ls-cmd.c:45: undefined reference to `svn_sort__hash'
subversion/libsvn_fs_fs/.libs/libsvn_fs_fs-1.so: undefined reference to `svn_txdelta__apply_instructions'
subversion/libsvn_fs_base/.libs/libsvn_fs_base-1.so: undefined reference to `svn_txdelta__copy_window'
subversion/libsvn_fs_fs/.libs/libsvn_fs_fs-1.so: undefined reference to `svn_txdelta__compose_windows'
Re: Subversion library version numbers
Posted by Philip Martin <ph...@codematters.co.uk>.
Greg Hudson <gh...@MIT.EDU> writes:
> As I understand it, symbol versioning would allow people to successfully
> link against consumers of two different major versions of our
> libraries. (The OSX two-level namespace would allow the same, I
> believe.)
That's right. I think we could also use it to prevent the internal
svn_xxx__yyy symbols leaking out, although that may well require
changes to the way the test suite is linked.
> That's a win, but I don't really know how it works, and I didn't
> think there was a portable way of doing it.
It's not portable. Some stuff here
http://people.redhat.com/drepper/dsohowto.pdf (Section 3, page 31)
I'd probably use an autoconf test to identify platforms that support a
linker version script. That should get Linux and BSD, and perhaps
other platforms using GNU ld. I believe the native Solaris tools
could use the same script, although I think they require different
command line options.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Subversion library version numbers
Posted by Greg Hudson <gh...@MIT.EDU>.
On Sat, 2004-10-09 at 15:30, Philip Martin wrote:
> It appears that we have reduced an X.Y.Z triplet, as used by
> libfoo.so.X.Y.Z, down to a single X as used by libfoo-X.so. I guess
> that works so long as we follow our ABI versioning rules.
Right; moreover, we can't do any better, at least for ELF systems. The
part of the library filename outside of the soname doesn't actually do
anything, as far as I know.
> I wonder if we should start using ELF symbol versioning within the
> libraries? I guess the test suite might need tweaking as I think it
> calls one or two internal library functions.
As I understand it, symbol versioning would allow people to successfully
link against consumers of two different major versions of our
libraries. (The OSX two-level namespace would allow the same, I
believe.) That's a win, but I don't really know how it works, and I
didn't think there was a portable way of doing it.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Subversion library version numbers
Posted by Philip Martin <ph...@codematters.co.uk>.
Greg Hudson <gh...@MIT.EDU> writes:
> On Sat, 2004-10-09 at 13:29, Philip Martin wrote:
>> $ objdump -p objdump -p libsvn_fs-1.so|grep SONAME
>> SONAME libsvn_fs-1.so.0
>>
>> Is that .so.0 correct? Should it be .so.1?
>
> If we are following http://apr.apache.org/versioning.html then we don't
> use the libtool major version number, instead making our major version
> part of the library name. (This way you can explicitly link against a
> particular major version of the library.)
>
>> Is libsvn_fs-1.so.0.0.0 correct? Should it be
>> libsvn_fs-1.so.1.2.0?
>
> If we are following the above-referenced document, then it should be
> libsvn_fs-1.so.0.2.0. But I don't know if there's any particular value
> in that, since the trailing ".2.0" isn't part of the soname.
> In fact, it seems like it would be detrimental; if you install svn 1.0
> and then install svn 1.1, you'd have leftover gunk from the 1.0
> installation which isn't used by either the compile-time or run-time
> linkers. (And you wouldn't have the corresponding headers to use those
> old libraries either.)
Removing the old versions would be the job of a distribution's package
management system. I agree it would be a problem for anyone
installing from source.
It appears that we have reduced an X.Y.Z triplet, as used by
libfoo.so.X.Y.Z, down to a single X as used by libfoo-X.so. I guess
that works so long as we follow our ABI versioning rules.
I wonder if we should start using ELF symbol versioning within the
libraries? I guess the test suite might need tweaking as I think it
calls one or two internal library functions.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Subversion library version numbers
Posted by Greg Hudson <gh...@MIT.EDU>.
On Sat, 2004-10-09 at 13:29, Philip Martin wrote:
> $ objdump -p objdump -p libsvn_fs-1.so|grep SONAME
> SONAME libsvn_fs-1.so.0
>
> Is that .so.0 correct? Should it be .so.1?
If we are following http://apr.apache.org/versioning.html then we don't
use the libtool major version number, instead making our major version
part of the library name. (This way you can explicitly link against a
particular major version of the library.)
> Is libsvn_fs-1.so.0.0.0 correct? Should it be
> libsvn_fs-1.so.1.2.0?
If we are following the above-referenced document, then it should be
libsvn_fs-1.so.0.2.0. But I don't know if there's any particular value
in that, since the trailing ".2.0" isn't part of the soname.
In fact, it seems like it would be detrimental; if you install svn 1.0
and then install svn 1.1, you'd have leftover gunk from the 1.0
installation which isn't used by either the compile-time or run-time
linkers. (And you wouldn't have the corresponding headers to use those
old libraries either.)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org