Why does ldconfig insist on a trailing number?

Matthew Emmerton matt at gsicomp.on.ca
Sun Nov 30 18:10:38 PST 2003

> ldconfig is documented as only looking at files that have some version
> number after the .so suffix, say, .so.4. This looks rather ugly when the
> library version is part of the name, as in BerkeleyDB ports.
> Is there a functional requirement for the trailing version number?  If
> so, what is it?

I would imagine that the trailing number is the version number.  If the
BerkeleyDB ports were taking full advantage of the versioning ability
supplied by ldconfig, they would have called their libraries libdb.so.2,
libdb.so.3 and libdb.so.4 instead of libdb2.so.0, libdb3.so.0, libdb4.so.0.

One might claim that the libraries need to be called different things due to
API changes, but generally, API changes happen on major number boundaries so
the verion number handles this.

Matt Emmerton

More information about the freebsd-ports mailing list