Subject: (still having) problems with Perl bindings for rrdtool
To: NetBSD current-users <current-users@netbsd.org>
From: M Graff <explorer@flame.org>
List: current-users
Date: 10/30/2007 19:44:51
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/auto/RRDs/RRDs.so:
Undefined PLT symbol "rrd_clear_error" (symnum = 45)
/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/auto/RRDs/RRDs.so:
-lm.0 => /usr/lib/libm387.so.0
-lm.0 => /usr/lib/libm.so.0
-lcrypt.0 => /usr/lib/libcrypt.so.0
-lpthread.0 => /usr/lib/libpthread.so.0
-lperl =>
/usr/pkg/lib/perl5/5.8.0/i386-netbsd-thread-multi/CORE/libperl.so
The "fix" for this is to link the RRDs.so with --export-dynamic, to
which ldd will respond:
/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/auto/RRDs/RRDs.so:
-lz.1 => /usr/lib/libz.so.1
-lfreetype.6 => /usr/pkg/lib/libfreetype.so.6
-lm.0 => /usr/lib/libm387.so.0
-lm.0 => /usr/lib/libm.so.0
-lpng12.0 => /usr/pkg/lib/libpng12.so.0
-lart_lgpl_2.2 => /usr/pkg/lib/libart_lgpl_2.so.2
-lrrd.2 => /usr/pkg/lib/librrd.so.2
-lcrypt.0 => /usr/lib/libcrypt.so.0
-lpthread.0 => /usr/lib/libpthread.so.0
-lperl =>
/usr/pkg/lib/perl5/5.8.0/i386-netbsd-thread-multi/CORE/libperl.so
This makes my RRDs-using Perl code work with rrdtool again. However...
I tried this patch:
- --- bindings/perl-shared/Makefile.PL.orig 2007-05-02
18:06:11.000000000 +0000
+++ bindings/perl-shared/Makefile.PL 2007-10-30 23:38:09.000000000 +0000
@@ -22,7 +22,7 @@
# install_name which will includes the final location of the
# library after it is installed. This install_name gets transfered
# to the perl shared object.
- -
+$R = "--export-dynamic";
my $librrd = "-L../../src/.libs/ $R -lrrd";
WriteMakefile(
... but it doesn't work. It patches, sure, but the --export-dynamic is
only found if I, after typing "make", cd into the source directory
bindings/perl-shared/, rm RRDs.o, and then running 'gmake'
I also tried this patch to rrd's Makefile:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/rrdtool/Makefile,v
retrieving revision 1.58
diff -u -r1.58 Makefile
- --- Makefile 21 Sep 2007 13:03:33 -0000 1.58
+++ Makefile 31 Oct 2007 00:44:22 -0000
@@ -22,6 +22,7 @@
PERL5_CONFIGURE= no
PERL5_PACKLIST+= auto/RRDp/.packlist
PERL5_PACKLIST+= auto/RRDs/.packlist
+OTHERLDFLAGS+= --export-dynamic
# rrdtool explicitly forbids any use of -ffast-math
BUILDLINK_TRANSFORM+= rm:-ffast-math
... but that also does not work.
Anyone with more pkgsrc-foo knowledge have a hint? Ideally, this should
be fixed -- it's been broken since 2004!
- --Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
iD8DBQFHJ9ACuzMQWQwZDN0RAr8sAJ9Muwy/Mzw2DtswMkEz0lAbxv3bsQCghZNW
meGOUNjdYGZpAVcjM27kqsU=
=OclQ
-----END PGP SIGNATURE-----