pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42219: null-mounted sun java 5: could not find libjava.so



>Number:         42219
>Category:       pkg
>Synopsis:       null-mounted sun java 5: could not find libjava.so
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 23 17:50:00 +0000 2009
>Originator:     rudolf
>Release:        netbsd-5
>Organization:
>Environment:
NetBSD 5.0_STABLE (GENERIC) #0: Thu Aug 27 04:27:04 UTC 2009  
builds%b8.netbsd.org@localhost:/home/builds/ab/netbsd-5/i386/200908270000Z-obj/home/builds/ab/netbsd-5/src/sys/arch/i386/compile/GENERIC
 i386
>Description:
$ pkg_info | grep sun
sun-jre15-5.0.20    Sun's Java(tm) 2 Standard Edition, JRE 5.0 Update 20
sun-jdk15-5.0.20    Sun's Java(tm) 2 Standard Edition, JDK 5.0 Update 20

$ mount | grep pkg
/wd0g/pkg on /usr/pkg type null (local)
/wd0g/pkgsrc on /usr/pkgsrc type null (local)
procfs on /usr/pkg/emul/linux/proc type procfs (local)

$ grep emul /etc/fstab
procfs /emul/linux/proc procfs rw,linux

$ grep pkg /etc/fstab
/wd0g/pkg               /usr/pkg        null    rw               0 0
/wd0g/pkgsrc            /usr/pkgsrc     null    rw               0 0

With the mentioned setup with null-mounts is not possible to work with java:
$ type sun15-java
sun15-java is /usr/pkg/bin/sun15-java
$ sun15-java -version
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.

##############################

So I need to change the environment to get it working:
$ cat /usr/pkg/bin/sun15-java 
#! /bin/sh
PATH=/usr/pkg/java/sun-1.5/bin:${PATH}; export PATH
JAVA_HOME=/usr/pkg/java/sun-1.5; export JAVA_HOME
JVM_HOME=/usr/pkg/java/sun-1.5; export JVM_HOME
ulimit -d `ulimit -H -d`
/usr/pkg/java/sun-1.5/bin/java "$@"

$ sed -e 's/\/usr/\/wd0g/g' < /usr/pkg/bin/sun15-java 
#! /bin/sh
PATH=/wd0g/pkg/java/sun-1.5/bin:${PATH}; export PATH
JAVA_HOME=/wd0g/pkg/java/sun-1.5; export JAVA_HOME
JVM_HOME=/wd0g/pkg/java/sun-1.5; export JVM_HOME
ulimit -d `ulimit -H -d`
/wd0g/pkg/java/sun-1.5/bin/java "$@"

$ sed -e 's/\/usr/\/wd0g/g' < /usr/pkg/bin/sun15-java > ~/bin/java
$ chmod 755 ~/bin/java
$ ~/bin/java -version
java version "1.5.0_20"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02)
Java HotSpot(TM) Client VM (build 1.5.0_20-b02, mixed mode)

>How-To-Repeat:
Install sun-jdk15 package and try to use it while having /pkg null-mounted from 
elsewhere.
>Fix:
Mention the problem (and workaround: "using direct path") at least in 
documentation (DESCR), please. :-)



Home | Main Index | Thread Index | Old Index