Re: [SM-2006052516442831677] new msg by stf:
Stefan Paletta <[email protected]> Fri, 26 May 2006 03:33:22 +0200
| Newsgroups | gmane.linux.distributions.rock.devel |
|---|---|
| Message-ID | <[email protected]> |
stf wrote/schrieb/scripsit: >SubMaster Action: >new msg by stf: >can you please give an example where the symlinks are required? > >On Patch [2006052516442831677]: >Stefan Paletta: > sort manpages in sections 2 and 3 into :dev subpackage > place symlinks to shared libraries in /lib into /usr/lib, so ld finds them In general, they are always required. When e.g. -lfoo is requested, the linker will, by default, search for the following files (slightly simplified) in order, stopping at the first file it finds: /usr/lib/libfoo.so /usr/lib/libfoo.a /usr/local/lib/libfoo.so /usr/local/lib/libfoo.a /lib/libfoo.so /lib/libfoo.a Previously we would move the static libraries into /usr/lib, but only the static libraries. This means that in the example only /usr/lib/libfoo.a and /lib/libfoo.so exist, and so the linker would use the former one. Now, you may ask "then why do the shared libraries in /lib get used at all, when they should be overridden by static ones in /usr/lib?" -- that is because either the package explicitly places /lib in the search path, or because it uses libtool to read the correct location from the lib's libtool archive file. Packages that do neither (and rightly so!) end up having only the static library used. Point in case: mutt (libncurses). ceterum censeo ... that whole postflist_static_lib thing should better be scrapped altogether. It's a highly bogus fix to mitigate problems caused by another stupid automatism, its effects are not completely understood (as this message shows) and it is also incomplete after all (think /lib64). Instead, the very few packages that need to have shared libraries placed in /lib should each be carefully fixed on its own. -Stefan