Subject: Re: x11/gtk2 doesn't build on Linux (SuSE 8.1)
To: Johnny C. Lam <jlam@NetBSD.org>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-pkg
Date: 03/28/2005 21:35:42
On Mon, 2005-03-28 at 14:14 -0500, Johnny C. Lam wrote:
> Julio M. Merino Vidal wrote:
> > Mysteriously, if you remove -Wl,-R from the command line (leaving -L)
> > it works. I may be missing some details about that flag, though.
> >
> > This happens because -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib appear
> > before the flags for /usr/pkg/lib. I can't reproduce this locally
> > in any of my boxes because the X system in them is new enough to
> > provide the required functions from Xft2.
>
> This is a problem where the pkgsrc libXft and the X11R6 libXft probably
> have the same major number. Buildlink will force the correctly
> libraries to be used during linking, but at run-time, the shared
> libraries are found by searching the run-time library search path in
> order. In this case, since /usr/X11R6/lib appears before /usr/pkg/lib
> in the rpath, it will be searched first.
>
> I believe that there is very little that we can do here to fix this
> problem without requiring differing major numbers for the shared
> libraries between X11R6 and pkgsrc. The search path cannot be
> guaranteed to be correct and can actually never be correct if the user
> chooses to use the builtin versions of some libraries while using pkgsrc
> versions of others. While buildlink could reorder the -Wl,-R flags,
> it's not clear how to determine what the correct order should be.
Aha. Thanks for the explanation. Looks like we won't be able to fix
the problem :-/
But I still can't see why does the run path affect the build...
shouldn't it be using the -L flags?
--
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/