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
System: NetBSD bondage 5.1 NetBSD 5.1 (GENERIC-$Revision: 1.325.4.1 $) #0: Sat 
Nov 6 13:57:23 UTC 2010
Architecture: alpha
Machine: alpha

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 blib/lib/
/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"   
Running Mkbootstrap for GDBM_File ()
chmod 644
rm -f blib/arch/auto/GDBM_File/
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 
-Wl,-R/usr/pkg/lib/perl5/5.12.0/alpha-netbsd-thread-multi/CORE -lperl
chmod 755 blib/arch/auto/GDBM_File/
cp blib/arch/auto/GDBM_File/
chmod 644 blib/arch/auto/GDBM_File/
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)

And finally, a very simple perl program using GDBM_File:


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";

% ./
 Undefined PLT symbol "gdbm_open" (symnum = 23)

because we didn't link with -lgdbm....

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 script above works.


Home | Main Index | Thread Index | Old Index