ldconfig change breaks KDE
Bruno Haible
bruno@clisp.org
Mon Jan 12 12:04:00 GMT 2004
Hi,
ldconfig contains some code that treats shared objects differently depending
on whether their name starts with "lib" or "ld-". This code breaks KDE.
Namely, KDE's libraries and modules are installed in /opt/kde3/lib, and
/opt/kde3/lib is listed in /etc/ld.so.conf, but "ldconfig" omits modules
like
/opt/kde3/lib/konsole.so
/opt/kde3/lib/kwrite.so
/opt/kde3/lib/kate.so
from the generated /etc/ld.so.cache. As a consequence, dlopen("konsole.so")
fails, and programs like konsole, kwrite, kate etc. don't start any more.
Since no restrictions on the names of shared modules are documented for
dlopen(), this appears to be bug in ldconfig. I didn't have this problem
with glibc-2003-04-xx.
Here is a (hacky) modification that made KDE work again for me.
What's the intent of that code?
Bruno
--- glibc-20031205/elf/ldconfig.c.bak 2003-08-26 12:50:26.000000000 +0200
+++ glibc-20031205/elf/ldconfig.c 2004-01-11 20:34:41.000000000 +0100
@@ -668,9 +668,9 @@
/* Does this file look like a shared library or is it a hwcap
subdirectory? The dynamic linker is also considered as
shared library. */
- if (((strncmp (direntry->d_name, "lib", 3) != 0
+ if ((/* (strncmp (direntry->d_name, "lib", 3) != 0
&& strncmp (direntry->d_name, "ld-", 3) != 0)
- || strstr (direntry->d_name, ".so") == NULL)
+ || */ strstr (direntry->d_name, ".so") == NULL)
&& (
#ifdef _DIRENT_HAVE_D_TYPE
direntry->d_type == DT_REG ||
More information about the Libc-alpha
mailing list