Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130010 - [3.3/3.4] gcc compile fails with make-3.81 as SHELL isnt reset to /bin/sh
Summary: [3.3/3.4] gcc compile fails with make-3.81 as SHELL isnt reset to /bin/sh
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 130379 (view as bug list)
Depends on:
Blocks: 135706
  Show dependency tree
 
Reported: 2006-04-14 20:27 UTC by Robert Förster
Modified: 2006-08-19 06:29 UTC (History)
3 users (show)

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


Attachments
gcc-3.4-make-3.81-SHELL.patch (gcc-3.4-make-3.81-SHELL.patch,464 bytes, patch)
2006-04-22 11:33 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Förster 2006-04-14 20:27:26 UTC
constructing ../fixinc.sh for x86_64-pc-linux-gnu to run on x86_64-pc-linux-gnu
make TARGETS=oneprocess SHELL="/bin/zsh" CC="gcc" CFLAGS="-DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE" LDFLAGS="-Wl,-O1" LIBERTY="/var/tmp/portage/gcc-3.4.6/work/build/gcc/../libiberty/libiberty.a" install-bin
make[3]: Entering directory `/var/tmp/portage/gcc-3.4.6/work/build/gcc/fixinc'
/bin/zsh /var/tmp/portage/gcc-3.4.6/work/gcc-3.4.6/gcc/fixinc/genfixes machname.h
make[3]: /bin/zsh: Command not found
make[3]: *** [machname.h] Error 127
make[3]: Leaving directory `/var/tmp/portage/gcc-3.4.6/work/build/gcc/fixinc'
make[2]: *** [fixinc.sh] Error 2
make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.6/work/build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.6/work/build/gcc'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.6 failed.
Call stack:
  ebuild.sh, line 1532:   Called dyn_compile
  ebuild.sh, line 929:   Called src_compile
  ebuild.sh, line 1242:   Called toolchain_src_compile
  toolchain.eclass, line 24:   Called gcc_src_compile
  toolchain.eclass, line 1455:   Called gcc_do_make
  toolchain.eclass, line 1319:   Called die

!!! emake failed with profiledbootstrap
!!! If you need support, post the topmost build error, and the call stack if relevant.

rescue64 / # emerge --info
Portage 2.1_pre7-r5 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.3.6-r4, 2.6.15.6-amd64 x86_64)
=================================================================
System uname: 2.6.15.6-amd64 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre17
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 apache2 berkdb chroot crypt gd gif gpm hardened imap innodb jpeg justify maildir memlimit mysql nls nptl nptlonly pam pdflib pic png readline sasl session ssl tcpd threads tiff userlocales vda xml xml2 zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS
Comment 1 SpanKY gentoo-dev 2006-04-15 11:25:39 UTC
your env is polluted

make is pulling that from your env $SHELL
Comment 2 Robert Förster 2006-04-16 17:33:05 UTC
the question is why is it polluted...
shouldn't be the enviroment variable changed after the chroot and doing env-update?
because it is still "SHELL=/bin/zsh" after chrooting from my recuresystem in my real system and this can't be correct because my shell is /bin/bash inside of the chroot.
Comment 3 SpanKY gentoo-dev 2006-04-16 18:56:56 UTC
no, SHELL is autogenerated by your shell and bash has the behavior to not set the envvar 'SHELL' if it's already set
Comment 4 SpanKY gentoo-dev 2006-04-18 22:47:32 UTC
*** Bug 130379 has been marked as a duplicate of this bug. ***
Comment 5 Harald van Dijk (RETIRED) gentoo-dev 2006-04-19 05:20:40 UTC
If having the SHELL envvar set is considered pollution, shouldn't all shells (bash included) be modified to not set it?
Comment 6 SpanKY gentoo-dev 2006-04-19 06:20:36 UTC
talked with the make peeps and this is a bug in the gcc build system, so disregard all of my comments thus far :p
Comment 7 Carl A. Dunham 2006-04-19 06:22:46 UTC
Thank goodness for bugzilla's mid-air collision detection. ;-)
Comment 8 Joe Wells 2006-04-21 06:50:28 UTC
I have the same problem except with SHELL=/bin/tcsh.  I have had this
problem since sys-devel/gcc-3.4.6-r1 came out a few days ago.

The error messages look like this:

----------------------------------------------------------------------
constructing ../fixinc.sh for i686-pc-linux-gnu to run on i686-pc-linux-gnu
make TARGETS=oneprocess SHELL="/bin/tcsh" CC="gcc" CFLAGS=" -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE" LDFLAGS="" LIBERTY="/extra/var/tmp/portage/gcc-3.4.6-r1/work/build/gcc/../libiberty/libiberty.a" install-bin
make[3]: Entering directory `/extra/var/tmp/portage/gcc-3.4.6-r1/work/build/gcc/fixinc'
/bin/tcsh /extra/var/tmp/portage/gcc-3.4.6-r1/work/gcc-3.4.6/gcc/fixinc/genfixes machname.h
SHELL=/bin/sh: Command not found.
export: Command not found.
if: Expression Syntax.
----------------------------------------------------------------------

In this case, /bin/tcsh is successfully being started but of course
because it is being asked to run a /bin/sh script it then spews syntax
error messages and dies.

I have never had this problem with any prior gcc ebuilds or with
ebuilds of any other package.
Comment 9 SpanKY gentoo-dev 2006-04-22 11:24:27 UTC
seems gcc-4.x doesnt suffer from this issue
Comment 10 SpanKY gentoo-dev 2006-04-22 11:33:29 UTC
Created attachment 85202 [details, diff]
gcc-3.4-make-3.81-SHELL.patch

can you guys test this for me please
Comment 11 SpanKY gentoo-dev 2006-04-22 23:17:30 UTC
released in 3.3.6-r1 / 3.4.6-r1