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

Re: RFS: avant-window-navigator 0.2.1



On Sun, 2008-02-03 at 20:21 +0100, Cyril Brulebois wrote:
> Sometimes, just deleting an -lfoo would do. But more commonly, the
> build system doesn't allow you to use fine-grained library
> dependencies. That's where LDFLAGS=-Wl,--as-needed is your friend,
> since it tells the linker to forget about the unused libraries
> (resulting in less NEEDED entries, and happy dpkg-shlibdeps).
> 
> *BUT* that might break the resulting binaries, since (depending on
> various things, like build/link options), you may end up with
> undefined references, which result in runtime crashes.

I can only stress that the *but* here can be a blocker. Not all packages
can get away with:

> To avoid that, you probably want to use another LDFLAG(S):
> -Wl,-z,defs, which explicitely forbids such undefined references.

> Note that this might still break the build system, but that *is* a
> good thing. 

(Agreed, but is probably easier to fix upstream than in Debian, YMMV).

The main culprit here is Gtk+ (and probably Qt for similar reasons) and
I need to find an overall solution to the problem for Emdebian. The
problem is identifying *which* reports from dpkg-shlibdeps actually
matter in the grand scheme of things. If a package causes an extra
dependency that is a problem, yes, but if that extra dependency is
genuinely necessary for some other application which would almost
inevitably be installed alongside the package in question, then no harm
is done.

I'm looking at storing the output of dpkg-shlibdeps in some form of
database so that I can cross reference which dependencies might be
completely unnecessary for a given selection of packages. It'll take
some time and will have to fit in with my other work so if anyone
fancies helping out . . . . 

(It'll probably give me a good reason to investigate mole too.)

> That's a bit of work, but you'll probably end up with less
> dependencies (expressed in less Depends:), which is obviously
> (installed size, testing migration, etc.) a good thing.

Agreed, it is a v.good thing. Not sure it is yet something we should be
advising on mentors, that's all. It may well be harder than expected and
the methods are not that user-friendly.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/


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


Reply to: