Resedit (Was: Proposal for KControl)j
Roger Larsson
roger.larsson at norran.net
Fri Jul 5 03:03:00 BST 2002
On Friday 05 July 2002 00.09, aleXXX wrote:
> > looking at a strace shows:
> > large number of stat's for finding libs
>
> Only thing to do about this is to configure your ld.so so, that the dirs
> where the most libraries sit, are searched first.
>
Does not ld.so handle this (isn't /etc/ld.so.cache prioritysorted per lib?)
But LD_LIBRARY_PATH is searched before the cache is used...
Currently my LD_LIBRARY_PATH is
/opt/kdecvs/lib:/usr/src/kde/qt-copy/lib:
since I run a cvs version of kde, but I do not like to put that in ld.so.config - yet to avoid mixing up versions (I do have kde3.0.1 too).
When I do
LD_LIBRARY_PATH=a:lot:of:dummy:dirs:${LD_LIBRARY_PATH}
Then it will search all those libraries every time I want to open a library!
Staring konqueror:
- - -
open("/opt/kdecvs/lib/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/src/kde/qt-copy/lib/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/usr/X11R6/lib/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("a/i686/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("a/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("lot/i686/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("lot/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("of/i686/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("of/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("dummy/i686/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("dummy/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("dirs/i686/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("dirs/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/kdecvs/lib/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/src/kde/qt-copy/lib/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("i686/libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libpng.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=97958, ...}) = 0
old_mmap(NULL, 97958, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40f71000
close(3) = 0
open("/usr/lib/libpng.so.2", O_RDONLY) = 3
See it searches all LD_:LIBRARY_PATH directories before it uses
the knowledge in ld.so.cache...
At least it correctly starts with the version matching the compilation!
Hmm... it is probably wrong to put anything into LD_LIBRARY_PATH...
It is to be used when you want to override the default manually.
/RogerL
--
Roger Larsson
SkellefteƄ
Sweden
More information about the kde-core-devel
mailing list