Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189619 - sys-apps/coreutils-6.9-r1 fails to compile on hardened from stage1
Summary: sys-apps/coreutils-6.9-r1 fails to compile on hardened from stage1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: AMD64 Linux
: High major with 1 vote (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-20 17:39 UTC by Luca Lesinigo
Modified: 2008-01-10 00:58 UTC (History)
4 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 Luca Lesinigo 2007-08-20 17:39:37 UTC
Starting from a hardened/amd64 2007.0 stage1 tarball in a Xen-3.0.4 Dom0, bootstrap.sh goes without problems, then while doing emerge -e system it fails to upgrade coreutils-6.4 to 6.9-r1. The rest of the system is running fine, I'm pretty sure it's not an hardware issue.
I get the same problem if I switch to the '-vanilla' gcc profile before trying to emerge coreutils.

*************************** ebuild error
Making all in sort
make[2]: Entering directory `/var/tmp/portage/sys-apps/coreutils-6.9-r1/work/coreutils-6.9/tests/sort'
test 'sort' = test && prog=../../src/sort || prog=sort; \
        perl -I. -w -- ./../mk-script . $prog > sort-tests.n
Can't locate auto/POSIX/assert.al in @INC (@INC contains: . /etc/perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux /usr/lib64/perl5/vendor_perl/5.8.8 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux /usr/lib64/perl5/site_perl/5.8.8 /usr/lib64/perl5/site_perl /usr/lib64/perl5/5.8.8/x86_64-linux /usr/lib64/perl5/5.8.8 /usr/local/lib/site_perl .) at ./../mk-script line 52
make[2]: *** [sort-tests] Error 255
make[2]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-6.9-r1/work/coreutils-6.9/tests/sort'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-6.9-r1/work/coreutils-6.9/tests'
make: *** [all-recursive] Error 1

!!! ERROR: sys-apps/coreutils-6.9-r1 failed.
Call stack:
  ebuild.sh, line 1638:   Called dyn_compile
  ebuild.sh, line 985:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  coreutils-6.9-r1.ebuild, line 104:   Called die
*************************** every time I try I get a segfault:
conftest[20233]: segfault at 0000000055656030 rip 0000555555554a3f rsp 00007fffff8235a0 error 4
*************************** emerge --info
Portage 2.1.2.12 (hardened/amd64, gcc-3.4.6, glibc-2.5-r4, 2.6.16.52-xen0 x86_64)
=================================================================
System uname: 2.6.16.52-xen0 x86_64 Intel(R) Xeon(TM) CPU 3.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 20 Aug 2007 12:30:01 +0000
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61
sys-devel/automake:  1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fforce-addr"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="binpkgs distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.it.gentoo.org/gentoo-portage"
USE="amd64 berkdb cracklib crypt hardened iproute2 justify midi ncurses nls nptl nptlonly ntplonly pam pic readline screen snmp sse2 ssl tcpd urandom xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Darwin 2007-08-21 12:30:16 UTC
The fail is in Coreutils.
Same error in a same conditions on a amd64 without hardened.

Stage 1 dont works in stable or inestable branch for coreutils compile fail.
Comment 2 Sam Barlow 2007-08-27 15:32:45 UTC
I get the same error from a stage1 install on an emerge -e system after a bootstrap.  I am not using hardened but the default.

make[2]: Entering directory `/var/tmp/portage/sys-apps/coreutils-6.9-r1/work/coreutils-6.9/tests/sort'
test 'sort' = test && prog=../../src/sort || prog=sort; \
        perl -I. -w -- ./../mk-script . $prog > sort-tests.n
Can't locate auto/POSIX/assert.al in @INC (@INC contains: . /etc/perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux /usr/lib64/perl5/vendor_perl/5.8.8 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux /usr/lib64/perl5/site_perl/5.8.8 /usr/lib64/perl5/site_perl /usr/lib64/perl5/5.8.8/x86_64-linux /usr/lib64/perl5/5.8.8 /usr/local/lib/site_perl .) at ./../mk-script line 52
make[2]: *** [sort-tests] Error 255
make[2]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-6.9-r1/work/coreutils-6.9/tests/sort'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-6.9-r1/work/coreutils-6.9/tests'
make: *** [all-recursive] Error 1

!!! ERROR: sys-apps/coreutils-6.9-r1 failed.
Call stack:
  ebuild.sh, line 1638:   Called dyn_compile
  ebuild.sh, line 985:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  coreutils-6.9-r1.ebuild, line 104:   Called die

!!! emake
!!! 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-apps/coreutils-6.9-r1/temp/build.log'.

Portage 2.1.2.12 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.12-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r6 x86_64 AMD Opteron(tm) Processor 246
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 27 Aug 2007 02:00:01 +0000
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61
sys-devel/automake:  1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=opteron"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/make.conf"
CONFIG_PROTECT_MASK="/etc /etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -march=opteron"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.utdlug.org/linux/distributions/gentoo/ http://gentoo.osuosl.org/ http://www.gtlib.gatech.edu/pub/gentoo/"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext acl amd64 berkdb bitmap-fonts cli cracklib crypt cups dri fortran gdbm gpm iconv isdnlog midi mmx mmxext mudflap ncurses nptl nptlonly openmp pae pam pcre perl pppd python readline reflection session spl sse sse2 ssl tcpd truetype-fonts type1-fonts unicode userlocales xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Jozef Behran 2007-08-31 23:28:51 UTC
This bug also breaks emerge -e system during boostrapping installation when the emerge --info shows the following:

--- snip ---

Portage 2.1.2.12 (default-linux/x86/no-nptl, gcc-4.1.2, glibc-2.5-r4, 2.6.11-6mdk i686)
=================================================================
System uname: 2.6.11-6mdk i686 AMD Athlon(tm) Processor
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 30 Aug 2007 21:30:01 +0000
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apm arts berkdb bitmap-fonts cli cracklib crypt cups dri eds emboss encode foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 iconv imlib ipv6 isdnlog jpeg kde libwww mad midi mikmod motif mp3 mpeg mudflap ncurses nls ogg opengl openmp oss pam pcre perl png pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts vorbis x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotionsis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

--- snip ---

The failure output text is identical to what is shown in the bug description.

It is very probable the bug will manifest even when the USE list shown above is reduced or left as set by the stage1 tarball.

I think the crucial part to see what went wrong is the line "Can't locate auto/POSIX/assert.al in @INC". It seems a PERL package dependency is missing somewhere in the coreutils.ebuild file.
Comment 4 Bernd Steinhauser 2007-10-01 16:21:07 UTC
Duplicate of bug 147184.

If I remember correctly, you have to fiddle around with perl's use flag build, then rebuild coreutils, but, then you will hit the next problem.
It can be done (I actually did it), but it isn't very nice and that's exactly why
there is no further support for stage1.
Comment 5 Synesios Christou 2007-10-21 03:17:42 UTC
(In reply to comment #4)
> Duplicate of bug 147184.
> 
> If I remember correctly, you have to fiddle around with perl's use flag build,
> then rebuild coreutils, but, then you will hit the next problem.
> It can be done (I actually did it), but it isn't very nice and that's exactly
> why
> there is no further support for stage1.
> 

no you have just to compile first the perl package try to compile perl with emerge -av perl and u will see another needed packages which are not installed...
Comment 6 Ramon 2007-11-07 10:11:30 UTC
I'm building a stage3 with catalyst starting from a stage2-2007.0 on amd64 and have run into the same problem.

It appears to be caused by perl missing the perl-core/Test-Harness
This perlmodule is missing in case perl was built using the build useflag which is probably true for a stage2 ?

I'll try and force the stage3 to rebuild perl for me somewhere high in the dep-graph (at least before coreutils)
Comment 7 Ramon 2007-11-08 16:37:41 UTC
Found a solution, although I'm not entirely sure I'm happy with it.

The problem is caused by the following factors:
 * coreutils needs <PERLINC>auto/POSIX/assert.la present for it's sort test
 * Disabling tests on coreutils is not an option
 * <PERLINC>/auto/POSIX/assert.la is not present in stage1 or stage2 (2007.0) because perl was built using the build flag
 * dev-lang/perl-5.8.8-r2 is being rebuild in stage3 but is placed lower in the dep-graph because it's _only_ a use-flag update and the package itself is already present

Adding perl-core/Test-Harness as a dependency to coreutils solves this.
I'm not entirely sure that's a correct solution but hey it works for me (TM)
Comment 8 Christian Heim (RETIRED) gentoo-dev 2007-11-10 10:23:49 UTC
(In reply to comment #7)
> Found a solution, although I'm not entirely sure I'm happy with it.
> 
> The problem is caused by the following factors:
>  * coreutils needs <PERLINC>auto/POSIX/assert.la present for it's sort test
>  * Disabling tests on coreutils is not an option
>  * <PERLINC>/auto/POSIX/assert.la is not present in stage1 or stage2 (2007.0)
> because perl was built using the build flag
>  * dev-lang/perl-5.8.8-r2 is being rebuild in stage3 but is placed lower in the
> dep-graph because it's _only_ a use-flag update and the package itself is
> already present
> 
> Adding perl-core/Test-Harness as a dependency to coreutils solves this.
> I'm not entirely sure that's a correct solution but hey it works for me (TM)

We're hitting perl related errors during each years release. Gonna see if its still an issue, but so far I haven't seen it.
Comment 9 Luca Lesinigo 2008-01-10 00:43:23 UTC
I tried today to emerge a gentoo 2007.0 x86 from stage1 and it still hangs on coreutils-6.9-r1. I'm using non-hardened with standard make.conf.
Comment 10 Luca Lesinigo 2008-01-10 00:58:11 UTC
after emerge -e system halted on coreutils-6.9-r1, running emerge perl will fix the problem. After that another emerge -e system (or just an emerge -uDN system) will run smooth through all ebuilds.