Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 447348 - bootstrap-prefix fails on emerge 'sed'
Summary: bootstrap-prefix fails on emerge 'sed'
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-15 13:06 UTC by Carsten Raddatz
Modified: 2013-03-24 10:49 UTC (History)
0 users

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


Attachments
sed-4.2.1-r1 config.log (config.log,157.40 KB, text/plain)
2012-12-15 13:06 UTC, Carsten Raddatz
Details
sed-4.2.1-r1 build.log (build.log,14.99 KB, text/plain)
2012-12-15 13:07 UTC, Carsten Raddatz
Details
sed-4.2.1-r1 environment (environment,86.22 KB, text/plain)
2012-12-15 13:07 UTC, Carsten Raddatz
Details
emerge sed build.log with gawk in EPREFIX (build.log,88.41 KB, text/plain)
2012-12-18 11:55 UTC, Carsten Raddatz
Details
emerge sed config.log with gawk in EPREFIX (config.log,157.27 KB, text/plain)
2012-12-18 11:55 UTC, Carsten Raddatz
Details
emerge sed environment with gawk in EPREFIX (environment,86.16 KB, text/plain)
2012-12-18 11:55 UTC, Carsten Raddatz
Details
emerge gcc build.log (gcc-4.2.4-r01-build.log,562.92 KB, text/plain)
2012-12-18 14:50 UTC, Carsten Raddatz
Details
emerge gcc build.logs.tar.bz2 (gcc-build-logs.tar.bz2,31.78 KB, text/plain)
2012-12-18 14:51 UTC, Carsten Raddatz
Details
emerge gcc build environment (gcc-4.2.4-r01-environment,168.25 KB, text/plain)
2012-12-18 14:51 UTC, Carsten Raddatz
Details
emerge gcc build.logs.tar.bz2 nonparallel build (gcc-build-logs_nonparallel.tar.bz2,31.60 KB, text/plain)
2012-12-18 15:34 UTC, Carsten Raddatz
Details
emerge gcc build environment nonparallel build (gcc-4.2.4-r01-environment_nonparallel,168.23 KB, text/plain)
2012-12-18 15:34 UTC, Carsten Raddatz
Details
emerge gcc build.log nonparallel build (gcc-4.2.4-r01-build.log_nonparallel,554.01 KB, text/plain)
2012-12-18 15:35 UTC, Carsten Raddatz
Details
emerge gcc build environment nonparallel build with dirty symlink (gcc-build-logs_dirtysymlink.tar.bz2,31.61 KB, text/plain)
2012-12-18 16:06 UTC, Carsten Raddatz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Raddatz 2012-12-15 13:06:48 UTC
Created attachment 332356 [details]
sed-4.2.1-r1 config.log

I'm trying to execute bootstrap-prefix.sh on a QNAP NAS device, x86 based.

# uname -smirp
Linux 2.6.33.2 i686 unknown unknown

The script works up to this point:

>>> Failed to emerge sys-apps/sed-4.2.1-r1, Log file:

>>>  '/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-apps/sed-4.2.1-r1/temp/build.log'

>>>  * Messages for package sys-apps/sed-4.2.1-r1:

>>>  * ERROR: sys-apps/sed-4.2.1-r1 failed (compile phase):
>>>  *   econf failed
>>>  * 
>>>  * Call stack:
>>>  *          ebuild.sh, line   85:  Called src_compile
>>>  *        environment, line 2372:  Called econf '--bindir=/share/MD0_DATA/carsten/gentoo/bin' '--disable-acl' '--disable-nls'
>>>  *   phase-helpers.sh, line  467:  Called die
>>>  * The specific snippet of code:
>>>  *   			die "econf failed"
>>>  * 

>>> ...

>>> Hmmmm, I was already afraid of this to happen.  Running /share/MD0_DATA/carsten/gentoo/tmp/usr/bin/bash ./bootstrap-prefix.sh "/share/MD0_DATA/carsten/gentoo" stage3
>>> somewhere failed :(  Details might be found in the build log:
>>>   /share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-apps/sed-4.2.1-r1/temp/build.log
>>> I have no clue, really.  Please find friendly folks in #gentoo-prefix on
irc.gentoo.org, gentoo-alt@lists.gentoo.org mailing list, or file a bug
at bugs.gentoo.org under Gentoo/Alt, Prefix Support.  This is most
inconvenient, and it crushed my ego.  Sorry, I give up.

The error differs slightly, depending whether I have gawk on the host installed or just awk. 

Awk:

>>> configure: creating ./config.status
>>> config.status: creating bootstrap.sh
>>> awk: ./confUmq48h/subs.awk:2: Unexpected token
>>> config.status: error: could not create bootstrap.sh

Gawk:

>>> configure: creating ./config.status
>>> config.status: creating bootstrap.sh
>>> gawk: ./confNvcKVh/subs.awk:2: S["/; s/!.*/"]=gltests_LTLIBOBJS!%!_!# ""
>>> gawk: ./confNvcKVh/subs.awk:2:                                  ^ syntax error
>>> ...

Installed software:

>>> [~] # gcc --version
>>> gcc (GCC) 4.2.1
Comment 1 Carsten Raddatz 2012-12-15 13:07:16 UTC
Created attachment 332358 [details]
sed-4.2.1-r1 build.log
Comment 2 Carsten Raddatz 2012-12-15 13:07:38 UTC
Created attachment 332360 [details]
sed-4.2.1-r1 environment
Comment 3 Fabian Groffen gentoo-dev 2012-12-15 14:08:05 UTC
Can you try and export CONFIG_SHELL=/path/to/your/prefix/bash and try again?

It looks as if /bin/sh is busybox sh or something
Comment 4 Carsten Raddatz 2012-12-15 14:35:05 UTC
Yes, I should have mentioned that. It is a busybox based system that has made me headaches before.

Will experiment with CONFIG_SHELL.
Comment 5 Carsten Raddatz 2012-12-17 21:30:29 UTC
I tried to following:

- setting the user shell to a separately handcompiled bash, i.e. /var/tmp/bash/bash-build/bin/bash, works as in "env" showing that new bash, but results in the same error
- pointing CONFIG_SHELL to /var/tmp/bash/bash-build/bin/bash or /opt/bin/bash, resulting in a the same error
- alternatively using root's shell /bin/sh (busybox), results in a the same error

This is mildly frustrating, since the old step-by-step approach resulted in a different error, and much deeper into the procedure, way beyond sed: http://forums.gentoo.org/viewtopic-t-913956-highlight-qnap.html

I have a firmware update in the queue, but dread a host restart. Suspect it will not help much anyway. 

Any more ideas?
Comment 6 Fabian Groffen gentoo-dev 2012-12-18 07:50:08 UTC
Ok, so the error we see from busybox is its `find' implementation.  We expect full GNU find there.  It is used to chmod everything to something sane, so the fact that this fails is OK here.
Configure uses awk for config.status, and that one seems to bug.  So perhaps bootstrapping gawk (./bootstrap-prefix.sh ${EPREFIX}/tmp gawk) would help here, to use GNU awk, and not busybox' one.
Comment 7 Carsten Raddatz 2012-12-18 11:55:14 UTC
Created attachment 332632 [details]
emerge sed build.log with gawk in EPREFIX
Comment 8 Carsten Raddatz 2012-12-18 11:55:31 UTC
Created attachment 332634 [details]
emerge sed config.log with gawk in EPREFIX
Comment 9 Carsten Raddatz 2012-12-18 11:55:49 UTC
Created attachment 332636 [details]
emerge sed environment with gawk in EPREFIX
Comment 10 Carsten Raddatz 2012-12-18 11:56:30 UTC
See attachments, with gawk built beforehand we get the same error as we do when using an ipkg (host side) provided gawk.
Comment 11 Carsten Raddatz 2012-12-18 12:12:39 UTC
Yay, bootstrap-prefix.sh script is compiling away now. I did an ./bootstrap-prefix.sh ${EPREFIX}/tmp gawk and ./bootstrap-prefix.sh ${EPREFIX}/tmp sed before running it without parameters. 

Will post results.
Comment 12 Carsten Raddatz 2012-12-18 14:50:17 UTC
I got past the first few packages and into building a toolchain. Had to add full paths to the script for tools like find and touch to make it recignize the coreutils already installed on host system using ipkg. But ... 

It fails here:

>>> /share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/build/./gcc/xgcc -B/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/build/./gcc/ -B/share/MD0_DATA/carsten/gentoo/usr/i686-pc-linux-gnu/bin/ -B/share/MD0_DATA/carsten/gentoo/usr/i686-pc-linux-gnu/lib/ -isystem /share/MD0_DATA/carsten/gentoo/usr/i686-pc-linux-gnu/include -isystem /share/MD0_DATA/carsten/gentoo/usr/i686-pc-linux-gnu/sys-include -O2  -O2 -O2 -march=i686 -pipe  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -msse -c \
	/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/gcc-4.2.4/gcc/config/i386/crtfastmath.c \
	-o crtfastmath.o
/share/MD0_DATA/carsten/gentoo//tmp/usr/bin/bash /share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/gcc-4.2.4/gcc/../move-if-change tmp-macro_list macro_list
echo timestamp > s-macro_list
The directory that should contain system headers does not exist:
  /usr/include
make[3]: *** [stmp-fixinc] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/build'
make: *** [bootstrap-lean] Error 2
emake failed
 * ERROR: sys-devel/gcc-4.2.4-r01.4 failed (compile phase):
 *   emake failed with bootstrap-lean
 * 
 * Call stack:
 *     ebuild.sh, line   85:  Called src_compile
 *   environment, line 4120:  Called gcc_src_compile
 *   environment, line 2523:  Called toolchain_src_compile
 *   environment, line 4899:  Called gcc_do_make
 *   environment, line 2378:  Called die
 * The specific snippet of code:
 *       emake T= LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${EPREFIX}${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.2.4-r01.4'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.2.4-r01.4'`.
 * 
 * Please include /share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/build/gcc-build-logs.tar.bz2 in your bug report
 * 
 * The complete build log is located at '/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/temp/build.log'.
 * The ebuild environment file is located at '/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/temp/environment'.
 * Working directory: '/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/build'
 * S: '/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/work/build'

>>> Failed to emerge sys-devel/gcc-4.2.4-r01.4, Log file:

>>>  '/share/MD0_DATA/carsten/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r01.4/temp/build.log'

 * Messages for package sys-devel/gcc-4.2.4-r01.4:

 * Your host glibc is too old; disabling automatic fortify. bug 289757
 * Can't read /config.sub, skipping..
 * Can't read /config.guess, skipping..
 * removing -O2 because F77 rejected it
 * removing -march=i686 because F77 rejected it
 * removing -pipe because F77 rejected it
 * removing -O2 because FC rejected it
 * removing -march=i686 because FC rejected it
 * removing -pipe because FC rejected it
 * ERROR: sys-devel/gcc-4.2.4-r01.4 failed (compile phase):
 *   emake failed with bootstrap-lean
 * 
 * Call stack:
 *     ebuild.sh, line   85:  Called src_compile
 *   environment, line 4120:  Called gcc_src_compile
 *   environment, line 2523:  Called toolchain_src_compile
 *   environment, line 4899:  Called gcc_do_make
 *   environment, line 2378:  Called die
 * The specific snippet of code:
 *       emake T= LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${EPREFIX}${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.2.4-r01.4'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.2.4-r01.4'`.
 * 

Output of `emerge --info '=sys-devel/gcc-4.2.4-r01.4'`:

[carsten@NASC5654F ~]$ gentoo/usr/bin/emerge --info '=sys-devel/gcc-4.2.4-r01.4'
Portage 2.2.01.20837-prefix (prefix/linux/x86, gcc-4.2.1, unavailable, 2.6.33.2 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.33.2-i686-with-glibc2.3
Timestamp of tree: Fri, 17 Aug 2012 21:54:54 +0000
distcc 3.1 i686-unknown-linux-gnu [disabled]
app-shells/bash:      4.2_p10::gentoo_prefix
sys-devel/binutils:   2.22-r1::gentoo_prefix
sys-devel/gcc-config: 1.5-r2::gentoo_prefix
Repositories: gentoo_prefix
ACCEPT_KEYWORDS="~x86-linux"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -m32"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf"
CPPFLAGS="-I/share/MD0_DATA/carsten/gentoo//usr/include -I/share/MD0_DATA/carsten/gentoo//tmp/usr/include"
CXXFLAGS="-O2 -march=i686 -pipe -m32"
DISTDIR="/share/MD0_DATA/carsten/gentoo/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-L/share/MD0_DATA/carsten/gentoo//usr/lib -Wl,-rpath=/share/MD0_DATA/carsten/gentoo//usr/lib -L/share/MD0_DATA/carsten/gentoo//lib -Wl,-rpath=/share/MD0_DATA/carsten/gentoo//lib -L/share/MD0_DATA/carsten/gentoo//tmp/usr/lib -Wl,-rpath=/share/MD0_DATA/carsten/gentoo//tmp/usr/lib"
PKGDIR="/share/MD0_DATA/carsten/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/share/MD0_DATA/carsten/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/share/MD0_DATA/carsten/gentoo/var/tmp"
PORTDIR="/share/MD0_DATA/carsten/gentoo/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="bootstrap bzip2 cli cracklib crypt cxx dri iconv ipv6 modules mudflap ncurses nptl openmp pppd prefix session tcpd unicode x86 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

Output of emerge -pqv '=sys-devel/gcc-4.2.4-r01.4':

[carsten@NASC5654F ~]$ gentoo/usr/bin/emerge -pqv '=sys-devel/gcc-4.2.4-r01.4'
[ebuild  N    ] sys-libs/zlib-1.2.7  USE="-minizip -static-libs" 
[ebuild  N    ] sys-devel/gnuconfig-20120116 
[ebuild  N    ] sys-libs/ncurses-5.9-r2  USE="cxx unicode -ada -debug -doc (-gpm) -minimal -profile -static-libs -trace" 
[ebuild  N    ] virtual/libiconv-0 
[ebuild  N    ] sys-apps/texinfo-4.13-r2  USE="-nls -static" 
[ebuild  N    ] sys-devel/gcc-4.2.4-r01.4  USE="bootstrap cxx mudflap nptl openmp (-altivec) -build -doc -fortran -gcj -gtk (-hardened) (-libssp) (-multilib) -multislot -nls -nocxx -objc -objc++ -objc-gc -test (-vanilla)"
Comment 13 Carsten Raddatz 2012-12-18 14:50:56 UTC
Created attachment 332642 [details]
emerge gcc build.log
Comment 14 Carsten Raddatz 2012-12-18 14:51:33 UTC
Created attachment 332644 [details]
emerge gcc build.logs.tar.bz2
Comment 15 Carsten Raddatz 2012-12-18 14:51:53 UTC
Created attachment 332646 [details]
emerge gcc build environment
Comment 16 Fabian Groffen gentoo-dev 2012-12-18 15:17:51 UTC
you have no /usr/include?!?
Comment 17 Carsten Raddatz 2012-12-18 15:31:14 UTC
Actually no. The host system does not provide this.

Via the available ipkg on that host, I have installed stuff like coreutils into /opt/ and also /opt/include, which looks like its any other old sanely setup system.

Building non-parallel like redlizard in #gentoo-prefix suggested did not help. Can I bend bootstrap-prefix.sh to recognize it? Would that be a good idea, I doubt it.
Comment 18 Carsten Raddatz 2012-12-18 15:34:41 UTC
Created attachment 332650 [details]
emerge gcc build.logs.tar.bz2 nonparallel build
Comment 19 Carsten Raddatz 2012-12-18 15:34:56 UTC
Created attachment 332652 [details]
emerge gcc build environment nonparallel build
Comment 20 Carsten Raddatz 2012-12-18 15:35:19 UTC
Created attachment 332654 [details]
emerge gcc build.log nonparallel build
Comment 21 Carsten Raddatz 2012-12-18 16:06:42 UTC
Created attachment 332658 [details]
emerge gcc build environment nonparallel build with dirty symlink

Now I have a dirty symlink:

[/usr] # ls -l
drwxr-xr-x    2 admin    administ     2048 Oct 14 22:06 bin/
lrwxrwxrwx    1 admin    administ       12 Dec 18 16:47 include -> /opt/include/
drwxr-xr-x    7 admin    administ     9216 Dec 13 22:32 lib/
drwxr-xr-x    2 admin    administ     1024 Jul 31 18:21 libexec/
drwxr-xr-x   10 admin    administ     1024 Oct 14 22:06 local/
drwxr-xr-x    2 1011     1011         2048 Oct 14 22:06 sbin/
drwxr-xr-x    6 1011     1011         1024 Oct 14 22:06 share/

Not working. Back to where I came from in https://forums.gentoo.org/viewtopic-t-913956 :(
Comment 22 Fabian Groffen gentoo-dev 2012-12-18 16:15:59 UTC
For the same reason we can't support Debian/Ubuntu, we can't support this.  We need to patch the toolchain to be non-standard for your environment, to work.