Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189417 - Portage does not respect unset of env vars (was www-servers/tomcat-6.0.13-r3 emerge fails)
Summary: Portage does not respect unset of env vars (was www-servers/tomcat-6.0.13-r3 ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 280653 200044
  Show dependency tree
 
Reported: 2007-08-19 00:07 UTC by Marc Raphael
Modified: 2009-08-07 18:35 UTC (History)
1 user (show)

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


Attachments
complete build log: /var/log/portage/www-servers:tomcat-6.0.13-r3:20070818-235534.log (www-servers:tomcat-6.0.13-r3:20070818-235534.log,14.81 KB, text/plain)
2007-08-19 05:47 UTC, Marc Raphael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Raphael 2007-08-19 00:07:28 UTC
emerge tomcat
build failed
!!! ERROR: www-servers/tomcat-6.0.13-r3 failed.

Reproducible: Always

Steps to Reproduce:
1.emerge -uDN world (or emerge -up world)
2.
3.

Actual Results:  
BUILD FAILED
/var/tmp/portage/www-servers/tomcat-6.0.13-r3/work/apache-tomcat-6.0.13-src/build.xml:89: Compile failed; see the compiler error output for details.

Total time: 18 seconds

!!! ERROR: www-servers/tomcat-6.0.13-r3 failed.
Call stack:
  ebuild.sh, line 1632:   Called dyn_compile
  ebuild.sh, line 983:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  tomcat-6.0.13-r3.ebuild, line 74:   Called eant 'build-jasper-jdt' 'deploy' '-Dbase.path=/var/tmp/portage/www-servers/tomcat-6.0.13-r3/temp' '-Dcompile.debug=false' '-Dant.jar=/usr/share/ant-core/lib/ant.jar' '-Dcommons-daemon.jar=/usr/share/commons-daemon/lib/commons-daemon.jar' '-Djdt.jar=/usr/share/eclipse-ecj-3.2/lib/ecj.jar' '-Djsp-api.jar=/usr/share/tomcat-servlet-api-2.5/lib/jsp-api.jar' '-Dservlet-api.jar=/usr/share/tomcat-servlet-api-2.5/lib/servlet-api.jar'
  java-utils-2.eclass, line 1919:   Called die

!!! eant failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/log/portage/www-servers:tomcat-6.0.13-r3:20070818-235534.log'.

!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.5  CLASSPATH="/usr/share/jdbc-mysql/lib/jdbc-mysql.jar:/usr/share/xerces-2/lib/xercesImpl.jar:/usr/share/servletapi-2.4/lib/servlet-api.jar:/usr/share/xerces-2/lib/xercesSamples.jar:/usr/share/jfreechart/lib/jfreechart.jar:/usr/share/xerces-2/lib/xml-apis.jar:/usr/share/servletapi-2.4/lib/jsp-api.jar:/usr/share/jcommon/lib/jcommon-0.9.7.jar:." JAVA_HOME="/opt/sun-jdk-1.5.0.12"
JAVACFLAGS="-source 1.5 -target 1.5" COMPILER="ecj-3.2"


Expected Results:  
a successful emerge

 emerge --info
Portage 2.1.2.11 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.21-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.21-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 18 Aug 2007 23:30:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 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"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
MAKEOPTS="-j3"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus doc dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kerberos mad midi mikmod mmx mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection ruby sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis xml xorg xv 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Dawid Węgliński (RETIRED) gentoo-dev 2007-08-19 00:26:54 UTC
> !!! If you need support, post the topmost build error, and the call stack if
> relevant.
> !!! A complete build log is located at
> '/var/log/portage/www-servers:tomcat-6.0.13-r3:20070818-235534.log'.

Yeah, so please do that. Stuff you posted here isn't usefull enough.
Comment 2 Marc Raphael 2007-08-19 05:47:15 UTC
Created attachment 128518 [details]
complete build log: /var/log/portage/www-servers:tomcat-6.0.13-r3:20070818-235534.log

 emerge --info
Portage 2.1.2.11 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.21-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.21-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 18 Aug 2007 23:30:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 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"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
MAKEOPTS="-j3"
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"
PORTDIR_OVERLAY="/usr/local/portage" emerge --info
Portage 2.1.2.11 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.21-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.21-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 18 Aug 2007 23:30:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 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"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
MAKEOPTS="-j3"
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"
PORTDIR_OVERLAY="/usr/local/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus doc dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kerberos mad midi mikmod mmx mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection ruby sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis xml xorg xv 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Marc Raphael 2007-08-19 05:54:44 UTC
 emerge --info
Portage 2.1.2.11 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.21-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.21-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 18 Aug 2007 23:30:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 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"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
MAKEOPTS="-j3"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus doc dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kerberos mad midi mikmod mmx mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection ruby sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis xml xorg xv 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-08-19 07:14:39 UTC
Reopen.
Comment 5 Petteri Räty (RETIRED) gentoo-dev 2007-08-19 09:12:58 UTC
(In reply to comment #0)
> CLASSPATH="/usr/share/jdbc-mysql/lib/jdbc-mysql.jar:/usr/share/xerces-2/lib/xercesImpl.jar:/usr/share/servletapi-2.4/lib/servlet-api.jar:/usr/share/xerces-2/lib/xercesSamples.jar:/usr/share/jfreechart/lib/jfreechart.jar:/usr/share/xerces-2/lib/xml-apis.jar:/usr/share/servletapi-2.4/lib/jsp-api.jar:/usr/share/jcommon/lib/jcommon-0.9.7.jar:."
> JAVA_HOME="/opt/sun-jdk-1.5.0.12"
> JAVACFLAGS="-source 1.5 -target 1.5" COMPILER="ecj-3.2"
> 
> 

Do you have a global CLASSPATH set? I can't really understand how this leaks here as we unset CLASSPATH in java-utils-2.eclass. Do you have some tricks in /etc/portage/bashrc?
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2007-08-19 09:25:00 UTC
(In reply to comment #5)
> 
> Do you have a global CLASSPATH set? I can't really understand how this leaks
> here as we unset CLASSPATH in java-utils-2.eclass. Do you have some tricks in
> /etc/portage/bashrc?
> 

Yep this happens with sun-jdk-1.5 and servetletapi-2.4 in global cp:

pena tomcat # JAVA_PKG_FORCE_VM="sun-jdk-1.5" JAVA_PKG_STRICT= CLASSPATH="/usr/share/servletapi-2.4/lib/servlet-api.jar:/usr/share/servletapi-2.4/lib/jsp-api.jar" devebuild tomcat-6.0.13-r3.ebuild clean compile 
Comment 7 Petteri Räty (RETIRED) gentoo-dev 2007-08-19 09:30:39 UTC
Also I think I didn't make it clear enough that setting a global CLASSPATH is a very bad thing to do in the first place.
Comment 8 Zac Medico gentoo-dev 2007-08-19 17:06:54 UTC
(In reply to comment #5)
> Do you have a global CLASSPATH set? I can't really understand how this leaks
> here as we unset CLASSPATH in java-utils-2.eclass. Do you have some tricks in
> /etc/portage/bashrc?

How about if you set it to an empty string?

I suppose we can scrub the environment when ${T}/environment exists so that unset variables are preserved between phases.
Comment 9 Marc Raphael 2007-08-20 05:23:17 UTC
I removed the CLASSPATH setting in /etc/env.d/21java-classpath
and the emerge was successful.
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2007-10-06 16:43:35 UTC
Anything to be done here?
Comment 11 Zac Medico gentoo-dev 2007-10-06 17:00:31 UTC
I guess this is close enough to bug 56407. Rather than try to unset variables and expecting them to stay that way, it's better to set them empty when possible.

*** This bug has been marked as a duplicate of bug 56407 ***
Comment 12 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-10-07 20:03:02 UTC
Looks like the real root of the problem here is two fold. Once a global env classpath was set. Two Tomcat init scripts inherit that, instead of setting it's own classpath. Which it does, but first call setting the CLASSPATH variable is as follows

CLASSPATH=${CLASSPATH}: so I will likely see about changing that next time I bump Tomcat or etc. Again it's kinda moot since one really should not be setting a global classpath. We might consider removing that ability from java-config, and only allow for say user classpaths to be set. No system classpath or etc.
Comment 13 Zac Medico gentoo-dev 2007-11-30 00:38:19 UTC
This is fixed in svn now, and it will be released in portage-2.1.4_rc5.
Comment 14 Zac Medico gentoo-dev 2007-12-03 01:08:27 UTC
This has been released in 2.1.4_rc5.