libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alternate SONAME values


From: Keith Packard
Subject: Alternate SONAME values
Date: Thu, 07 Jul 2005 00:19:23 -0700

I'm building a weird set of libraries and would like libtool to help out
a bit by providing some mechanism to modify the SONAME placed into
the .so file.

X has three versions of the Xaw library; version 6, 7 and 8
(cooresponding to the .so major version numbers, which are the same
across all supported X platforms).

Unfortunately, we want to be able to install all three at the same time,
and permit applications to select which to link
against. To make this possible on the widest range of platforms, this
means that we should really use different filenames for the various
libraries:

Version 6 Xaw   -> libXaw6.so.6.0.1, libXaw6.so.6, libXaw6.so
Version 7 Xaw   -> libXaw7.so.7.0.0, libXaw7.so.7, libXaw7.so
Version 8 Xaw   -> libXaw8.so.8.0.0, libXaw8.so.8, libXaw8.so

These are obviously easy enough to generate with libtool, and I've done
so.

However, I have an additional constraint -- existing applications using
these libraries must continue to operate normally. These existing
applications use version-less filenames:

Version 6 Xaw   -> libXaw.so.6.0.1, libXaw.so.6
Version 7 Xaw   -> libXaw.so.7.0.0, libXaw.so.7
Version 8 Xaw   -> libXaw.so.8.0.0, libXaw.so.8, libXaw.so

We could use these same filenames again, but you'll note that only one
version can link to the bare .so name, leaving applications at the mercy
of the system to decide which version of the library they will use.

There is another way to solve the problem; we can change the SONAME in
the versioned filename varients:

Version 6 Xaw   -> libXaw6.so.6.0.1 SONAME=libXaw.so.6
Version 7 Xaw   -> libXaw7.so.7.0.0 SONAME=libXaw.so.7
Version 8 Xaw   -> libXaw8.so.8.0.0 SONAME=libXaw.so.8

With this setup, existing applications will find the right library, and
new applications will be able to select the appropriate version to link
against.

The help I need from libtool is to permit me to change the 'libname'
placed into the SONAME of the library at link time.

Is there a better way of solving this problem? Or is my plan something
that would be acceptable in a distributed version of libtool? If so,
I'll send a patch.

-keith

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]