This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Bruno Haible <bruno@clisp.org> writes: > 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. That's strange since even that version had these lines (according to CVS annotate those lines exist since 07-May-00). > Here is a (hacky) modification that made KDE work again for me. > > What's the intent of that code? To speed up processing of directories. We could use the following patch instead (clean version of your patch): --- elf/ldconfig.c 21 Jul 2003 20:17:16 -0000 1.34 +++ elf/ldconfig.c 22 Jul 2003 19:17:28 -0000 @@ -665,9 +665,7 @@ search_dir (const struct dir_entry *entr /* 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 - && strncmp (direntry->d_name, "ld-", 3) != 0) - || strstr (direntry->d_name, ".so") == NULL) + if ((strstr (direntry->d_name, ".so") == NULL) && ( #ifdef _DIRENT_HAVE_D_TYPE direntry->d_type == DT_REG || Andreas > 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 || > > > Andreas -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |