Subject: pkg/7475: devel/glib doesn't set RPATH
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mcmahill@mtl.mit.edu>
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
>Last-Modified:
>Originator:     Dan McMahill
>Organization:
	
>Release:        1.3.3
>Environment:
	
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


>Description:


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

	
>How-To-Repeat:

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

	
>Fix:

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

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



	
>Audit-Trail:
>Unformatted: