Subject: Re: x11/gtk2 doesn't build on Linux (SuSE 8.1)
To: Johnny Lam <jlam@NetBSD.org>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-pkg
Date: 03/29/2005 14:55:57
On Mon, 2005-03-28 at 17:21 -0500, Johnny Lam wrote:
> Julio M. Merino Vidal wrote:

> However, this still doesn't really explain what's going on.  It appears 
> that the gtk2 configure script is dying when linking a line that looks 
> roughly like:
> 
> 	gcc -o conftest conftest.c -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib
> 		-Wl,-R/usr/pkg/lib -L/usr/pkg/lib
> 		-lpangoxft-1.0 -lpangox-1.0 -lgobject-2.0 -lgmodule-2.0
> 		-lglib-2.0 -lpthread
> 
> There is no "-lXft" in that link line, so it's now a question of how the 
> linker behaves when it needs to track down shlib dependencies.  It's 
> possible that /usr/X11R6/lib/libXft.so doesn't have a correct SONAME 
> (maybe it points to itself), but barring that, it makes me wonder if 
> there is something different between how the linker deals with shlib 
> dependencies on Linux versus NetBSD.  This problem needs more investigation.

Maybe this has something to do with the dependency_libs variable in the
.la files, which is empty.  When building pango from sources (that is,
without buildlink), the variable includes, among other things, a path
to /usr/pkg/lib/libXft.la.

This is something for you to try, Torsten: edit
the /usr/pkg/lib/libpangoxft-1.0.la file and add /usr/pkg/lib/libXft.la
to the dependency_libs variable.  Then, try to 'make clean' and 'make
configure' gtk2 again.

What I expect here is libtool to explicitly pick up the right libXft
library, rather than relying on the rpath.  Note: I don't know at all
if libtool will do anything special here.  It's just a test to see if
it makes any difference.

But oh wait, I think the configure script doesn't use libtool to run the
tests...

Cheers,

-- 
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/