Build avian failed with openjdk-7-7u111-2.6.7

78 views
Skip to first unread message

luwein...@gmail.com

unread,
Nov 3, 2016, 7:48:03 AM11/3/16
to Avian
I tried to build avian with openjdk. I have tried both the 2 approaches but meet some problems.

1. make openjdk=/usr/lib/jvm/java-7-openjdk-i386

When I try to execute a test: ./avian-dynamic -cp test Hello
It reports the error:
java/lang/UnsatisfiedLinkError: sun/misc/Unsafe.isBigEndian0()Z
  at sun/misc/Unsafe.isBigEndian0 (native)
  at sun/misc/Unsafe.<clinit> (line 651)
  at sun/misc/SharedSecrets.<clinit> (line 48)
  at java/security/ProtectionDomain.<clinit> (line 118)
  at java/lang/ClassLoader.<init> (line 255)
  at java/lang/ClassLoader.<init> (line 317)


2. make openjdk=/usr/lib/jvm/java-7-openjdk-i386 openjdk-src=/home/agent/work/avian/openjdk-7-7u111-2.6.7/build/openjdk/jdk/src
.....................
compiling build/linux-i386-openjdk-src/openjdk/my_net_util-openjdk.o
compiling build/linux-i386-openjdk-src/openjdk/my_management-openjdk.o
creating build/linux-i386-openjdk-src/javahome.jar
creating build/linux-i386-openjdk-src/javahome-jar.o
compiling build/linux-i386-openjdk-src/boot-javahome.o
creating build/linux-i386-openjdk-src/libavian.a
compiling build/linux-i386-openjdk-src/main.o
compiling build/linux-i386-openjdk-src/boot.o
creating build/linux-i386-openjdk-src/classpath.jar
creating build/linux-i386-openjdk-src/classpath-jar.o
linking build/linux-i386-openjdk-src/avian
build/linux-i386-openjdk-src/openjdk/share/native/sun/misc/VMSupport-openjdk.o: In function `Java_sun_misc_VMSupport_getVMTemporaryDirectory':
/home/agent/work/avian/avian/build/linux-i386-openjdk-src/openjdk/VMSupport.c:60: undefined reference to `JVM_GetTemporaryDirectory'
collect2: ld returned 1 exit status
make: *** [build/linux-i386-openjdk-src/avian] Error 1



Is this a known issue? Is the openjdk version(openjdk-7-7u111-2.6.7) supported by avian?

Thanks,
Weining


Joel Dice .

unread,
Nov 3, 2016, 9:48:28 AM11/3/16
to Avian
Hi Weining,

Thanks for reporting these issues. Oracle sometimes adds new
functions to the classpath<->JVM interface when it makes new releases
of the JDK/JRE. It looks like we need to update Avian to match the
latest ones. I'll do that this weekend when I have time. Meanwhile,
if you're in a hurry, you might want to try an older OpenJDK release
(e.g. 7u80).
> --
> You received this message because you are subscribed to the Google Groups
> "Avian" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to avian+un...@googlegroups.com.
> To post to this group, send email to av...@googlegroups.com.
> Visit this group at https://groups.google.com/group/avian.
> For more options, visit https://groups.google.com/d/optout.

luwein...@gmail.com

unread,
Nov 4, 2016, 5:21:44 AM11/4/16
to Avian
Dice, thanks for your reply.

It sounds right. I think I'm using an old version of avain(1.2.0). Then I tried to clone the latest avian repo from https://github.com/ReadyTalk/avian.git (should be 1.3.0), the build error disappears, but still get runtime error when run java app.
agent@agent-VirtualBox:~/work/avian/avian/build/linux-i386-openjdk-src (master)$ ./avian -cp test Hello
java/lang/UnsatisfiedLinkError: sun/misc/Unsafe.isBigEndian0()Z
  at sun/misc/Unsafe.isBigEndian0 (native)
  at sun/misc/Unsafe.<clinit> (line 651)
  at sun/misc/SharedSecrets.<clinit> (line 48)
  at java/security/ProtectionDomain.<clinit> (line 118)
  at java/lang/ClassLoader.<init> (line 255)
  at java/lang/ClassLoader.<init> (line 317)

I suppose this may be fixed after your update. Thanks for your time.

Weining

Joel Dice .

unread,
Nov 6, 2016, 9:18:14 PM11/6/16
to Avian
This should fix the UnsatisfiedLinkError:

https://github.com/ReadyTalk/avian/pull/510

Let me know if you have any other issues.

luwein...@gmail.com

unread,
Nov 9, 2016, 4:09:22 AM11/9/16
to Avian

Thanks for your help, Dice. Just confirmed that the issue I posted is fixed.
Reply all
Reply to author
Forward
0 new messages