Problem with .so numbering on FreeBSD in contrast to Linux

Jeremy Messenger mezz7 at
Fri Feb 20 16:03:29 PST 2009

On Fri, 20 Feb 2009 13:23:43 -0600, Thomas Schmitt <scdbackup at>  

> Hi,
> i am trying to provide libraries for FreeBSD
> and Linux via a build system based on autotools.
> My problem is that the .so numbers get produced
> differently on both systems.
> E.g.
>      on FreeBSD
>  on Linux
> This has the consequence that on Linux older
> applications can work with the newest libraries
> whereas on FreeBSD the application has to
> be re-built for that.
> Is that intentional on FreeBSD ?
> Shall there be no backward compatibility
> with .so ?
> The numbers stem from ./
>   LT_AGE=27
> They are handed over to ./libtool as
>   -version-info 31:0:27
> on both systems.
> The libburnia libraries have evolving ABIs
> which are backward compatible. Applications
> can inquire the library version at run time in
> order to check whether the feature set suffices.
> So i would prefer to produce
> with every new release.
> But i also want to obey the conventions of
> the operating systems. On Linux that means to
> increase both LT_CURRENT and LT_AGE.
> On FreeBSD one would obviously have to leave
> LT_CURRENT unchanged.
> How do other projects solve that dilemma ?
> Should i strive for constant
> on FreeBSD at all ?

You can use ports/Mk/'s hack in libtool to correct the  
version. You can add in ports's Makefile like this:

USE_AUTOTOOLS=	libtool:15
USE_GNOME=	ltverhack

If for some reason, this library bumped for no reason and doesn't need to  
be. You can custom number of version like this:

USE_AUTOTOOLS=	libtool:15
USE_GNOME=	ltverhack:6

Then it will be All GNOME ports are using ltverhack such as  
gtk20, glib20, pango and etc without custom number.

I think it's fixed in libtool2 for FreeBSD, but someone might want to  
check in libtool repo to make sure.

> (libtool is the expert. Possibly it is smarter
> than me.)

Since you are able to figure it out. You are smart already. ;-)


> Have a nice day :)
> Thomas

mezz7 at  -  mezz at
FreeBSD GNOME Team  -  gnome at

More information about the freebsd-ports mailing list