Re: Java for NetBSD/amd64

"Mike M. Volokhov" <[email protected]>
Newsgroups gmane.os.netbsd.devel.packages,gmane.os.netbsd.devel.pkgsrc.wip.general
Organization The NetBSD Project
Message-ID <[email protected]>
On Wed, 9 Jul 2008 09:55:30 +0000 Mike M. Volokhov wrote:
> Hello,
> 
> is there any JRE 1.5 or above available for NetBSD/amd64? I tried
> all lang/sun-jre15, lang/sun-jre6, and lang/kaffe from pkgsrc-2008Q1,
> but without luck :-(
> 
> My environment:
> $ uname -srm
> NetBSD 4.99.68 amd64	(stock GENERIC)

Small addition: disabling SMP makes JRE 6 much more stable, but it
still crashes anyway. No visible behavior changes for 1.5 - memdumps
just on call.

On the other hand, I get wip/jdk16 working, and it's quite stable
(successfully running about 20 minutes and got no faults :-)

    $ java -version
    java version "1.6.0_03-p4"
    Java(TM) SE Runtime Environment (build 1.6.0_03-p4-mishka_09_jul_2008_14_29-b00)
    Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_03-p4-mishka_09_jul_2008_14_29-b00, mixed mode)
    $ file $(which java)
    /build/pkg_comp/chroot-amd64-4.99.68/usr/pkg/java/jdk-1.6.0/bin/java: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for NetBSD
    4.99.68, dynamically linked (uses shared libs), not stripped

Attached quick and dirty patch and the following build and install
commands was used:

    $ make PKG_JVM_DEFAULT=sun-jdk6 _ONLY_FOR_PLATFORMS.sun-jdk6=\* \
	ONLY_FOR_PLATFORM=\* CLASSPATH= JAVA_HOME=
    ...
    $ make PKG_JVM_DEFAULT=sun-jdk6 _ONLY_FOR_PLATFORMS.sun-jdk6=\* \
	ONLY_FOR_PLATFORM=\* CLASSPATH= install    # yes, without JAVA_HOME

However, installation wasn't went smoothly (but I don't care on this
stage). FYI:

    => Running POST-INSTALL script actions
    /usr/pkg/bin/jdk16-java: /bin/java: not found
    ...
    => Checking file-check results for jdk16-1.6.0.3.4
    ERROR: ************************************************************
    ERROR: The following files are in the PLIST but not in /usr/pkg:
    ERROR:         /usr/pkg/java/jdk-1.6.0/bin/java-rmi.cgi
    ERROR:         /usr/pkg/java/jdk-1.6.0/jre/lib/amd64/client/Xusage.txt
    ERROR:         /usr/pkg/java/jdk-1.6.0/jre/lib/amd64/client/classes.jsa
    ERROR:         /usr/pkg/java/jdk-1.6.0/jre/lib/amd64/client/libjsig.so
    ERROR:         /usr/pkg/java/jdk-1.6.0/jre/lib/amd64/client/libjvm.so
    *** Error code 1

I have /usr/pkg/java/jdk-1.6.0/jre/lib/amd64/server directory instead,
and it misses classes.jsa file. BTW, what is the difference between
server and client versions?

Dunno what action I have to do further. From my understanding at least
we can add x86_64 (amd64 in terms of JDK) to list of officially
supported platforms by JDK on pkgsrc.

	- M.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.