Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140921 - stage3 chroot fails to compile linux-headers-2.6.11-r2
Summary: stage3 chroot fails to compile linux-headers-2.6.11-r2
Status: RESOLVED DUPLICATE of bug 140983
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Stages (show other bugs)
Hardware: AMD64 Other
: High normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-18 08:04 UTC by Dustin J. Mitchell
Modified: 2006-07-21 08:10 UTC (History)
0 users

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 Dustin J. Mitchell 2006-07-18 08:04:35 UTC
I'm boostrapping the 2006.0 stage1 in a chroot; here's the error:

>>> Compiling source in /var/tmp/portage/linux-headers-2.6.11-r2/work/linux-2.6.11 ...
make[2]: Entering directory `/var/tmp/portage/linux-headers-2.6.11-r2/work/linux-2.6.11'
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[3]: *** [scripts/basic/fixdep] Error 2
make[2]: *** [scripts_basic] Error 2
make[2]: Leaving directory `/var/tmp/portage/linux-headers-2.6.11-r2/work/linux-2.6.11'

!!! ERROR: sys-kernel/linux-headers-2.6.11-r2 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  ebuild.sh, line 1248:   Called kernel-2_src_compile
  kernel-2.eclass, line 1046:   Called compile_headers
  kernel-2.eclass, line 454:   Called die


emerge --info:
Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64
Gentoo Base System version 1.6.14
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  [Not Present]
sys-devel/automake:  [Not Present]
sys-devel/binutils:  2.16.1
sys-devel/gcc-config: 1.3.12-r6
sys-devel/libtool:   [Not Present]
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -O2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg digest distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/"
LC_ALL="en_US.utf8"
PKGDIR="/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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="amd64 alsa avi bash-completion berkdb bitmap-fonts cli crypt cups dlloader dri eds encode foomaticdb fortran gif gpm imlib ipv6 isdnlog jpeg lzw lzw-tiff ncurses nls nptl nptlonly opengl pam pcre pdflib perl png pppd python qt3 qt4 readline reflection session spell spl ssl tcpd threads tiff truetype-fonts type1-fonts usb xml xml2 xorg xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS


and one of a few make.conf's I've tried:

# See http://gentoo-wiki.com/Safe_Cflags#1xx_Opteron_.28AMD.29
CFLAGS="-march=opteron -O2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"

# use flags
USE="-X -gnome -gtk -gtk2 -kde -qt -mp3 -mpeg -quicktime -emboss -gstreamer -openql -wv -sdl -php nptl nptlonly xml xml2 threads bash-completion"

# portage compilation configuration
FEATURES="buildpkg sandbox distlocks autoconfig sfperms strict digest"

# the *chroot* syncs against a real-world mirror; machines built *from* this chroot will not.SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/"

# Packages go here
PKGDIR=/packages


Here are the steps to reproduce:
mkdir $IMG
untar stage1 in $IMG
untar portage in $IMG/usr
add make.conf (see above for one that I tried)
chroot:
  emerge --sync
  /usr/portage/scripts/bootstrap.sh

This seems to happen regardless of:
 * whether I use '--resume' in the bootstrap.sh commandline
 * what kind of make.conf I install, if any at all (and thus what USE flags I use, etc.)
however, once it's failed, if I re-run the bootstrap.sh with --resume, it successfully compiles everything.  Go figure.

Please let me know if there's any other information required.
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2006-07-18 08:14:09 UTC
Well, the stage1 installation method is not supported, at all.

The general rule is if you're using a stage1 tarball, you're planning on picking up the pieces yourself.  That being said, have you tried any other versions of the linux-headers package than the current stable to see if it can be reproduced on newer versions?
Comment 2 Dustin J. Mitchell 2006-07-18 08:40:20 UTC
Hmm.. I was under the impression that the correct way to do a chroot'd build (for making customized stage3's and binpkgs) was to use a stage1, but some more reading shows the error of my ways.  I need all of the binpkgs from the 'system' build, so I'll be using a stage2 instead.

Sorry for the bogus bug report.
Comment 3 Dustin J. Mitchell 2006-07-21 08:10:23 UTC
There *is* actually a problem here, tracked down in #140983: if any of make's variables (MAKEFLAGS, MFLAGS, MAKELEVEL) are in the environment, this particular ebuild will fail.  
Comment 4 Dustin J. Mitchell 2006-07-21 08:10:39 UTC

*** This bug has been marked as a duplicate of 140983 ***