FAQ

On Sun, May 16, 2004 at 06:43:41AM -0000, clock@twibright.com (via RT) wrote:
Following the INSTALL instructions doesn't yield flawless perl compilation
on all systems.

On my system, make test fails on 5 tests all with problems with ndbm.

/home/clock/perl-5.8.4-bad/perl: relocation error: ../lib/auto/NDBM_File/NDBM_File.so: undefined symbol: dbm_open
# STATUS: 32512
# Failed at run/fresh_perl.t line 53

ndbm is present on my system:
clock@beton:~$ locate ndbm
/usr/include/db1/ndbm.h
/usr/include/gdbm/ndbm.h
/usr/include/ndbm.h
/usr/lib/libndbm.a
/usr/lib/libndbm.so
/usr/lib/perl5/site_perl/5.8.0/i686-linux/ndbm.ph

It is provided by gdbm. I ensured up-to-date version of gdbm is installed
by freshly reinstalling gdbm (gdbm-1.8.3), removing perl source and trying
everything again. I also did ldconfig after reinstalling gdbm. I also don't
have full disk.
Thanks for your report. I was hoping someone else would answer since
I'm not a linux user myself, but rather than let the silence continue,
I will stick my neck out and hope someone else will correct me.

Looking at the hints in ext/NDBM_File/hints/linux.pl, it seems that
perl is of the opinion that the libndbm.a library is to be avoided and
the compatibility routines in libgdbm.a used instead.

However, I thought that as of gdbm-1.8.1, the compatibility routines
were moved to a separate library libgdbm_compat.a. I see no sign of
perl's configuration process checking for or using this library
(except with cygwin), but I do see several linux bug reports where the
library is being linked; this implies to me that some linux
distributions are getting Configure to do so.

So, are you sure the libndbm* files are from your fresh gdbm
installation? If so, commenting out the $self->{LIBS} = line in the
linux hints file may help; if not, and there are the libgdbm_compat*
files, changing it to say -lgdbm_compat may help. Please let us know
the results.

Also, please send output from the ./myconfig script in your build
directory. The info attached to your report was from a 5.8.0
installation. For future reference, you can run "make nok" to
generate a bug report using the failed build's information (or just
email your report to perlbug@perl.org with the ./myconfig output
attached, assuming at least the Configure stage was successful).

Search Discussions

  • Alexey Tourbin at May 21, 2004 at 10:23 pm

    On Mon, May 17, 2004 at 08:11:41PM -0700, Yitzchak Scott-Thoennes wrote:
    Looking at the hints in ext/NDBM_File/hints/linux.pl, it seems that
    perl is of the opinion that the libndbm.a library is to be avoided and
    the compatibility routines in libgdbm.a used instead.

    However, I thought that as of gdbm-1.8.1, the compatibility routines
    were moved to a separate library libgdbm_compat.a. I see no sign of
    perl's configuration process checking for or using this library
    (except with cygwin), but I do see several linux bug reports where the
    library is being linked; this implies to me that some linux
    distributions are getting Configure to do so.

    So, are you sure the libndbm* files are from your fresh gdbm
    installation? If so, commenting out the $self->{LIBS} = line in the
    linux hints file may help; if not, and there are the libgdbm_compat*
    files, changing it to say -lgdbm_compat may help. Please let us know
    the results.
    Please consider the following patch.

    --- perl-5.9.1-20040521/ext/NDBM_File/hints/linux.pl- 2001-07-02 20:22:18 +0000
    +++ perl-5.9.1-20040521/ext/NDBM_File/hints/linux.pl 2004-05-21 22:05:18 +0000
    @@ -3,4 +3,6 @@
    # (no null key support)
    # Jonathan Stowe <gellyfish@gellyfish.com>
    use Config;
    -$self->{LIBS} = ['-lgdbm'] if $Config{libs} =~ /(?:^|\s)-lgdbm(?:\s|$)/;
    +use ExtUtils::Liblist;
    +($self->{LIBS}) = ExtUtils::Liblist->ext('-lgdbm -lgdbm_compat')
    + if $Config{libs} =~ /(?:^|\s)-lgdbm(?:\s|$)/;

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-build @
categoriesperl
postedMay 18, '04 at 3:11a
activeMay 21, '04 at 10:23p
posts2
users2
websiteperl.org

People

Translate

site design / logo © 2019 Grokbase