On Saturday 03 of April 2010 12:56:04 Fabian Groffen wrote: > Is it known why this does happen exactly? When a lib is kept because it > is still used, only its soname + what the soname points to should be > kept. That would mean the lib can no longer be found during linking, > unless you add some trickery (or does GNU ld do something "handy" out of > the box right here?). So for example: > > % ls > usr/lib/libfoo.so -> libfoo.so.2.1 > usr/lib/libfoo.so.2 -> libfoo.so.2.1 > usr/lib/libfoo.so.2.1 > > % scanelf --soname usr/lib/libfoo.so > libfoo.so.2 usr/lib/libfoo.so > > what should kept preserved is: > > usr/lib/libfoo.so.2 -> libfoo.so.2.1 > usr/lib/libfoo.so.2.1 > > because trying to link to libfoo using `gcc -o bar -lfoo bar.c` should > (in theory and on some platforms at least) fail.
It doesn't matter, as 'broken' build system may alphabetically find library by file name, and link to this library by full path. On Saturday 03 of April 2010 13:13:00 Michał Górny wrote: > > 2. During "emerge", unset environment variable corresponding to said > > preserved library directory - orphans are no longer located. > Wouldn't that cause failure when the toolkit relies on a 'hidden' > preserved library? It would indeed. Now when I think about it, moving stuff to preserved library dir could be just done - provided it's possible - along with fixing/setting DT_RPATH's in reverse runtime dependencies. This way no system-wide LIBRARY_PATH's would be necessary. Is it possible? Mike? On Saturday 03 of April 2010 13:33:16 Gilles Dartiguelongue wrote: > > There is opt-out suggestion[2], unfortunately it does not provide any > > info how exactly it's supposed to be achieved. As far as portage/pkgcore > > is concerned, maybe - as Brian Harring suggested - sandbox could be used > > to somehow "hide" preserved libraries or preserved library directory > > from ebuild environment (preserved library directory a'ka "purgatory" - > > libs could be moved there when considered orphaned). > that sounds nice, it would allow us to more easily spot > packages/upstreams doing it wrong (maybe that would work for packages > linking to themselves too btw) Keeping preserved libraries in separate location (in "purgatory" or dumping place) is just a method for making implementation possibly easier (or possible at all), with nice side effects though. -- regards MM
