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

Re: Development packages.



On Sun, 2004-03-21 at 19:49, Stephen Frost wrote:

> We shouldn't be recommending providing staticlly linked libs for people
> to use, even in the 'fast moving' case- if it's that fast then it
> probably shouldn't be in Debian and that's just life.
> 
> .la files shouldn't be included in anything, they're just plain broken.
> 
Please note that Stephen is talking complete bollocks here and clearly
has little to no understanding of libraries.

If you are creating a library package, you should ship the shared
library (and SONAME symlink) in the libxxxN package and the static
library, name-only symlink *AND* .la file (if relevant) in the
libxxx[N]-dev package.


The "broken"ness he's referring to is that Libtool will link all the
dependency libraries of a library to a program:

	libA	libB
	   \    /
	    libC

If you link "app" to "libC" with Libtool, app will be linked to libA,
libB and libC.

This is a requirement for most platforms, Linux is fairly unique in that
its dynamic link loader is able to process dependency trees itself and
load the dependencies of a linked library.

In user terms, this has zero effect; the dependency libraries need to
loaded *anyway* so loading them earlier actually *slightly* speeds up
load times of complex apps (esp. Mozilla and friends).


In Debian terms, it's slightly annoying; our "shlibs" tools don't
realise what's going on and suggest more dependencies than are strictly
necessary.  It can also cause annoyances during SONAME changes of
libraries deep in the dependency stack.

There's already a fix for Libtool to ignore dependency_libs when linking
shared libraries on Linux and the next major release should have it.


The .la files then simply convey the required dependencies when linking
a static library, which even on Linux requires you to link in all the
dependencies manually.

This user links statically a hell of a lot when debugging code; I assume
I'm not the only one either.

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?

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


Reply to: