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

ndbm failure in make test #7295

Closed
p5pRT opened this issue May 16, 2004 · 7 comments
Closed

ndbm failure in make test #7295

p5pRT opened this issue May 16, 2004 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented May 16, 2004

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

Searchable as RT29612$

@p5pRT
Copy link
Author

p5pRT commented May 16, 2004

From clock@twibright.com

Created by clock@twibright.com

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.

Perl Info

Flags:
    category=install
    severity=medium

Site configuration information for perl v5.8.0:

Configured by root at Fri Jan 16 18:54:38 CET 2004.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.23, archname=i686-linux
    uname='linux beton 2.4.23 #4 thu jan 1 14:23:43 cet 2004 i686 unknown '
    config_args='-des -Darchname=i686-linux -Dcc=gcc -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dlocincpth=  -Doptimize=-O2 -march=athlon-xp -fomit-frame-pointer -fstrength-reduce -fschedule-insns -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Dscriptdir=/usr/bin -Dman3ext=3pm -Dcf_by=Gentoo -Ud_csh -Di_gdbm -Di_db -Di_ndbm'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-DPERL5 -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -march=athlon-xp -fomit-frame-pointer -fstrength-reduce -fschedule-insns',
    cppflags='-DPERL5 -DPERL5 -fno-strict-aliasing'
    ccversion='', gccversion='3.2.2', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lpthread -lnsl -lndbm -lgdbm -ldl -lm -lc -lcrypt -lutil
    perllibs=-lpthread -lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/libc-2.3.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.0:
    /etc/perl
    /usr/lib/perl5/site_perl/5.8.0/i686-linux
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i686-linux
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/5.8.0/i686-linux
    /usr/lib/perl5/5.8.0
    /usr/local/lib/site_perl
    .


Environment for perl v5.8.0:
    HOME=/home/clock
    LANG (unset)
    LANGUAGE (unset)
    LC_CTYPE=cs_CZ
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/clock/usr/bin:/home/clock/bin:/opt/qt/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:/opt/java/bin:/usr/bin/X11:/usr/local/ssl/bin:/usr/local/sbin:/usr/local/samba/bin:/usr/local/samba/sbin:.:/opt/j2sdk/j2sdk/bin
    PERL_BADLANG (unset)
    SHELL=/bin/sh

@p5pRT
Copy link
Author

p5pRT commented May 18, 2004

From @ysth

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).
 

@p5pRT
Copy link
Author

p5pRT commented May 18, 2004

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 18, 2004

From @doughera88

On Sun, 16 May 2004, Clock @​ Twibright . Com wrote​:

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

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.

Site configuration information for perl v5.8.0​:

Oops -- we need the ./myconfig from your 5.8.4 installation attempt.

Unfortunately, where different Linux distributions have put the libndbm
library has varied considerably over the years, and suggested patches to
improve detection have often been incomplete and/or inconsistent, since
there is no one true way to do it. Life is further complicated by the
split between dbm packages and dbm-devel packages. You need the -devel
forms to actually compile in NDBM support.

However, Configure does try to find dbm_open() by itself before deciding
to include NDBM_File. The usual occurence, if ndbm doesn't look like
Configure expects, is that Configure simply fails to find dbm_open() and
doesn't suggest to use it.

Still, we need to see the ./myconfig output and the output of
'grep dbm config.sh' before making too many wild guesses.

--
  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented May 21, 2004

From at@altlinux.ru

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.

Inline 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|$)/;

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2004

From @rgs

Alexey Tourbin wrote​:

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

Thanks, applied as #22892.

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2004

@rgs - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant