fix java.library.path on the ARM platform

On the ARM platform, Avian compiled to use OpenJDK gets this error on
startup:
java/lang/UnsatisfiedLinkError: no zip in java.library.path
  at java/lang/ClassLoader.loadLibrary (line 1860)
  at java/lang/Runtime.loadLibrary0 (line 845)
  at java/lang/System.loadLibrary (line 1084)
  at java/lang/System.initializeSystemClass (line 1145)

Using strace shows why:
[pid 22431]
stat64("/usr/lib/jvm/java-7-openjdk-armhf/jre/lib/i386/libzip.so",
0xbee377e0) = -1 ENOENT (No such file or directory)

The attached patch uses "arm" instead of "i386" in that path. This fixes the
problem.
This commit is contained in:
Damjan Jovanovic 2012-08-04 07:31:54 -06:00 committed by Joel Dice
parent 5a09774353
commit 59d7f5a47a

View File

@ -417,6 +417,8 @@ class MyClasspath : public Classpath {
sb.append("/lib");
#elif defined ARCH_x86_64
sb.append("/lib/amd64");
#elif defined ARCH_arm
sb.append("/lib/arm");
#else
// todo: handle other architectures
sb.append("/lib/i386");