Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 84868

Summary: Compile of Perl ( dev-lang/perl-5.8.5-r5 ) failed
Product: Gentoo Linux Reporter: Denny Reeh <denny.reeh>
Component: [OLD] DevelopmentAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: critical CC: bengtfrost, howard_b_golden, ikaro, jesse, jthorp, jwbraun, neko, news, rotech, uriel.septim, vincent20165
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Denny Reeh 2005-03-11 08:39:47 UTC
Errno architecture (i686-linux-2.6.9-gentoo-r1) does not match executable architecture (i686-linux-2.6.10-gentoo-r6) at /usr/lib/perl5/5.8.5/i686-linux/Errno.pm line 11.
Compilation failed in require at lib/File/Path.pm line 166.
BEGIN failed--compilation aborted at lib/File/Path.pm line 166.
Compilation failed in require at lib/AutoSplit.pm line 8.
BEGIN failed--compilation aborted at lib/AutoSplit.pm line 8.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
make: *** [preplibrary] Error 9

!!! ERROR: dev-lang/perl-5.8.5-r5 failed.
!!! Function src_compile, Line 246, Exitcode 2
!!! Unable to make
!!! If you need support, post the topmost build error, NOT this status message.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Phil Richards 2005-03-11 09:15:00 UTC
Similar here, but with dev-lang/perl-5.8.6-r4:
[...]
./miniperl -Ilib lib/lib_pm.PL
Extracting lib.pm (with variable substitutions)
        AutoSplitting perl library
