Subject: "Missing symbols" when compiling agains gtk2+...
To: None <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 02/01/2004 10:56:24
Pkgsrc vs. X libfontconfig breaks gtk2+ on NetBSD. When you try to
use "pkg-config --libs gtk+-2.0" to get the linker flags, as gkrellm
does, for example, you get lots of missing symbols. This means that
the pkgsrc gtk2+ is essentially broken for daily use; the problem
leaks through sometimes to packages as well.

The deal is, gtk2+ links against pkg, and many
other libraries as well. What happens is that, when the recursive
search starts with a library in "/usr/X11R6/lib" that needs, it uses the DT_RPATH embedded in *that* library
to find the in "/usr/X11R6/lib". Even if it pulls
in the in "/usr/pkg/lib" later, the symbols in
the "/usr/X11R6/lib" one are first in the search path.

What works, is to add "-Wl,-rpath-link,/usr/pkg/lib:/usr/X11R6/lib"
to "/usr/pkg/lib/pkgconfig/pangoxft.pc". This would, however, surely
break gtk2+ on platforms which don't use gcc to compile. So, can
anyone tell me if there is a way to insert this conditionally, for
some appropriate condition?