Subject: pkg/17287: Linker flags in mysql_config do not contain -rpath to libmysqlclient.so
To: None <gnats-bugs@gnats.netbsd.org>
From: None <svs@ropnet.ru>
List: netbsd-bugs
Date: 06/16/2002 11:57:58
>Number:         17287
>Category:       pkg
>Synopsis:       Linker flags in mysql_config do not contain -rpath to libmysqlclient.so
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 16 11:58:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Svishchev
>Release:        1.6A
>Organization:
>Environment:
NetBSD nadesico 1.6A NetBSD 1.6A ($Revision: 1.1 $) #2: Sat Jun  1 19:20:12 MSD 2002     svs@mononoke:/home/svs/b/sys/obj_i386/NADESICO i386
>Description:
Shared object built by databases/p5-DBD-mysql will not load at runtime, because:

/usr/pkg/lib/perl5/site_perl/5.6.1/i386-netbsd/auto/DBD/mysql/mysql.so:
         -lperl => /usr/pkg/lib/perl5/5.6.1/i386-netbsd/CORE/libperl.so
         -lz.0 => /usr/lib/libz.so.0
         -lcrypt.0 => /usr/lib/libcrypt.so.0
         -lm.0 => /usr/lib/libm387.so.0
         -lm.0 => /usr/lib/libm.so.0
         -lmysqlclient.10 => not found

% mysql_config --libs
-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L'/usr/pkg/lib/mysql' -lmysqlclient -lz -lcrypt -lm

>How-To-Repeat:

>Fix:
RCS file: /cvsroot/pkgsrc/databases/mysql-client/Makefile.common,v
--- Makefile.common	2002/03/18 14:17:38	1.8
+++ Makefile.common	2002/06/16 18:46:56
@@ -36,6 +36,7 @@
 USE_PERL5=		# defined
 USE_LIBTOOL=		# defined
 LTCONFIG_OVERRIDE=	${WRKSRC}/ltconfig
+LDFLAGS+=		-Wl,-R${LOCALBASE}/lib/mysql
 
 post-extract:
 	cd ${WRKSRC};							\

>Release-Note:
>Audit-Trail:
>Unformatted: