Subject: pkg/15574: p5-DBD-mysql-1.2215 doesn't link correctly
To: None <gnats-bugs@gnats.netbsd.org>
From: None <bernd@arresum.inka.de>
List: netbsd-bugs
Date: 02/10/2002 20:01:41
>Number:         15574
>Category:       pkg
>Synopsis:       p5-DBD-mysql-1.2215 doesn't link correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 10 11:02:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Bernd Ernesti
>Release:        NetBSD 1.5ZA
>Organization:
	
>Environment:
System: NetBSD arresum.veego.de 1.5ZA NetBSD 1.5ZA (ARRESUM) #644: Sat Feb 2 11:47:23 CET 2002 bernd@arresum.veego.de:/obj_i386/src.i386/sys/arch/i386/compile/ARRESUM i386
Architecture: i386
Machine: i386
>Description:
	The library run path for libmysqlclien isn't stored in the mysql.so library.

# ldd /usr/pkg/lib/perl5/site_perl/5.6.1/i386-netbsd/auto/DBD/mysql/mysql.so
/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
         -lmysqlclient.10 => not found
         -lm.0 => /usr/lib/libm387.so.0
         -lm.0 => /usr/lib/libm.so.0
         -lz.0 => /usr/lib/libz.so.0

From the build output:

LD_RUN_PATH="/usr/pkg/lib/mysql:/usr/lib" cc  --whole-archive -shared  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib dbdimp.o  mysql.o -L/usr/pkg/lib/mysql -o ../blib/arch/auto/DBD/mysql/mysql.so   -L/usr/pkg/lib/perl5/5.6.1/i386-netbsd/CORE -Wl,-R/usr/pkg/lib/perl5/5.6.1/i386-netbsd/CORE -lperl -L/usr/pkg/lib/mysql -lmysqlclient -lm -lz  

There is no -Wl,-R/usr/pkg/lib/mysql option.

Adding it manualy to Msql-Mysql-modules-1.2215/mysql/Makefile fixed my problem.

But I think this is a generic perl module problem.

>How-To-Repeat:
	Try to use mysql in an perl html script and notice the error messages in your
	logfile:
Can't load '/usr/pkg/lib/perl5/site_perl/5.6.1/i386-netbsd/auto/DBD/mysql/mysql.so' for module DBD::mysql: Shared object "libmysqlclient.so.10" not found at /usr/pkg/lib/perl5/5.6.1/i386-netbsd/DynaLoader.pm line 206.
 at /usr/pkg/lib/perl5/site_perl/5.6.1/i386-netbsd/Mysql.pm line 13
Compilation failed in require at /usr/pkg/lib/perl5/site_perl/5.6.1/i386-netbsd/Mysql.pm line 13.

>Fix:
	Fix the perl package to add this automatically.
>Release-Note:
>Audit-Trail:
>Unformatted: