[Fedora-packaging] Unused direct shared library dependencies and rpmlint
enrico.scholz at informatik.tu-chemnitz.de
Sat Jan 27 10:12:25 UTC 2007
ville.skytta at iki.fi (Ville Skyttä) writes:
> Inspired by
> I've had a patch for rpmlint in my local tree for a while which checks for
> unused direct shared library dependencies in shared libs.
> I'm wondering whether this check is a good idea;
Generally yes; dynamically loaded modules are an exception, because
their deps can be resolved by the loading lib/application already.
Another exception might be glib2 based applications/modules. There seems
to be something wrong with its type system so that applications (which
are not linked against glib2) misbehave when a dynamic module is linked
against glib2. After unloading the module and loading it again, some
types might not be registered right.
But these are minor issues only.
A more major one might be, how this kind of warning can be fixed. All major
buildsystems (libtool, cmake) are creating such unused dependencies. Setting
'-Wl,--as-needed' linkerflags might help with cmake, but fails horribly with
libtool because it moves such linkerflags to the end of the cmdline.
I used some magic like
| sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
after %configure. But it's not a panacea because it will not work for
the exceptions above.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 480 bytes
Desc: not available
More information about the Fedora-packaging