[opensuse-factory] Unused direct dependencies
I make a quick test on openSUSE 10.3, not sure about how it's in Factory but I don't see a better mailing list. I just run "ldd -u -r /usr/bin/*" and... the list is big!!! Someone has looked the problem in detail? Is memory usage or startup time notably increased because of this? In any case these unused direct dependencies, even if they are indirect dependencies, end like *unneeded* "requires" in RPM metadata, correct? What impact have them in metadata size and resolver time? There are some cases where the number is *really* high. $ readelf -d /usr/bin/vumeter | grep NEEDED | wc -l 61 $ ldd -u -r /usr/bin/vumeter | wc -l 53 Note that I have no idea what vumeter is, it's just a random example I saw it in the list. There are easy solutions? I suppose that if right now all packages aren't built with -Wl,--as-needed is because that would break a lot of things. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Christian Morales Vega escribió:
! Someone has looked the problem in detail?
Yes, I have looked into this a bit.
Is memory usage or startup time notably increased because of this?
I dont have any numbers, sorry.
end like *unneeded* "requires" in RPM metadata, correct?
Right.
There are some cases where the number is *really* high.
Yes.
There are easy solutions?
No, not that Im aware of. I suppose that if right now all packages
aren't built with -Wl,--as-needed is because that would break a lot of things.
Currenlty an rpmlint check is being done to report this excess of dependencies, but there are many possible causes. a) libtool "la" files and/or libtool itself that still sets link_all_deplibs=yes or link_all_deplibs=unknown instead of "no". in short , libtool is broken, but that aint big news. b) broken pkg-config scripts that does not distinguish between "Libs" and "Libs.private" there is a HUGE LOT of them, I fixed several , but for a single person is waay to much work. c) Broken foobar-config scripts that used with the --libs option injects unneeded dependencies, probably this scripts are not worth the hassle, we should just remove them if possible. d) We cannot use -Wl,--as-needed everywhere, because there are A LOT of packages that use a wrong linking order in Makefiles or simple dont obey LDFLAGS. If you have patches or good suggesstions on how to solve this problems for specific packages please open separate bug reports for each component. Thanks. -- "Freedom of religion also means freedom **from** religion" - Anonymous Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/
2008/4/23 Cristian Rodríguez:
d) We cannot use -Wl,--as-needed everywhere, because there are A LOT of packages that use a wrong linking order in Makefiles or simple dont obey LDFLAGS.
If they ignore LDFLAGS there is no improvement, but neither is worse. Adding the option to a package that right know works could make it unbuildable. But can be that even if the package still builds the programs stop working properly? If it's just some packages stopping building... perhaps forcing the option could be a good way to make mantainers aware of the problem so they can fix it.
If you have patches or good suggesstions on how to solve this problems for specific packages please open separate bug reports for each component.
Ok.
Christian Morales Vega escribió:
If they ignore LDFLAGS there is no improvement, but neither is worse. Adding the option to a package that right know works could make it unbuildable. But can be that even if the package still builds the programs stop working properly?
If they fail to build or stop working at all is a no problem.. a real problem in this case is if the program starts behaving weirdly or in unexpected ways, that is HARD to debug and time consuming. -- "Freedom of religion also means freedom **from** religion" - Anonymous Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/
2008/4/23 Cristian Rodríguez:
Currenlty an rpmlint check is being done to report this excess of dependencies, but there are many possible causes.
a) libtool "la" files and/or libtool itself that still sets link_all_deplibs=yes or link_all_deplibs=unknown instead of "no". in short , libtool is broken, but that aint big news.
b) broken pkg-config scripts that does not distinguish between "Libs" and "Libs.private" there is a HUGE LOT of them, I fixed several , but for a single person is waay to much work.
c) Broken foobar-config scripts that used with the --libs option injects unneeded dependencies, probably this scripts are not worth the hassle, we should just remove them if possible.
d) We cannot use -Wl,--as-needed everywhere, because there are A LOT of packages that use a wrong linking order in Makefiles or simple dont obey LDFLAGS.
And this one? cdrdao package has problems because: - vorbisfile.pc suffers from 'b' - ao.pc suffers from 'b' - the pacage itself has an unneeded dep against libnsl but after correcting them I still end with a dep against libm that I don't want. It happens only with the files compiled with g++, the one that uses gcc is ok. But how a file compiled with "g++ -g -O2 -o toc2cue toc2cue.o -L../trackdb -ltrackdb -lvorbisfile -lao" can end with a dep against libm???
2008/4/23 Cristian Rodríguez:
a) libtool "la" files and/or libtool itself that still sets link_all_deplibs=yes or link_all_deplibs=unknown instead of "no". in short , libtool is broken, but that aint big news.
I must admit I don't know a thing about libtool, but Fedora seems to handle it better. I have packaged Tower Toppler for both openSUSE and Fedora (https://build.opensuse.org/package/show?package=toppler&project=home%3ARedDwarf). The openSUSE binary ends with a lot of unneeded direct dependencies but the Fedora one is clean. That happens with Fedora 7, 8 and 9, so whatever they are doing it is tested since some time ago. The thing is where openSUSE does: /bin/sh ./libtool --tag=CXX --mode=link g++ $CFLAGS -o toppler $OBJS -lz -lSDL_mixer -L/usr/lib -lSDL -lpthread mkdir .libs g++ $CFLAGS -o toppler $OBJS -lz /usr/lib/libSDL_mixer.so -L/usr/local/lib -L/usr/lib /usr/lib/libmikmod.so /usr/lib/libSDL.so /usr/lib/libaa.so -lncurses -lm /usr/lib/libX11.so /usr/lib/libXau.so /usr/lib/libXdmcp.so -ldl -lgpm -lpthread Fedora does: /bin/sh ./libtool --tag=CXX --mode=link g++ $CFLAGS -o toppler $OBJS -lz -lSDL_mixer -L/usr/lib -lSDL -lpthread mkdir .libs g++ $CFLAGS -o toppler $OBJS -lz -lSDL_mixer -L/usr/lib -lSDL -lpthread Any idea? The libtool script generated by configure script isn't very different. Where should I search for the Fedora patch?
MjAwOC81LzI4IENocmlzdGlhbiBNb3JhbGVzIFZlZ2E6Cj4gMjAwOC80LzIzIENyaXN0aWFuIFJvZHLDrWd1ZXo6Cj4+IGEpIGxpYnRvb2wgImxhIiBmaWxlcyBhbmQvb3IgbGlidG9vbCBpdHNlbGYgdGhhdCBzdGlsbCBzZXRzCj4+IGxpbmtfYWxsX2RlcGxpYnM9eWVzIG9yIGxpbmtfYWxsX2RlcGxpYnM9dW5rbm93biBpbnN0ZWFkIG9mICJubyIuCj4+IGluIHNob3J0ICwgbGlidG9vbCBpcyBicm9rZW4sIGJ1dCB0aGF0IGFpbnQgYmlnIG5ld3MuCj4+Cj4gSSBtdXN0IGFkbWl0IEkgZG9uJ3Qga25vdyBhIHRoaW5nIGFib3V0IGxpYnRvb2wsIGJ1dCBGZWRvcmEgc2VlbXMgdG8KPi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L3NoIC4vbGlidG9vbCAtLXRhZz1DWFggLS1tb2RlPWxpbmsgZysrICRDRkxBR1MgLW8gdG9wcGxlciAkT0JKUwo+IC1seiAtbFNETF9taXhlciAtTC91c3IvbGliIC1sU0RMIC1scHRocmVhZAo+IG1rZGlyIC5saWJzCj4gZysrICRDRkxBR1MgLW8gdG9wcGxlciAkT0JKUyAtbHogLWxTRExfbWl4ZXIgLUwvdXNyL2xpYiAtbFNETCAtbHB0aHJlYWQKPgo+Cj4gQW55IGlkZWE/IFRoZSBsaWJ0b29sIHNjcmlwdCBnZW5lcmF0ZWQgYnkgY29uZmlndXJlIHNjcmlwdCBpc24ndCB2ZXJ5Cj4gZGlmZmVyZW50LiBXaGVyZSBzaG91bGQgSSBzZWFyY2ggZm9yIHRoZSBGZWRvcmEgcGF0Y2g/Cj4KCkFmdGVyIGxvb2tpbmcgdGhlIGxpYnRvb2wgc2NyaXB0IGV4ZWN1dGlvbiBsb29rcyBsaWtlIHRoZSBkaWZmZXJlbmNlCmlzIHRoYXQgb3BlblNVU0UgaGFzIGxpYlNETC5sYSBhbmQgbGliU0RMX21peGVyLmxhIGZpbGVzIGFuZCBGZWRvcmEKaGFzbid0LgpGaXhhYmxlLCBidXQgZG9lc24ndCBoZWxwcyBhdCBhbGwgaW4gdGhlIGdlbmVyYWwgY2FzZSA6LSgK---------------------------------------------------------------------To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.orgFor additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (2)
-
Christian Morales Vega
-
Cristian Rodríguez