Skip Menu |
Report information
Id: 90106
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: ntyni [at] debian.org
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: HasPatch
Severity: low
Type:
Perl Version: (no value)
Fixed In: (no value)



Subject: 5.14.0-RC2 ODBM_File failures on Ubuntu natty [multiarch]
Date: Sun, 8 May 2011 16:02:39 +0300
To: perlbug [...] perl.org
From: Niko Tyni <ntyni [...] debian.org>
Download (untitled) / with headers
text/plain 2.9k
On a minimal Ubuntu natty installation with the libgdbm-dev package installed, 5.14.0-RC2 configured with "./Configure -des -Dusethreads" gives Failed 5 tests out of 2030, 99.75% okay. ../cpan/Memoize/t/errors.t ../dist/threads/t/free2.t ../ext/ODBM_File/t/odbm.t ../lib/DBM_Filter/t/01error.t op/threads.t The last is [perl #90006], the rest are all due to an ODBM_File linkage problem: ../cpan/Memoize/t/errors.t ..... 1/11 ../../t/perl: symbol lookup error: ../../lib/auto/ODBM_File/ODBM_File.so: undefined symbol: dbminit ../cpan/Memoize/t/errors.t ..... Dubious, test returned 127 (wstat 32512, 0x7f00) Failed 5/11 subtests ../dist/threads/t/free2.t ...... ok ../ext/ODBM_File/t/odbm.t ...... 1/? ../../t/perl: symbol lookup error: ../../lib/auto/ODBM_File/ODBM_File.so: undefined symbol: dbminit ../ext/ODBM_File/t/odbm.t ...... Dubious, test returned 127 (wstat 32512, 0x7f00) All 2 subtests passed ../lib/DBM_Filter/t/01error.t .. 1/21 ./perl: symbol lookup error: ../lib/auto/ODBM_File/ODBM_File.so: undefined symbol: dbminit ../lib/DBM_Filter/t/01error.t .. Dubious, test returned 127 (wstat 32512, 0x7f00) The problem is that -lgdbm_compat is needed for dbminit, but ext/ODBM_File/hints/linux.pl checks hardcoded library paths for the existence of libgdbm_compat.so: # uses GDBM dbm compatibility feature - at least on SuSE 8.0 $self->{LIBS} = ['-lgdbm']; # Debian/Ubuntu have /usr/lib/libgdbm_compat.so.3* but not this file, # so linking may fail if (-e '/usr/lib/libgdbm_compat.so' or -e '/usr/lib64/libgdbm_compat.so') { $self->{LIBS}->[0] .= ' -lgdbm_compat'; } The check fails and gdbm_compat is left out because Ubuntu has switched to a 'multiarch' library setup, see <https://wiki.ubuntu.com/MultiarchSpec> for details. The file has migrated to /usr/lib/x86_64-linux-gnu/libgdbm_compat.so, with the third component depending on the architecture. I see the comment about Debian/Ubuntu traces back to http://www.nntp.perl.org/group/perl.perl5.porters/2007/11/msg130520.html which was a weird issue where a Debian system had libgdbm.so but not libgdbm_compat.so. I checked the Debian 3.0 and 3.1 libgdbm-dev packages from that time, but couldn't find any trace of the issue. I expect (but haven't verified) that just about everybody needs libgdbm_compat.so nowadays. Quoting Andy Dougherty in the 2007 thread: Show quoted text
> Ideally, for each *dbm* that Configure thinks it has found, Configure > should try to compile, link, and run a small program that actually uses > that database. Currently, we're just playing catch-up as different > vendors find different (sensible, but incompatible) ways of repackaging > everything. > > No, don't worry, I'm not proposing *doing* anything right now! Your '-e' > hack should cover it for a while.
"For a while" seems to have been 3,5 years in this case... For now, Ubuntu is disabling the check in their 5.12 packages and linking unconditionally against gdbm_compat. -- Niko Tyni ntyni@debian.org
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 522b
I would recommend using the attached file ext/ODBM_File/hints/linux.pl With it, all test passes on my Ubuntu natty. ~/perl5/perlbrew/build/perl-5.14.0-RC2$ ldd lib/auto/ODBM_File/ODBM_File.so linux-vdso.so.1 => (0x00007fff9abff000) libgdbm.so.3 => /usr/lib/x86_64-linux-gnu/libgdbm.so.3 (0x00007fc2a7854000) libgdbm_compat.so.3 => /usr/lib/x86_64-linux-gnu/libgdbm_compat.so.3 (0x00007fc2a7651000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc2a7290000) /lib64/ld-linux-x86-64.so.2 (0x00007fc2a7c61000)
Download linux.pl
text/x-perl 285b
# uses GDBM dbm compatibility feature - at least on SuSE 8.0 $self->{LIBS} = ['-lgdbm']; # Debian/Ubuntu have libgdbm_compat.so but not this file, # so linking may fail foreach (split / /, $Config{libpth}) { $self->{LIBS}->[0] .= ' -lgdbm_compat' if -e $_.'/libgdbm_compat.so'; }
Subject: Re: [perl #90106] 5.14.0-RC2 ODBM_File failures on Ubuntu natty [multiarch]
Date: Tue, 10 May 2011 09:26:42 -0400
To: Vladimir Timofeev via RT <perlbug-comment [...] perl.org>
From: Jesse Vincent <jesse [...] fsck.com>
Download (untitled) / with headers
text/plain 798b
Thanks. Tested that this works locally on natty with libgdbm-dev installed. I've pushed this to jesse/5.14.1-gdbm_multiarch_compat for application to blead after 5.14.0 goes out. On Mon 9.May'11 at 3:47:58 -0700, Vladimir Timofeev via RT wrote: Show quoted text
> I would recommend using the attached file ext/ODBM_File/hints/linux.pl > > With it, all test passes on my Ubuntu natty. > > ~/perl5/perlbrew/build/perl-5.14.0-RC2$ ldd lib/auto/ODBM_File/ODBM_File.so > linux-vdso.so.1 => (0x00007fff9abff000) > libgdbm.so.3 => /usr/lib/x86_64-linux-gnu/libgdbm.so.3 (0x00007fc2a7854000) > libgdbm_compat.so.3 => /usr/lib/x86_64-linux-gnu/libgdbm_compat.so.3 (0x00007fc2a7651000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc2a7290000) > /lib64/ld-linux-x86-64.so.2 (0x00007fc2a7c61000) >
Download (untitled) / with headers
text/plain 265b
On Tue May 10 06:27:06 2011, jesse wrote: Show quoted text
> Thanks. Tested that this works locally on natty with libgdbm-dev > installed. I've pushed this to jesse/5.14.1-gdbm_multiarch_compat for > application to blead after 5.14.0 goes out.
It hath now been applied as 3c998e0.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org