Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.14.0-RC2 ODBM_File failures on Ubuntu natty [multiarch] #11317

Closed
p5pRT opened this issue May 8, 2011 · 7 comments
Closed

5.14.0-RC2 ODBM_File failures on Ubuntu natty [multiarch] #11317

p5pRT opened this issue May 8, 2011 · 7 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented May 8, 2011

Migrated from rt.perl.org#90106 (status was 'resolved')

Searchable as RT90106$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 8, 2011

From @ntyni

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​:

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

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 9, 2011

From @vovkasm

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)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 9, 2011

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 9, 2011

From [Unknown Contact. See original ticket]

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)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 10, 2011

From @obra

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​:

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)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 18, 2011

From @cpansprout

On Tue May 10 06​:27​:06 2011, jesse wrote​:

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.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 18, 2011

@cpansprout - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant