Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 58088 - java-config autogenerates strange /etc/env.d/20java
Summary: java-config autogenerates strange /etc/env.d/20java
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 31468
  Show dependency tree
 
Reported: 2004-07-23 10:03 UTC by Thomas Lassmann
Modified: 2004-07-26 13:43 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 Thomas Lassmann 2004-07-23 10:03:35 UTC
after calling "java-config --set-system-vm=sun-jdk-1.4.2.03" java-config generated the file /etc/env.d/20java with the line "LD_ASSUME_KERNEL=2.2.5".

gentoo23# cat /etc/env.d/20java
# Autogenerated by java-config
# Command: --set-system-vm=sun-jdk-1.3.1.04
JDK_HOME=/opt/sun-jdk-1.3.1.04
JAVAC=/opt/sun-jdk-1.3.1.04/bin/javac
PATH="/opt/sun-jdk-1.3.1.04/bin:/opt/sun-jdk-1.3.1.04/jre/bin"
ROOTPATH="/opt/sun-jdk-1.3.1.04/bin:/opt/sun-jdk-1.3.1.04/jre/bin"
CLASSPATH=/opt/sun-jdk-1.3.1.04/lib/rt.jar:.
LDPATH="/opt/sun-jdk-1.3.1.04/jre/lib/"
# VERSION="Sun JDK 1.3.1.04"
JAVA_HOME=/opt/sun-jdk-1.3.1.04
LD_ASSUME_KERNEL=2.2.5 

Reproducible: Didn't try
Steps to Reproduce:
1.emerge dev-java/java-config-1.2.6
2.java-config --set-system-vm=sun-jdk-1.4.2.03
3.env-update && source /etc/profile

Actual Results:  
in my case no libc.so anymore
Comment 1 Joel Parker 2004-07-23 11:37:53 UTC
Just to make clear that this is a very serious bug. It basically means that when a user runs java-config, their system will be rendered unusable.
Comment 2 Thomas Lassmann 2004-07-23 12:23:37 UTC
This bug was original found in this thread:
http://forums.gentoo.org/viewtopic.php?t=198170
the same problem might be found here:
http://forums.gentoo.org/viewtopic.php?t=119706

I tried to reproduce it on the same system, but now the file /etc/env.d/20java is OK. I tried another mashine and it looks OK too.
I don't know where the line "LD_ASSUME_KERNEL=2.2.5" came from.
Comment 3 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-25 22:00:34 UTC
The LD_ASSUME_KERNEL=2.2.5 line must've come from the env file for that particular JVM in /etc/env.d/java, as it is java-config doesn't ignore variables it doesn't recognize but rather throws them into the /etc/env.d/20java file.
Comment 4 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-25 22:01:47 UTC
Relavent code is in CVS at gentoo-src/java-config/python/java_config/jc_envgen.py
Comment 5 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-25 22:44:32 UTC
What are the contents of /etc/env.d/java and what are the contents of each file in /etc/env.d/java ?
Comment 7 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-25 23:00:25 UTC
Apparently this was in the env file for version 1.3.1.04 of java currently there is no mention of LD_ASSUME_KERNEL in dev-java/sun-jdk so I can close this bug unless java-config is messing up when it's matching which env file to use for generating /etc/env.d/20java.
Comment 8 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-26 01:51:34 UTC
The reason I'm asking if java-config is selecting the wrong JVM is in your initial report on the bug you said the command you used was "java-config --set-system-vm=sun-jdk-1.4.2.03" but the generated file would indicate that you selected a version 1.3.1.04 JVM. I'm somewhat assuming that if this was the case another bug report would've showed up by now and the testing I've done so far doesn't suggest that java-config is select the wrong jvm...
Comment 9 Thomas Lassmann 2004-07-26 03:01:42 UTC
bevor I called java-config with jdk version 1.4, I updated with emerge from 1.3.1 to 1.4. So version 1.3.1 was not available anymore. Don't know why 1.3.1 was still there.
Comment 10 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-26 13:43:50 UTC
I'm resolving this bug as invalid, I don't have enough information to figure out if anything is still wrong according to the information the original reporter is providing. Java-config works correctly selecting system JVMs according to my tests, java-config's self-tests and the fact that no one else has filed a bug report regarding this. The environment file that was originally causing the problem is no longer in portage so if in fact java-config should pay attention to the variables it puts in /etc/evn.d/20java (personally I feel env-update should be the one paying attention to harmful variables) then another bug should be started.