This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
ldconfig change breaks KDE
- From: Bruno Haible <bruno at clisp dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Mon, 12 Jan 2004 13:01:34 +0100
- Subject: ldconfig change breaks KDE
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 ||