Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157774 - dev-lang/perl: automagically detects gdbm (doesn't honour the ignore)
Summary: dev-lang/perl: automagically detects gdbm (doesn't honour the ignore)
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
: 354333 383959 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-10 16:11 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2014-07-07 12:44 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2006-12-10 16:11:43 UTC
As per summary, libperl-5.8.8-r1 does not honour the ignore set on gdbm, it automagically detects and then tries to use it, but failing at the end while crosscompiling (as it looks in / directories rather than ${ROOT}):

What libraries to use? [-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc]
...
Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

        arm-carel-linux-gnu-gcc -o try -O -ggdb -fno-inline -DOVR_DBL_DIG=14 -DDEBUGGING -L/usr/local/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
         ./try

and I got the following output:

/usr/libexec/gcc/arm-carel-linux-gnu/ld: cannot find -lgdbm
collect2: ld returned 1 exit status
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]
Ok.  Stopping Configure.

!!! ERROR: sys-devel/libperl-5.8.8-r1 failed.
Comment 1 Michael Cummings (RETIRED) gentoo-dev 2006-12-13 17:48:05 UTC
This is actually 2 different issues I think - our enforcing ${ROOT}, and gdbm. Looking at Configure, I actually don't see where our setting gdbm (or not) has any effect since it scans your library path regardless.
Comment 2 Michael Cummings (RETIRED) gentoo-dev 2006-12-13 18:03:08 UTC
can you try something for me? edit the ebuild at line 195 and hardcode the i_gdbm to be i_gdbm= (add an equal sign to it). this won't be a permanent solution, but will at least tell me if it works. For future readers, this is based on :

 1639   -U : undefine symbol:
 1640          -U symbol    symbol gets the value 'undef'
 1641          -U symbol=   symbol gets completely empty

(from the configure) - just thinking that undef vs empty is a big distinction. if this works, then parts of that ebuild need to be completely rewritten....hold on, that's line 195 in perl's ebuild, in the libperl ebuild it's line 211. Thanks!
Comment 3 impulze 2007-07-21 15:44:44 UTC
in case you didn't know it yet, that equal sign has no effect whatsoever on the ./configure output (error)
Comment 4 Mart Raudsepp gentoo-dev 2008-01-28 08:53:42 UTC
I get the same. Any progress on this?

Here's my output (the host is x86_64-pc-linux-gnu, crossdev is i586-unknown-linux-gnu):

Build Perl for SOCKS? [n]  
Use the PerlIO abstraction layer? [y]  
Build a threading Perl? [n]  
Build Perl for multiplicity? [n]  
Use which C compiler? [i586-unknown-linux-gnu-gcc]  
Checking for GNU cc in disguise and/or its version number...
Now, how can we feed standard input to your C preprocessor...
Directories to use for library searches? [/usr/local/lib /lib /usr/lib]  
What is the file extension used for shared libraries? [so]  
Try to use long doubles if available? [n]  
Checking for optional libraries...
What libraries to use? [-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc]  
What optimizer/debugger flag should be used?
[-march=i586 -O2 -mmmx -m3dnow -pipe]  
Any additional cc flags?
[-fno-strict-aliasing -pipe -Wdeclaration-after-statement]  
Let me guess what the preprocessor flags are...
Any additional ld flags (NOT including libraries)? [ -L/usr/local/lib]  
Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

	i586-unknown-linux-gnu-gcc -o try -march=i586 -O2 -mmmx -m3dnow -pipe -fno-strict-aliasing -pipe -Wdeclaration-after-statement -L/usr/local/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
	 ./try

and I got the following output:

/usr/libexec/gcc/i586-unknown-linux-gnu/ld: cannot find -lgdbm
collect2: ld returned 1 exit status
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]  
Ok.  Stopping Configure.
 * 
 * ERROR: sys-devel/libperl-5.8.8-r1 failed.
 * Call stack:
 *               ebuild.sh, line   46:  Called src_compile
 *             environment, line 2411:  Called die
 * The specific snippet of code:
 *       sh Configure -des -Darchname="${myarch}" -Dcccdlflags="-fPIC" -Dccdlflags="-rdynamic" -Dcc="$(tc-getCC)" -Dprefix="/usr" -Dvendorprefix="/usr" -Dsiteprefix="/usr" -Dlocincpth=" " -Doptimize="${CFLAGS}" -Duselargefiles -Duseshrplib -Dman3ext="3pm" -Dlibperl="${LIBPERL}" -Dd_dosuid -Dd_semctl_semun -Dcf_by="Gentoo" -Ud_csh "${myconf[@]}" || diefunc "$FUNCNAME" "$LINENO" "$?" "Unable to configure";
 *  The die message:
 *   Unable to configure
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-devel/libperl-5.8.8-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/libperl-5.8.8-r1/temp/environment'.
 * 

 * Messages for package sys-devel/libperl-5.8.8-r1 merged to /usr/i586-unknown-linux-gnu/:

 * 
 * ERROR: sys-devel/libperl-5.8.8-r1 failed.
 * Call stack:
 *               ebuild.sh, line   46:  Called src_compile
 *             environment, line 2411:  Called die
 * The specific snippet of code:
 *       sh Configure -des -Darchname="${myarch}" -Dcccdlflags="-fPIC" -Dccdlflags="-rdynamic" -Dcc="$(tc-getCC)" -Dprefix="/usr" -Dvendorprefix="/usr" -Dsiteprefix="/usr" -Dlocincpth=" " -Doptimize="${CFLAGS}" -Duselargefiles -Duseshrplib -Dman3ext="3pm" -Dlibperl="${LIBPERL}" -Dd_dosuid -Dd_semctl_semun -Dcf_by="Gentoo" -Ud_csh "${myconf[@]}" || diefunc "$FUNCNAME" "$LINENO" "$?" "Unable to configure";
 *  The die message:
 *   Unable to configure
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-devel/libperl-5.8.8-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/libperl-5.8.8-r1/temp/environment'.
Comment 5 Mart Raudsepp gentoo-dev 2008-01-28 09:01:29 UTC
Similar problem happens for USE=-berkdb
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2008-02-27 18:17:43 UTC
perl, is there anybody out there?
Comment 7 Fabian Groffen gentoo-dev 2008-06-13 18:39:53 UTC
isn't this bug resolved already in libperl-5.8.8-r2?

    # perl tries to link against gdbm if present, even without USE=gdbm
    if ! use gdbm; then
        sed -i '/^libswanted=/s/gdbm //' Configure
    fi
