[Info-vax] Java 8: Looking for jna & 64-bit libffi to make jruby work
Rod Regier
rregier at dymaxion.ca
Thu May 30 09:00:10 EDT 2019
Hi,
Is there a libffi and jna that will work with the Java 8 kit from HPE at https://www.hpe.com/global/java/download/ivms/1.8.0/jdk8.0_down.html ?
- John Malmberg made reference to a work in progress for libffi here https://groups.google.com/d/msg/comp.os.vms/IThxF57t9PU/81XzUtIsAgAJ
but we haven't been able to find those materials. And even if we did, we'd also need a working jna which we can't find anywhere (all extant links back to the work by Philippe Vouters are now dead).
- Our understanding is we'll make no headway running non-Java modules (needed by our JRuby code) with Java 8 until we have a Java-compatible libffi_shr64.exe jnidispatch.exe + jna.jar (all of which must be rebuilt from source for 64-bit support) as per the following, but all we can find (e.g. from latest VMS Python kit) is a 32-bit version of libffi that doesn't work with Java 8.
- We get an ACCVIO trying to use current (works with Java 6) libffi + jnidispatch + jna.jar. See background & test results below.
H. Becker & Cedric P. have confirmed here that 32-bit non-Java extensions won't work with Java 8 which uses 64-bit addressing, unlike Java 6, and the likely result will be an ACCVIO error (confirmed also by Oracle):
https://community.hpe.com/t5/Operating-System-OpenVMS/Java-8-and-JDBC-on-OpenVMS-8-4-IA64/m-p/6975305/highlight/true#M37716
Our experience aligns with this: even the simplest test case for JNA fails with Java 8 with an ACCVIO as per:
V:JNA.EXAMPLES> java -version
java version "1.8.0.03-OpenVMS"
Java(TM) SE Runtime Environment (build 1.8.0.03-vms-rc1)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b02, mixed mode)
V:JNA.EXAMPLES> java -cp .:../jna.jar "DECC_test"
Platform.is64Bit() = true
Platform.isOpenVMS() = true
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=0000000000000000, PC=0000000000FA77A1, PS=0000001B
Improperly handled condition, image exit forced by last chance handler.
Signal arguments: Number = 0000000000000005
Name = 000000000000000C
0000000000000000
0000000000000000
0000000000FA77A1
000000000000001B
Register dump:
R0 = 0000000000000000 R1 = 000000000391C000 R2 = 0000000000000000
R3 = 0000000000000020 R4 = 0000000000315400 R5 = 000000007A7D7400
R6 = 000000007A5DE000 R7 = 000007FDC0FD4000 R8 = 0000000000000015
R9 = 0000000000000015 R10 = 0000000000000065 R11 = 0000000000000074
SP = 000000007A7D65C0 TP = 000000007B24AEC0 R14 = 0000000003735E40
R15 = 00000000038C61C0 R16 = FFFFFFFF82B9F130 R17 = 0000000000000063
R18 = 0000000000000072 R19 = 00000000033CDF2F R20 = 0000000000000061
R21 = 0000000000000061 R22 = 0000000000000001 R23 = 000000000000003A
R24 = 0000000000000020 R25 = 0000000000000003 R26 = 0000000000000063
R27 = 0000000000000065 R28 = 000000000000003A R29 = 0000000000000020
R30 = 0000000000000000 R31 = 0000000000000053 PC = 0000000000FA77A1
BSP/STORE = 000007FDBFFD5EF0 / 000007FDBFFD5E08 PSR = 000012130842E030
IIPA = 0000000000FA77A0
B0 = 0000000000FA7790 B6 = FFFFFFFF82B9F130 B7 = FFFFFFFF800E9620
Interrupted Frame RSE Backing Store, Size = 16 registers
R32 = 000000007A7D6F80 R33 = 0000000000000000 R34 = C000000000000389
R35 = FFFFFFFF803676F0 R36 = 000000000391C000 R37 = 0000000004AA37B0
R38 = 000000007A7D6710 R39 = 000000000000000C R40 = 00000000033CDB20
R41 = 0000000000000000 R42 = 0000000000000000 R43 = 0000000000000020
R44 = 0000000000000001 R45 = 00000000033CDB20 R46 = 0000000000000020
R47 = 0000000000000015
Thanks,
Rod Regier & Ben Armstrong, Dymaxion Research Ltd.
More information about the Info-vax
mailing list