pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44985: p5-gdbm not linking with -lgdbm



>Number:         44985
>Category:       pkg
>Synopsis:       p5-gdbm not linking with -lgdbm
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 21 10:50:00 +0000 2011
>Originator:     Dan McMahill
>Release:        NetBSD 5.1
>Organization:
NetBSD
>Environment:
        
        
System: NetBSD bondage 5.1 NetBSD 5.1 (GENERIC-$Revision: 1.325.4.1 $) #0: Sat 
Nov 6 13:57:23 UTC 2010 
builds%b8.netbsd.org@localhost:/home/builds/ab/netbsd-5-1-RELEASE/alpha/201011061943Z-obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/alpha/compile/GENERIC
 alpha
Architecture: alpha
Machine: alpha
>Description:

when database/p5-gdbm is built, I see the following in the build log:

===> Configuring for p5-gdbm-5.12.2
=> Checking for portability problems in extracted files
Note (probably harmless): No library found for -lgdbm
Note (probably harmless): No library found for -ldbm
Writing Makefile for GDBM_File


^^^^^ note the "no library found for -lgdbm" ^^^^^^

===> Building for p5-gdbm-5.12.2
cp GDBM_File.pm blib/lib/GDBM_File.pm
/usr/pkg/bin/perl /usr/pkg/lib/perl5/vendor_perl/5.12.0/ExtUtils/xsubpp 
-noprototypes -typemap /usr/pkg/lib/perl5/5.12.0/ExtUtils/typemap -typemap 
typemap  GDBM_File.xs > GDBM_File.xsc && mv GDBM_File.xsc GDBM_File.c
cc -c    -O2 -mcpu=21164a -mieee -pthread -I/usr/include -fno-strict-aliasing 
-pipe -O2 -mcpu=21164a -mieee -I/usr/pkg/include -I/usr/include    
-I/usr/pkg/include -I/usr/include    -DVERSION=\"1.10\"  -DXS_VERSION=\"1.1\" 
-DPIC -fPIC "-I/usr/pkg/lib/perl5/5.12.0/alpha-netbsd-thread-multi/CORE"   
GDBM_File.c
Running Mkbootstrap for GDBM_File ()
chmod 644 GDBM_File.bs
rm -f blib/arch/auto/GDBM_File/GDBM_File.so
cc  -Wl,-R/usr/pkg/lib --whole-archive -shared GDBM_File.o -L/usr/pkg/lib 
-Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -o 
blib/arch/auto/GDBM_File/GDBM_File.so            
-L/usr/pkg/lib/perl5/5.12.0/alpha-netbsd-thread-multi/CORE 
-Wl,-R/usr/pkg/lib/perl5/5.12.0/alpha-netbsd-thread-multi/CORE 
-Wl,-R/usr/pkg/lib/perl5/5.12.0/alpha-netbsd-thread-multi/CORE -lperl
chmod 755 blib/arch/auto/GDBM_File/GDBM_File.so
cp GDBM_File.bs blib/arch/auto/GDBM_File/GDBM_File.bs
chmod 644 blib/arch/auto/GDBM_File/GDBM_File.bs
Manifying blib/man3/GDBM_File.3
=> Unwrapping files-to-be-installed.

^^^^^^^ now no linking with -lgdbm ^^^^^^^^

make test shows the test being skipped:

===> Testing for p5-gdbm-5.12.2
PERL_DL_NONLAZY=1 /usr/pkg/bin/perl "-MExtUtils::Command::MM" "-e" 
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/gdbm.t .. skipped: GDBM_File was not built
Files=1, Tests=0,  0 wallclock secs ( 0.30 usr  0.12 sys +  0.10 cusr  0.08 
csys =  0.59 CPU)
Result: NOTESTS

And finally, a very simple perl program using GDBM_File:

-------------
#!/usr/pkg/bin/perl

use strict;
use warnings;
use GDBM_File;

my $filename = "/tmp/gdbm_test";
my %hash;

tie %hash, 'GDBM_File', $filename, &GDBM_WRCREAT, 0640;
# Use the %hash array.
untie %hash ;

print "All good\n";
-------------

% ./test.pl
/usr/pkg/lib/perl5/vendor_perl/5.12.0/alpha-netbsd-thread-multi/auto/GDBM_File/GDBM_File.so:
 Undefined PLT symbol "gdbm_open" (symnum = 23)

because we didn't link with -lgdbm....
        
>How-To-Repeat:
        
>Fix:

I can hack around this by 

make configure
vi work/perl-5.12.2/ext/GDBM_File/Makefile

and adding -lgdbm right next -lperl but I'm guessing there is a right way to 
get this module to recognize that I have gdbm installed
(via pkgsrc).

With this hack the simple test.pl script above works.
        

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index