Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 9371 - path to java files wrongly truncated while in sandbox
Summary: path to java files wrongly truncated while in sandbox
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: Lowest normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on: 11231
Blocks:
  Show dependency tree
 
Reported: 2002-10-20 03:58 UTC by Eugene Koontz
Modified: 2003-02-04 19:42 UTC (History)
3 users (show)

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


Attachments
strace output from running javac in sandbox. (sandbox.strace,23.05 KB, text/plain)
2002-10-20 04:05 UTC, Eugene Koontz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Koontz 2002-10-20 03:58:18 UTC
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
Comment 1 Eugene Koontz 2002-10-20 04:05:43 UTC
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).
Comment 2 Scott Dossey 2002-11-15 13:58:35 UTC
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.
Comment 3 Adrian Almenar 2002-11-29 17:11:12 UTC
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.  
=)  
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-11-30 09:26:00 UTC
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 ?
Comment 5 Eugene Koontz 2002-11-30 21:59:08 UTC
-My gcc is 2.95.3, using the 2.95.3-r7 ebuild.  -I don't experience this bug with the blackdown JDK.  
Comment 6 Adrian Almenar 2002-12-08 23:21:32 UTC
This should be fixed in portage 2.0.45-r3. 
 
If you have any problems related to this, please reopen the bug.