Date: Thu, 25 Apr 2002 21:02:02 +1000 From: Edwin Groothuis <edwin@mavetju.org> To: freebsd-hackers@freebsd.org Subject: missing libraries, and how to find them. Message-ID: <20020425210202.A49377@k7.mavetju.org>
next in thread | raw e-mail | index | archive | help
Greetings, Last night I had troubles running glade because in an earlier stage this week I had to upgrade libfreetype from so.6 to so.9. Running ldd on it did work a little bit, I found out that it couldn't find a libfreetype.so.6 (which I already knew :-), but couldn't tell me where it was coming from: [~] edwin@k7>ldd `which glade` /usr/X11R6/bin/glade: [...] libfreetype.so.6 => Not found I recompiled it, again the message: Shared object "libfreetype.so.6" not found. It must have been one of the other libraries. Unfortunatly glade uses all the gnome-libraries, so I had to recompile all of them... At the end, it was gtkhtml which was holding the old libfreetype.so.6, but it had cost me the whole evening to find out. Why didn't ldd tell me which lib it was which was failing? With this idea in mind I've submitted PR bin/37448: [PATCH] ldd/rtld support for more information of linked libraries. It patches ldd.c and rtld.c to understand the -s option (that parameter is also used under Solaris I've been told). With this option it does display the name of the program/library ldd is displayed (so not only the first occurance) and the libs being looked for: [~] edwin@k7>ldd -s `which glade` /usr/X11R6/bin/glade: /usr/X11R6/bin/glade libintl.so.2 => /usr/local/lib/libintl.so.2 (0x2812b000) libgda-common.so.0 => /usr/X11R6/lib/libgda-common.so.0 (0x28132000) [...] /usr/local/lib/libintl.so.2 libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28d4b000) libc.so.4 => /usr/lib/libc.so.4 (0x28e1f000) /usr/X11R6/lib/libgda-common.so.0 libgthread12.so.3 => /usr/local/lib/libgthread12.so.3 (0x28167000) libgconf-1.so.1 => /usr/X11R6/lib/libgconf-1.so.1 (0x2844e000) libbonobo.so.2 => /usr/X11R6/lib/libbonobo.so.2 (0x284f4000) [...] Yes it will output much more data (281 lines for ldd -s glade vs 48 for ldd glade), but at least it gives you the ability to see what libraries are used by the program and its libraries. I hope somebody considers this a usefull patch and wants to commit it. The patch itself is against a 4.5 system (but not that difficult, it was more a matter of finding out where to put it). Thanks, Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org edwin@mavetju.org | Interested in MUDs? Visit Fatal Dimensions: bash$ :(){ :|:&};: | http://www.FatalDimensions.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020425210202.A49377>