Subject: pkg/7475: devel/glib doesn't set RPATH
To: None <>
From: None <>
List: netbsd-bugs
Date: 04/26/1999 06:35:48
>Number:         7475
>Category:       pkg
>Synopsis:       devel/glib doesn't set RPATH
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 26 06:35:00 1999
>Originator:     Dan McMahill
>Release:        1.3.3
System: NetBSD sy-borg 1.3.3 NetBSD 1.3.3 (SY-BORG) #7: Sun Apr 25 23:21:06 EDT 1999 dan@sy-borg:/usr/src/sys/arch/pmax/compile/SY-BORG pmax


the shell script 'glib-config' which comes with the glib-1.2.1 package 
doesn't set RPATH as it should.


install the glib-1.2.1 package and then run
glib-config --libs

This should return a list of flags to give the c compiler when compiling a 
program which uses glib.  You'll note a -L/usr/pkg/lib entry, but not a 
-Wl,-R/usr/pkg/lib entry.

This also causes gtk-config, part of the gtk+-1.2.1 package to fail in a 
similar fashion as glib-config is used as part of the configure process 
in gtk.

Note that this problem only shows up when building non-package source programs
since the package system puts the -Wl,-R/usr/pkg/lib into the CC variable


add the following to the 'devel/glib/patches' directory.

make sure rpath is used.
--- Sun Apr 25 23:56:51 1999
+++      Sun Apr 25 23:57:13 1999
@@ -108,4 +108,4 @@
                libsa="$libsa @G_MODULE_LIBS@"
-       echo -L@libdir@ $libsp $libsa
+       echo -L@libdir@ -Wl,-R@libdir@ $libsp $libsa