version-independence between Python & BerkDB in Solaris packages?

Martin v. Loewis martin at
Fri Jan 2 23:01:22 CET 2004

Skip Montanaro wrote:

> Is it possible to compile and package Python and the external libraries it
> uses to minimize coupling between package versions like this?  

There are several alternatives:

1. Link statically with a libdb.a. Then you don't need
    any additional shared libraries on the target system. You may find
    that can't open databases of the "system's",

2. Be prepared to have multiple versions of libdb installed on a system.
    BerkeleyDB is deliberately packaged in a way to make this possible:
    You can have /usr/local/BerkeleyDB-4.0, and, at on the same system,
    /usr/local/BerkeleyDB-4.2. Still the same problem as in 1) with
    opening newer databases.

3. Package separately from Python. This is the typical
    Linux answer. Then provide multiple copies of, each
    packaged for its own libdb-x.y. The different packages should
    conflict with each other. Can be combined with either 1 or 2.

> I note that
> other modules which link to specific external libraries don't have such
> problems:
>     % ldd
>    =>       /usr/lib/
>    =>     /usr/lib/
>    =>    /usr/lib/
>             /usr/platform/SUNW,Ultra-80/lib/

That's because is part of the operating system. Even if
newer libz releases are available, nobody would install them
on Solaris (anymore), since it is so convenient to use the
system library. If Sun ever decides to bundle Sleepycat with
the system, the same thing may happen: Solaris 11 comes with
BerkeleyDB 4.7.178, and nobody installs 4.9.26 even though this
has been available for three months already. Instead, people
upgrade to Solaris 12 when it comes out.


More information about the Python-list mailing list