Re: Xlib needs to add -lXau to x11.pc
"Mike A. Harris" <[email protected]> Sat, 17 Jan 2004 01:19:20 -0500 (EST)
| Newsgroups | gmane.comp.freedesktop.xlibs.general |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 17 Jan 2004, Keith Packard wrote: >Date: Sat, 17 Jan 2004 10:22:41 +1030 >From: Keith Packard <[email protected]> >To: xlibs-u7BhqnqprCWvj1b/[email protected] >Cc: Keith Packard <[email protected]> >Content-Type: text/plain; charset=us-ascii >Subject: [Xlibs] Xlib needs to add -lXau to x11.pc > > >For systems which don't have library dependencies in the archives, we need >to fix the .pc file so that it includes the libraries and necessary -I >bits. The stuff in configure.ac is kinda busted, so if someone wants to >take a stab at figuring it all out and fixing it, it would be muchly >appreciated. lnxlib.tmpl from XFree86 CVS head will help with that a bit, and it fixes many issues compared to 4.3.0, yet is missing some deps as well, which burn us. I'm going to be fixing this in our 4.3.0 soon (it causes anaconda some problems), and then checking 4.4.0 current to ensure it is updated properly. On a sidenote, the FreeBSD bsdlib.tmpl also has errors. For anyone who is checking libs to ensure they're properly linked to their dependants, here is a quick trick to test a library (on Linux): ldd -r -d <library> If any undefined references are present, determine which library provides them, and LD_PRELOAD it, running the same command as above. Keep adding necessary libs until all undef'd refs are resolved, and you've got the list of sharedlibreqs to link in. Example: pts/6 root-tHq/[email protected]:/usr/X11R6/lib# ldd -r -d libXmuu.so libc.so.6 => /lib/i686/libc.so.6 (0x40017000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) undefined symbol: XGetErrorDatabaseText (./libXmuu.so) undefined symbol: XQueryTree (./libXmuu.so) undefined symbol: XFree (./libXmuu.so) undefined symbol: XGetWindowProperty (./libXmuu.so) undefined symbol: XGetErrorText (./libXmuu.so) undefined symbol: XInternAtom (./libXmuu.so) pts/6 root-tHq/[email protected]:/usr/X11R6/lib# LD_PRELOAD=./libX11.so.6.2 ldd -r -d libXmuu.so ./libX11.so.6.2 => ./libX11.so.6.2 (0x40005000) libc.so.6 => /lib/i686/libc.so.6 (0x4010d000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) Must be sure that the lib actually directly requires a given dep lib though, rather than one of the existing deps that are found - also missing their deps. What would be nice, is a depandancy tree for the libs. Anyone know of such a pre-existing tool? Perhaps even the tools I already use can do this and I never noticed. ;o) -- Mike A. Harris