[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] libsvn SONAMEs and APR

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2006-03-31 18:32:25 CEST

Peter Samuelson <peter@p12n.org> writes:

> If other developers could read the above messages and weigh in, that
> would be great. I'm happy to answer any further questions.

Consider some program/library/module foo that uses Subversion but
doesn't get upgraded when the system gets upgraded. Now foo might be
explicitly linked to both libsvn and libapr, or it may be linked to
libsvn only (Subversion itself has examples of both).

If we don't change the soname:

Case 1:
  - foo linked against subversion/apr-0.9
  - foo has libsvn in the NEEDED section
  - system upgrades to new subversion/apr-1.x
  - foo runs and fails due to ABI incompatibility

Case 2:
  - foo linked against subversion/apr-0.9
  - foo has libsvn and libapr in the NEEDED section
  - system upgrades to new subversion/apr-1.x removing apr-0.9
  - foo fails to start because apr-0.9 is missing

Case 4:
  - foo linked against subversion/apr-0.9
  - foo has libsvn and libapr in the NEEDED section
  - system upgrades to new subversion/apr-1.x keeping apr-0.9
  - foo runs and fails due to ABI incompatibility

Case 4:
  - foo linked against subversion/apr-1.x using old SONAME
  - system upgrades to new subversion/apr-1.x
  - foo runs and works

If we change the soname:

Case 1:
  - foo fails to start

Case 2:
  - foo fails to start

Case 3:
  - foo fails to start

Case 4:
  - foo fails to start because the old SONAME is missing, although it
    would work if it could be persuaded to run.

Failing to start is probably better than failing at runtime due to ABI
changes, so I'm in favour of changing the SONAME. I don't object to a
configure switch to keep the old SONAME, either one specific to this
case --soname-use-apr0 or a generic --soname-version=0.

For the problem case 4 where a program that would work fails to run,
it might be possible for a distribution get around this by providing
dummy libsvn_xxx-1.so.0 libraries with the old SONAME that depend on
the new SONAME. Such libraries should only be used when upgrading
from subversion/apr-1.x with the old SONAME, it would be a bad idea to
install them if upgrading from subversion/apr-0.9.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 31 18:32:55 2006

This is an archived mail posted to the Subversion Dev mailing list.