Comment 8 Andrei Slavoiu 2009-04-12 18:04:08 UTC
(In reply to comment #7)
> isn't this bug resolved already in libperl-5.8.8-r2?
> 
>     # perl tries to link against gdbm if present, even without USE=gdbm
>     if ! use gdbm; then
>         sed -i '/^libswanted=/s/gdbm //' Configure
>     fi
> 
No, it's not fixed:

Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

        armv4tl-softfloat-linux-gnueabi-gcc -o try -march=armv4t -mtune=arm920t -O1 -pipe -DOVR_DBL_DIG=14 -L/usr/local/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
         ./try

and I got the following output:

/usr/libexec/gcc/armv4tl-softfloat-linux-gnueabi/ld: cannot find -lgdbm
collect2: ld returned 1 exit status
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]
Ok.  Stopping Configure.
 *
 * ERROR: sys-devel/libperl-5.8.8-r2 failed.

Comment 9 Alex Filov 2009-04-23 12:54:07 UTC
Crosscompiling for arm: 


I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

        arm-unknown-linux-gnueabi-gcc -o try -O1 -pipe -DOVR_DBL_DIG=14 -L/usr/l
ocal/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
         ./try

and I got the following output:

/usr/libexec/gcc/arm-unknown-linux-gnueabi/ld: cannot find -lgdbm
collect2: ld returned 1 exit status
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]  
Ok.  Stopping Configure.


Then I emerge gdbm, and:



Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

        arm-unknown-linux-gnueabi-gcc -o try -O1 -pipe -DOVR_DBL_DIG=14 -L/usr/local/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
         ./try

and I got the following output:

