Subject: Re: LIbrary problem
To: =?iso-8859-1?Q?Thorbj=F6rn?= Jemander <thorbjorn@jemander.net>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: netbsd-help
Date: 11/06/2003 14:29:03
On Thu, Nov 06, 2003 at 04:45:46AM +0000, Thorbjörn Jemander wrote:
...
> root@tellus:/usr/wxDesigner>ldd wxDesigner
> wxDesigner:
...
> -lgdk_pixbuf-2.0.200 => /usr/pkg/lib/libgdk_pixbuf-2.0.so.200
> -lX11.6 => /usr/X11R6/lib/libX11.so.6 <<<< The
> first occurrance
...
> -lz.0 => /usr/lib/libz.so.0
> -lfreetype.9 => /usr/pkg/lib/libfreetype.so.9
> -lpango-1.0.200 => /usr/pkg/lib/libpango-1.0.so.200
> -lpangoxft-1.0.200 => /usr/pkg/lib/libpangoxft-1.0.so.200
> -lpangox-1.0.200 => /usr/pkg/lib/libpangox-1.0.so.200
> -lgdk-x11-2.0.200 => /usr/pkg/lib/libgdk-x11-2.0.so.200
> -latk-1.0.200 => /usr/pkg/lib/libatk-1.0.so.200
> -lgtk-x11-2.0.200 => /usr/pkg/lib/libgtk-x11-2.0.so.200
> -lc.12 => /usr/lib/libc.so.12
> -lintl.4 => /usr/pkg/lib/libintl.so.4
> -lpangoft2-1.0.200 => /usr/pkg/lib/libpangoft2-1.0.so.200
> -lX11.6 => not found <<<< The second
> occurance
>
> It thus failes to find X11.6, but as you can see -lX11.6 appears
> twice in the list and the first time it occurs it is resolved
> correctly - but not the second (see the last line) it is not.
>
> Two questions:
> 1. Does to double inclusion of X11.6 indicate an error in it self?
> 2. What is the solution: removing the last X11.6 (how?) or make it
> resolve (how?) ?
It doesn't indicate an error in itself, rather that a library linked
with wxDesigner is in turn linked (or depends on) X11. I can't quite
spot which one though, but this illustrates the point:
% ldd libpango-1.0.so
libpango-1.0.so:
-lintl.0 => /usr/lib/libintl.so.0
-lglib-2.0.300 => /usr/local/lib/libglib-2.0.so.300
-lgobject-2.0.300 => /usr/local/lib/libgobject-2.0.so.300
-lgmodule-2.0.300 => /usr/local/lib/libgmodule-2.0.so.300
How to solve it? Well, I tend to put things like:
% cvs diff pango.pc.in
Index: pango.pc.in
===================================================================
RCS file: /cvs/gnome/pango/pango.pc.in,v
retrieving revision 1.9
diff -r1.9 pango.pc.in
12c12
< Libs: -L${libdir} -lpango-@PANGO_API_VERSION@
---
> Libs: -Wl,-R${libdir} -L${libdir} -lpango-@PANGO_API_VERSION@
all over the place..
Cheers,
Patrick