While running in the sandbox shell (/usr/lib/portage/bin/sandbox), the IBM version of javac doesn't work because it cannot open libjvm.so. The path to this file is being truncated somehow. Here is a interactive session showing how javac works in a normal bash shell, and fails in sandbox : # which javac /opt/ibm-jdk-1.3.1/bin/javac # /usr/bin/emerge search portage Searching... [32;01m* [0m [01msys-apps/portage [0m Latest version available: 2.0.38 Latest version installed: 2.0.38 Homepage: http://www.gentoo.org Description: Portage ports system # cat test.java class Test { public void test () { int i=0; } } # javac test.java # ls -l Test.class -rw-r--r-- 1 root root 234 Oct 20 01:28 Test.class # /usr/portage/sandbox/lib/saportage/bin/sandbox ========================== Gentoo linux path sandbox =========================== Detection of the support files. Verification of the required files. Setting up the required environment variables. The protected environment has been started. -------------------------------------------------------------------------------- Shell being started in forked process. # which javac /opt/ibm-jdk-1.3.1/bin/javac # javac test.java BuildPath: No such file or directory BuildPath: using /opt/ibm-jdk-1.3.1/bin/ex BuildPath: No such file or directory BuildPath: using /opt/ibm-jdk-1.3.1/bi Can't find libjvm.so
Created attachment 4834 [details] strace output from running javac in sandbox. Somehow, the path to libjvm.so is being set to : /opt/ibm-jdk-1.3.1/bi/jre/bin/classic/libjvm.so when in fact it should be : /opt/ibm-jdk-1.3.1/jre/bin/classic/libjvm.so So actually I was wrong in the bug report when I said the path was truncated; in fact it's being lengthened (the 'bi') part).
Specifically, this is a problem with the sandbox and ANT. Nothing that uses ANT (or even ANT itself) can be installed while using the sandbox. I tracked this down laboriously and it only happens when the LD_PRELOAD environment variable has the sandbox library in it. If the other sandbox related environment variables aren't defined, the problem still happens.
Im CC'ing azarah and cretin since its a bug in sandbox. If im wrong please excuse me, but you both are working now on sandbox AFAIK. =)
nosferatu root # PORTAGE_TMPDIR=/root /usr/lib/portage/bin/sandbox ========================== Gentoo linux path sandbox =========================== Detection of the support files. Verification of the required files. Setting up the required environment variables. The protected environment has been started. -------------------------------------------------------------------------------- Shell being started in forked process. nosferatu root # cat test.java class Test { public void test () { int i=0; } } nosferatu root # javac test.java nosferatu root # What is your gcc version ? Can you test this with say blackdown-jdk ?
-My gcc is 2.95.3, using the 2.95.3-r7 ebuild. -I don't experience this bug with the blackdown JDK.
This should be fixed in portage 2.0.45-r3. If you have any problems related to this, please reopen the bug.