./miniperl -Ilib -e 'use AutoSplit; \
autosplit_lib_modules(@ARGV)' lib/*.pm
Errno architecture (i686-linux-2.6.10-gentoo-r7) does not match executable architecture (i686-linux-2.6.11-gentoo-r2) at /usr/lib/perl5/5.8.6/i686-linux/Errno.pm line 11.
Compilation failed in require at lib/File/Path.pm line 166.
BEGIN failed--compilation aborted at lib/File/Path.pm line 166.
Compilation failed in require at lib/AutoSplit.pm line 8.
BEGIN failed--compilation aborted at lib/AutoSplit.pm line 8.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
make: *** [preplibrary] Error 9

!!! ERROR: dev-lang/perl-5.8.6-r4 failed.


~ # emerge info
Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20050125-r0, 2.6.11-gentoo-r2 i686)
=================================================================
System uname: 2.6.11-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 18 2005, 07:07:28)]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r6
sys-devel/libtool:   1.5.10-r5
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/src/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/usr/src/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apm avi berkdb bitmap-fonts bzip2 cdr crypt cups curl emboss encode esd fam flac font-server foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib jpeg libg++ libwww mad mikmod mmx motif mozilla mp3 mpeg ncurses nls nntp nptl nptlonly offensive oggvorbis opengl pam pdflib perl png python qt quicktime readline samba scanner sdl slang speex spell sse ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts usb xml2 xmms xv zlib video_cards_i915"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS

Comment 2 Michael Cummings (RETIRED) gentoo-dev 2005-03-11 09:58:24 UTC
I'm looking at this now, will let you know in a little bit
Comment 3 Andrew Gaydenko 2005-03-11 10:18:28 UTC
the same:

Errno architecture (i686-linux-2.6.10-gentoo-r7) does not match executable architecture (i686-linux-2.6.11-gentoo-r3) at /usr/lib/perl5/5.8.6/i686-linux/Errno.pm line 11.
Comment 4 Vincent van de Camp 2005-03-11 11:17:33 UTC
5.8.5-r5 won't compile here either:

autosplit_lib_modules(@ARGV)' lib/*.pm
Can't locate Errno.pm in @INC (@INC contains: lib /etc/perl /usr/lib/perl5/site_perl/5.8.5/x86_64-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/x86_64-linux /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.5/x86_64-linux /usr/lib/perl5/5.8.5 /usr/local/lib/site_perl /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/x86_64-linux .) at lib/File/Path.pm line 166.
BEGIN failed--compilation aborted at lib/File/Path.pm line 166.
Compilation failed in require at lib/AutoSplit.pm line 8.
BEGIN failed--compilation aborted at lib/AutoSplit.pm line 8.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
make: *** [preplibrary] Error 9

!!! ERROR: dev-lang/perl-5.8.5-r5 failed.
!!! Function src_compile, Line 246, Exitcode 2
!!! Unable to make
!!! If you need support, post the topmost build error, NOT this status message.

But Errno.pm appears to be in @INC:

localhost vincentc # find /usr -name Errno.pm
/usr/lib/perl5/5.8.4/x86_64-linux/Errno.pm

localhost vincentc # emerge info
Portage 2.0.51-r2 (default-linux/amd64/2004.3, gcc-3.4.2, glibc-2.3.4.20040808-r1, 2.6.11.2 x86_64)
=================================================================
System uname: 2.6.11.2 x86_64 AMD Engineering Sample 00
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.6-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org 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.gentoo.org/gentoo-portage"
USE="amd64 acpi alsa berkdb bitmap-fonts crypt font-server fortran gif gpm ipv6 jp2 jpeg lzw lzw-tiff mp3 mtrr ncurses nls nptlonly opengl oss pam perl png python 
readline ssl tcpd tiff truetype truetype-fonts type1-fonts usb userlocales xml2 xpm xrandr xv zlib"
Comment 5 Frank Spies 2005-03-11 11:28:16 UTC
Same over here:

Errno architecture (i686-linux-2.6.9-gentoo-r13) does not match executable architecture (i686-linux-2.6.10-gentoo-r6) at /usr/lib/perl5/5.8.5/i686-linux/Errno.pm line 11.
Compilation failed in require at lib/File/Path.pm line 166.
BEGIN failed--compilation aborted at lib/File/Path.pm line 166.
Compilation failed in require at lib/AutoSplit.pm line 8.
BEGIN failed--compilation aborted at lib/AutoSplit.pm line 8.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
make: *** [preplibrary] Error 9

!!! ERROR: dev-lang/perl-5.8.5-r5 failed.

Comment 6 Michael Cummings (RETIRED) gentoo-dev 2005-03-11 11:31:38 UTC
The complaint is because your kernel version now doesn't match the kernel version when you installed perl the first time, and crops up because of the pending GLSA patch. Unfortunately my kernel matches still :/

I'm trying to get access to a box that meets these conditions so I can work through this and get this patch patched (pun not intended).
Comment 7 Adam Lill 2005-03-11 12:25:44 UTC
I have the same error.  I'm rebuilding my system and this showed up during the first "emerge system".  I'm not seeing the complaint about the architecture.  Libperl compiled successfully right before.


Error from emerge perl:

autosplit_lib_modules(@ARGV)' lib/*.pm
Can't locate Errno.pm in @INC (@INC contains: lib /etc/perl /usr/lib/perl5/site_perl/5.8.5/i686-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.5/i686-linux /usr/lib/perl5/5.8.5 /usr/local/lib/site_perl .) at lib/File/Path.pm line 166.
BEGIN failed--compilation aborted at lib/File/Path.pm line 166.
Compilation failed in require at lib/AutoSplit.pm line 8.
BEGIN failed--compilation aborted at lib/AutoSplit.pm line 8.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
make: *** [preplibrary] Error 9


Output from emerge info:

livecd portage # emerge info
Portage 2.0.51-r2 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r1 i686)
=================================================================
System uname: 2.6.9-gentoo-r1 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.16
Autoconf: 
Automake: 
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers:  sys-kernel/linux-headers-2.4.21-r1
Libtools: 
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://mirror.datapipe.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X acl apm arts avi berkdb bitmap-fonts crypt cups emboss encode font-server foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib ipv6 jpeg kde libg++ libwww mad mbox mikmod mmx motif mp3 mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl slp spell ssl svga tcpd truetype truetype-fonts type1-fonts winbind xml2 xmms xv zlib"
Comment 8 J. Alexander Treuman 2005-03-11 12:42:57 UTC
The problem is the patch uses ENOENT on line 166, which requires Errno.pm. Since that hasn't been built when AutoSplit uses File::Path, it ends up using the already installed version of it. This checks it's hardcoded $Config{'osver'} with the current one, failing if you previously installed perl while using a different kernel. I'm not sure if you can build Errno.pm before it gets to this point, so really the only option is to not use ENOENT.
Comment 9 Michael Borschel 2005-03-11 13:08:03 UTC
I had the same problem with i686-linux-2.6.10-gentoo-r4 and i686-linux-2.6.10-gentoo-r6. I edited the file /usr/lib/perl5/5.8.5/i686-linux/Errno.pm (lines 12 and 13) and replaced the old kernel-version by the new one. Now perl compiles without errors.
Hope that helps as workaround.
Comment 10 Paul Taylor 2005-03-11 13:56:33 UTC
I'm getting the same error using the new 2005.0 profile, only with different kernel versions:

Errno architecture (x86_64-linux-2.6.11-gentoo-r2) does not match executable architecture (x86_64-linux-2.6.11-gentoo-r3) at /usr/lib/perl5/5.8.6/x86_64-linux/Errno.pm line 11.

Like Adam (and following a suggestion in bug #84877), libperl emerged fine but didn't fix the problem.
Comment 11 Rene Petro 2005-03-11 14:02:09 UTC
Workaround help if perl is present on system but compiled on previous kernel. But how to install perl on new system without Errno.pm file ??? 
Little bit more thinking before patching something system dependent please... 
Comment 12 Jan De Poorter 2005-03-11 14:19:11 UTC
My workaround:

mkdir /usr/lib/perl5
mkdir /usr/lib/perl5/5.8.6/
mkdir /usr/lib/perl5/5.8.6/i686-linux/
cd /usr/lib/perl5/5.8.6/i686-linux/
wget http://testing.crsolutions.be/jan/gentoo/Errno.pm
nano -w Errno.pm

and edit line 14 to your system arch.. If you don't know what your system arch is, don't worry, you just re-emerge perl and it will tell you what your real arch is, just edit it again

I know its a dirty trick but its the only way to continue your installation..
Comment 13 Michael Cummings (RETIRED) gentoo-dev 2005-03-11 14:32:57 UTC
Seriously folks, this is fixed and in portage and should emerge sync'able very shortly. The core of the problem was where I was applying the patch to File::Path for the rmtree vuln - I had it in the unpack phase, moved it to the install (after make install) while the module is still in the chroot but after it would cause problems. This will not pose a problem on new boxes or old ones as soon as it hits your local mirror. 
Comment 14 Adam Potter 2005-03-11 14:42:00 UTC
Ah.  Hey..what can I say.  The bug-squashing around here goes pretty quick for the most part.

Anyhoo.. used Michael Borschel's workaround, and it emerged correctly.
Hope for everyone elses sakes that this bug gets squished quick and everyone can get on with their emerge "-uDav world"'s  :)

Thanks to the Gentoo folks for such a great community, also.
Comment 15 Paul Taylor 2005-03-11 16:37:12 UTC
Fixed with sync.
Comment 16 Michael Cummings (RETIRED) gentoo-dev 2005-03-12 04:42:49 UTC
*** Bug 84877 has been marked as a duplicate of this bug. ***
Comment 17 Denny Reeh 2005-03-12 04:46:28 UTC
verified! works fine.

the bug can be closed.

well done.
Comment 18 Ludovico Poggioli 2005-03-12 06:10:38 UTC
Also here perl compile fine after sync.
Comment 19 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-03-13 01:17:57 UTC
*** Bug 84949 has been marked as a duplicate of this bug. ***
Comment 20 Michael Cummings (RETIRED) gentoo-dev 2005-03-13 04:40:50 UTC
OK, going ahead and closing this out. Thank you all for your patience on this one. Someone asked me via email for more details, so I've pasted what I wrote below so there's a searchable reference to my snafu. 

The patch is in the tree and applied; the problem was with where I was applying
the patch, not the patch itself. It is the exact same patch that debian, for
instance, is using, it's all a matter of when to apply it. Following is my
broken explanation - feel free to ignore it and smile that the patch is
automatically being applied before perl is merged on to the system :)

The problem with the patch is that it invokes Errno.pm. During a build of perl,
your machine version (x86, amd_64, ppc, etc) is combined with your "osversion"
(kernel version, ie kernel-2.6.8, kernel-2.6.10-gentoo-r2, etc.) to make an
identifier of your platform. This information is then recorded in Config.pm,
early in the build process, and used for debug output, etc.. What I didn't
realize was that it is also being recorded in Errno.pm - which isn't built until
long after File::Path is built in the source install. On a normal binary distro,
or apparently my test machines, this didn't pose an issue. My kernel versions
hadn't changed since the last time I built perl, so when the build process went
to compile File::Path and couldn't find Errno.pm yet, it pulled it from my
already installed perl and was happy. But for folks that had changed kernel
versions between perl installs, the build process couldn't find Errno.pm, pulled
from the installed perl, then barfed (sorry) because the old Errno.pm had a
different osversion than the fresh Config.pm in the build directory. Hence the
problem. However, by applying the patch later in the process, after everything
has been built in perl and is sitting in the chroot waiting to be merged onto
the host box, everything is happy, no one has problems.

So, same patch, automatically applied for your rmtree safety, just applied at a
different junction in the building of perl.