/bin/sh: ./try: cannot execute binary file
The program compiled OK, but exited with status 126.
You have a problem.  Shall I abort Configure [y]  
Ok.  Stopping Configure.
Comment 10 Vince C. 2009-10-07 11:55:25 UTC
(In reply to comment #9)
> Crosscompiling for arm: 
> ...
> I can't compile the test program.
> You have a BIG problem.  Shall I abort Configure [y]  
> Ok.  Stopping Configure.

I confirm it too -- it fails cross-compiling for ARM (uclibc) on a x86_64.
Comment 11 Vince C. 2009-10-07 11:59:04 UTC
As for ARM, I think a possible workaround could be compile it in a virtual machine under QEMU, build a binpkg for use with arm-...-emerge. Anybody got it done? Or if there's a precompiled libperl PKG somewhere...
Comment 12 Karthik 2010-04-12 22:19:01 UTC
Hi,

  It looks like this problem still exists. I get the error 

/bin/sh: ./try: cannot execute binary file

when I try to emerge perl(sys-devel/perl or dev-lang/perl)

  Anyone else seeing this?

Regards,
K
Comment 13 Peter Volkov (RETIRED) gentoo-dev 2010-12-31 11:59:12 UTC
Problem still exists with:

[binary   R   ] dev-lang/perl-5.12.2-r4  USE="berkdb -build -debug -doc -gdbm -ithreads" 

lb19 ~ # ldd /usr/lib64/perl5/5.12.2/x86_64-linux/auto/NDBM_File/NDBM_File.so
	linux-vdso.so.1 =>  (0x00007fff437a9000)
	libgdbm_compat.so.3 => not found
	libc.so.6 => /lib/libc.so.6 (0x00007f63b1d78000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f63b22de000)


This breaks binary packages (I have gdbm on binary host, but I don't need it on most binary host clients).
Comment 14 Torsten Veller (RETIRED) gentoo-dev 2011-02-10 09:12:44 UTC
*** Bug 354333 has been marked as a duplicate of this bug. ***
Comment 15 Raffaello D. Di Napoli 2011-03-14 04:35:47 UTC
Same problem here, with USE=-berkdb and perl trying to link to it with -ldb, causing the build to fail.
Comment 16 SpanKY gentoo-dev 2011-09-19 04:39:19 UTC
this is going to get worse as gdbm-1.9.1 no longer installs gdbm_compat by default which means the build fails even when USE=-gdbm
Comment 17 Torsten Veller (RETIRED) gentoo-dev 2011-09-21 14:53:50 UTC
*** Bug 383959 has been marked as a duplicate of this bug. ***
Comment 18 Maxim Kammerer 2013-01-01 21:45:24 UTC
Should block bug #383747?
Comment 19 Nikoli 2013-10-09 09:07:41 UTC
> this is going to get worse as gdbm-1.9.1 no longer installs gdbm_compat by default which means the build fails even when USE=-gdbm

I see the opposite: no gdbm automagic happens and perl builds fine.

I updated sys-libs/gdbm from 1.8.3-r4 to 1.10, portage printed message about perl:
>>> package: sys-libs/gdbm-1.10
 *  - /usr/lib64/libgdbm_compat.so.3
 *  - /usr/lib64/libgdbm_compat.so.3.0.0
 *      used by /usr/lib64/perl5/5.12.4/x86_64-linux/auto/NDBM_File/NDBM_File.so (dev-lang/perl-5.12.4-r1)

But after rebuilding perl emerge did not install gdbm related files:
-/usr/lib64/perl5/5.12.4/x86_64-linux/NDBM_File.pm
-/usr/lib64/perl5/5.12.4/x86_64-linux/auto/NDBM_File
-/usr/lib64/perl5/5.12.4/x86_64-linux/auto/NDBM_File/NDBM_File.so

I recompiled perl again for checking if it is somehow related to preserved libs, but nothing changed - still no automagic, perl builds fine.

[ebuild   R   ~] sys-libs/gdbm-1.10  USE="-berkdb -exporter -static-libs" 0 kB
[ebuild   R    ] dev-lang/perl-5.12.4-r1  USE="-berkdb -build -debug -doc -gdbm -ithreads" 0 kB

May be results will be different if USE berkdb is enabled for perl, but i did not try.
Comment 20 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2014-02-21 10:17:05 UTC
(In reply to Nikoli from comment #19)
> > this is going to get worse as gdbm-1.9.1 no longer installs gdbm_compat by default which means the build fails even when USE=-gdbm
> 
> I see the opposite: no gdbm automagic happens and perl builds fine.
> 
> I updated sys-libs/gdbm from 1.8.3-r4 to 1.10, portage printed message about
> perl:
> >>> package: sys-libs/gdbm-1.10
>  *  - /usr/lib64/libgdbm_compat.so.3
>  *  - /usr/lib64/libgdbm_compat.so.3.0.0
>  *      used by
> /usr/lib64/perl5/5.12.4/x86_64-linux/auto/NDBM_File/NDBM_File.so
> (dev-lang/perl-5.12.4-r1)
> 
> But after rebuilding perl emerge did not install gdbm related files:
> -/usr/lib64/perl5/5.12.4/x86_64-linux/NDBM_File.pm
> -/usr/lib64/perl5/5.12.4/x86_64-linux/auto/NDBM_File
> -/usr/lib64/perl5/5.12.4/x86_64-linux/auto/NDBM_File/NDBM_File.so
> 
> I recompiled perl again for checking if it is somehow related to preserved
> libs, but nothing changed - still no automagic, perl builds fine.
> 
> [ebuild   R   ~] sys-libs/gdbm-1.10  USE="-berkdb -exporter -static-libs" 0
> kB
> [ebuild   R    ] dev-lang/perl-5.12.4-r1  USE="-berkdb -build -debug -doc
> -gdbm -ithreads" 0 kB
> 
> May be results will be different if USE berkdb is enabled for perl, but i
> did not try.

Is still actual for perl-5.16* ?
Comment 21 Sergey Popov gentoo-dev 2014-02-21 11:43:47 UTC
(In reply to Mikle Kolyada from comment #20)
> 
> Is still actual for perl-5.16* ?

Yes it is.

hades ~ # eix gdbm -cI
[I] sys-libs/gdbm (1.8.3-r4@05.12.2012): Standard GNU database libraries
hades ~ # equery f perl | grep NDBM
/usr/lib64/perl5/5.16.3/Memoize/NDBM_File.pm
/usr/lib64/perl5/5.16.3/x86_64-linux/NDBM_File.pm
/usr/lib64/perl5/5.16.3/x86_64-linux/auto/NDBM_File
/usr/lib64/perl5/5.16.3/x86_64-linux/auto/NDBM_File/NDBM_File.bs
/usr/lib64/perl5/5.16.3/x86_64-linux/auto/NDBM_File/NDBM_File.so
hades ~ # lddtree /usr/lib64/perl5/5.16.3/x86_64-linux/auto/NDBM_File/NDBM_File.so
NDBM_File.so => /usr/lib64/perl5/5.16.3/x86_64-linux/auto/NDBM_File/NDBM_File.so (interpreter => none)
    libgdbm_compat.so.3 => /usr/lib64/libgdbm_compat.so.3
        libgdbm.so.3 => /usr/lib64/libgdbm.so.3
    libc.so.6 => /lib64/libc.so.6
        ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
hades ~ # eix ^perl$ -I
[I] dev-lang/perl
     Available versions:  
        (0)     5.12.3-r1 ~5.12.4 5.12.4-r1 ~5.12.4-r2 [M]~5.14.1 [M]~5.14.1-r1 [M]~5.14.2 ~5.16.0 ~5.16.1 ~5.16.2
        (0/5.12)        ~5.12.5
        (0/5.16)        ~5.16.2-r1 5.16.3
        (0/5.18)        [M]~5.18.1
        {{berkdb build debug doc gdbm ithreads}}
     Installed versions:  5.16.3(0/5.16)(15:12:17 21.02.2014)(-berkdb -debug -doc -gdbm -ithreads)
     Homepage:            http://www.perl.org/
     Description:         Larry Wall's Practical Extraction and Report Language

"-gdbm", but perl still links to installed gdbm, thus - automagic
Comment 22 Sergey Popov gentoo-dev 2014-07-07 12:44:18 UTC
+*perl-5.20.0-r1 (07 Jul 2014)
+*perl-5.18.2-r1 (07 Jul 2014)
+
+  07 Jul 2014; Sergey Popov <pinkbyte@gentoo.org> -perl-5.18.2.ebuild,
+  +perl-5.18.2-r1.ebuild, -perl-5.20.0.ebuild, +perl-5.20.0-r1.ebuild,
+  files/eblits/src_configure-v50180002.eblit:
+  Revision bump: apply workaround for bug #157774 - do not build gdbm stuff
+  when USE='-gdbm'. Drop old revisions

Should be fixed now in 5.18.2-r1 and 5.20.0-r1. Please test