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

Re: A plan to get rid of unnecessary package dependencies



[Mike Hommey]
> A first step in that direction would be to fix .la, .pc and -config
> files so that they only give the needed libraries.

The correct fix for .la files for dynamic linking (remove all dependent
libraries, relying on the runtime linker to pull them in recursively)
does not work for static linking.  Some people apparently still care
about static linking, don't ask me who or why.  .pc files do not have
this limitation, as it's possible to specify two separate lists of
libraries, one only for static linking.

So, the real solution, insofar as there _are_ real solutions, is to
phase out .la files entirely.  One problem is that if your .la file is
referenced within someone else's .la file, you can't remove it without
breaking their package.  To eliminate _this_ problem, I suggest that
everyone add the following (or similar) to debian/rules:

binary-arch: build-arch
	# [something like '$(MAKE) install DESTDIR=$(shell pwd)/debian/tmp']
	#
	sed -i 's:/usr/lib/lib\([^ ]*\).la:-l\1:g' debian/tmp/usr/lib/*.la

Attachment: signature.asc
Description: Digital signature


Reply to: