Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31409 - libperl emerge crash
Summary: libperl emerge crash
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-18 05:52 UTC by Romang
Modified: 2004-05-19 13:55 UTC (History)
1 user (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 Romang 2003-10-18 05:52:20 UTC
Hello,

I try to update libperl sys-devel/libperl-5.8.1 [5.8.0]
Crash on compilation.

My make.conf :

USE="ipv6 tcpd pam ssl"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
ACCEPT_KEYWORDS="~x86"

Reproducible: Always
Steps to Reproduce:
1.emerge libperl
2.
3.

Actual Results:  
`sh  cflags "optimize='-march=athlon -O3 -pipe -fomit-frame-pointer'" pp_sort.o`
-fPIC pp_sort.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing -march=athlon -O3
-pipe -fomit-frame-pointer  -Wall
gcc -o libperl.so.1.5.8 -L/usr/local/lib perl.o malloc.o gv.o toke.o perly.o
op.o pad.o regcomp.o dump.o util.o mg.o reentr.o hv.o av.o run.o pp_hot.o sv.o
pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o
universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o locale.o pp_pack.o
pp_sort.o  -lnsl -ldl -lm -lcrypt -lutil -lc -lbsd  -Wl,-soname
-Wl,libperl.so.`echo libperl.so.1.5.8 | cut -d. -f3`
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../crt1.o(.text+0x18): In
function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [libperl.so.1.5.8] Error 1

!!! ERROR: sys-devel/libperl-5.8.1 failed.
!!! Function src_compile, Line 206, Exitcode 2
!!! Unable to make libperl.so
Comment 1 Romang 2003-10-27 08:23:15 UTC
Hello,

Nobody is answering on this bug ?

Regards
Comment 2 Robert Coie (RETIRED) gentoo-dev 2003-10-29 11:30:21 UTC
Can you try this with gcc 3.2.3?
Comment 3 Romang 2003-10-31 00:51:20 UTC
gcc version 3.3.2

gcc -o libperl.so.1.5.8 -L/usr/local/lib perl.o malloc.o gv.o toke.o perly.o
op.o pad.o regcomp.o dump.o util.o mg.o reentr.o hv.o av.o run.o pp_hot.o
sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o
deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o locale.o
pp_pack.o pp_sort.o  -lnsl -ldl -lm -lcrypt -lutil -lc -lbsd  -Wl,-soname
-Wl,libperl.so.`echo libperl.so.1.5.8 | cut -d. -f3`
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../crt1.o(.text+0x18): In
function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [libperl.so.1.5.8] Error 1

!!! ERROR: sys-devel/libperl-5.8.1 failed.
!!! Function src_compile, Line 206, Exitcode 2
!!! Unable to make libperl.so
Comment 4 SpanKY gentoo-dev 2004-01-20 09:06:23 UTC
it's weird ... i get this on one system but not on others ...

they're all running identical gcc/glibc:
gcc-3.3.2-r5, glibc-2.3.3_pre20040117-r0
Comment 5 SpanKY gentoo-dev 2004-01-20 09:44:04 UTC
the curious thing is that the final command does not have '-shared' in it thus gcc tries to produce a runnable binary (i.e. one that has a main func) ...

on all the boxes that this worked, they had -shared in the final compile cmd
Comment 6 SpanKY gentoo-dev 2004-01-20 09:52:30 UTC
romang: could you please post the output of `emerge info` ?
Comment 7 Creede Lambard 2004-02-24 17:41:47 UTC
I'm seeing this problem on my machine and have for over a week now. Perl refuses to compile with the same "undefined reference to main" error reported by romang. It's very frustrating as I want to update Spamassassin but it won't update until I can update Perl.

By the way I tried downgrading to GCC 3.2.2 as suggested elsewhere, no luck there either.

Output from emerge info:

Portage 2.0.50-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2-r9, 2.4.20-gentoo-r6)
=================================================================
System uname: 2.4.20-gentoo-r6 i586 AMD-K6(tm) 3D processor
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=k6-3 -O3 -pipe"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=k6-3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X aalib alsa apache2 apm arts avi berkdb cdr crypt cups directfb doc emacs encode esd fbcon flash foomaticdb gdbm gif gnome gpm gtk gtk2 imap imlib java jpeg kde kerberos ldap libg++ libwww mad maildir mikmod motif mozilla mpeg mysql nas ncurses nls oggvorbis opengl oss pam pdflib perl png pnp python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tetex truetype usb videos x86 xml xml2 xmms xv zlib"

Comment 8 Creede Lambard 2004-02-28 08:18:00 UTC
OK, here is some additional information that hopefully will help you to point me to a solution. When the ebuild fails, I go into /var/tmp/portage/libperl-5.8.2/work/perl-5.8.2/ext/B/C and run "make" the make fails. However, if I then run "perl Makefile.PL" in that directory and make again, the build succeeds. I have to do this again in the next directory up (.../ext/B), and in fact ran into the problem again with Byteloader and Cwd. So, I wrote a little script to go through every directory in .../ext, run Makefile.PL, and then am going to build again. I expect the build will run through to completion when I do this, based on what's happened so far.

Now the question is, is this a nasty ugly horrid hack or just a situation where for whatever reason the command that runs "perl Makefile.PL" in these directories didn't fire off or isn't being recognized? And how do I integrate this into the ebuild so portage knows I have perl installed so I can go on with my life?

Thank you.
Comment 9 Creede Lambard 2004-02-28 14:06:03 UTC
Scratch that additional information. I rebuilt all the makefiles and it still crashes with the "undefined reference to main" error. I tried running make and adding "shared" to the build line for libperl-1.3.8 as was suggested somewhere on the net, and it got me past this particular error, but then I ran into another error later on. I'll paste that error when I get back to my other machine. *sigh*

Where can I add -shared so it will be picked up when the ebuild builds so I can move on to the next blocking bug? Thanks.
Comment 10 Michael Cummings (RETIRED) gentoo-dev 2004-02-29 03:52:24 UTC
Spanky,

can you post the emerge info on a good box and the one from the failed box? I belive this to be a problem with the gcc/glibc call (yea, i know, humor me). thanks,

-mike
Comment 11 Michael Cummings (RETIRED) gentoo-dev 2004-05-01 13:29:20 UTC
3 months, no response. closing for age. reopen if you want to.
Comment 12 SpanKY gentoo-dev 2004-05-17 16:49:42 UTC
i hit this again on a box of mine ... traced it back to bad OS detection like rac suggested ...

the reason the OS was detected wrong was because `uname -a` was segfaulting on the configure script uses the output of `uname -a` to 'detect' the OS

fixing the uname segfault fixed everything else it would seem
Comment 13 Tom Gall (RETIRED) gentoo-dev 2004-05-19 13:55:42 UTC
Ok I just hit this today and I have a theory as to what caused it.

It was killing stage builds in catalyst and I couldn't figure out why. 

Here's my theory for the next poor hapless soul that comes along.

perl/libperl cares about uname -a such that if just maybe your uname -a output isn't quite parseable for whatever reason... mine being the following:

bash-2.05b$ uname -a
Linux tardis 2.6.6-ames #1 SMP Tue May 18 18:35:10 Local time zone must be set--see zic  ppc64 0 PPC970, altivec supported GNU/Linux


Note the timezone note yet... AH-HA!  compiled on a box that doesn't have that in uname and the stage built fine. 

An interesting theory...