From rwestrel at redhat.com Fri Sep 4 08:52:00 2020 From: rwestrel at redhat.com (Roland Westrelin) Date: Fri, 04 Sep 2020 10:52:00 +0200 Subject: How to build libgraal for latest JDK (in theory) In-Reply-To: <937777b2-ea09-51aa-8b5b-15b81d14fcef@oracle.com> References: <937777b2-ea09-51aa-8b5b-15b81d14fcef@oracle.com> Message-ID: <871rjh6i1b.fsf@redhat.com> Hi Vladimir, Thanks for writing the steps down. I gave it a try but for step 6: > 6. Build libgraal > > cd //graal/vm > mx --env libgraal build I get: Building libjvmcicompiler.so.image... [dependency GRAAL_HOTSPOT_LIBRARY updated] Error: Requirements for building native images are not fulfilled [cause: Image building not supported for Java version 16-internal in /mnt/ssd/rwestrel/metropolis/graal/sdk/mxbuild/linux-amd64/GRAALVM_39063E534F_JAVA16_STAGE1/graalvm-39063e534f-java16-20.3.0-dev with VM configuration "OpenJDK 64-Bit Server VM"] Building libjvmcicompiler.so.image failed 1 build tasks failed You said: > Unfortunately step 6 fail currently (August 25, 2020) because JDK misses JVMCI part of 8209961 fix [2] which is used by > latest Graal which already have that fix. but AFAICT 8209961 is fixed now. Any idea what could go wrong? Roland. From rwestrel at redhat.com Mon Sep 14 09:46:23 2020 From: rwestrel at redhat.com (Roland Westrelin) Date: Mon, 14 Sep 2020 11:46:23 +0200 Subject: How to build libgraal for latest JDK (in theory) In-Reply-To: <871rjh6i1b.fsf@redhat.com> References: <937777b2-ea09-51aa-8b5b-15b81d14fcef@oracle.com> <871rjh6i1b.fsf@redhat.com> Message-ID: <87tuw0k7ww.fsf@redhat.com> FTR, I followed the instructions with jdk15u and it works. I couldn't get it to work with 16, though. AFAICT, the mx files don't list it as supported. Roland. From vladimir.kozlov at oracle.com Mon Sep 21 19:44:33 2020 From: vladimir.kozlov at oracle.com (Vladimir Kozlov) Date: Mon, 21 Sep 2020 12:44:33 -0700 Subject: How to build libgraal for latest JDK (in theory) In-Reply-To: <871rjh6i1b.fsf@redhat.com> References: <937777b2-ea09-51aa-8b5b-15b81d14fcef@oracle.com> <871rjh6i1b.fsf@redhat.com> Message-ID: Hi Roland, Glad to hear that you able to build libgraal with JDK 15u. To fix issue you see you need next change substratevm/mx.substratevm/mx_substratevm.py @@ -1350,7 +1350,7 @@ class SubstrateCompilerFlagsBuilder(mx.ArchivableProject): return file_path def config_file_versions(self): - versions = [8, 11, 13, 14, 15] + versions = [8, 11, 13, 14, 15, 16] if svm_java8(): return versions[:1] return versions @@ -1433,6 +1433,7 @@ class SubstrateCompilerFlagsBuilder(mx.ArchivableProject): graal_compiler_flags_map[13] = graal_compiler_flags_map[11] graal_compiler_flags_map[14] = graal_compiler_flags_map[11] graal_compiler_flags_map[15] = graal_compiler_flags_map[11] + graal_compiler_flags_map[16] = graal_compiler_flags_map[11] graal_compiler_flags_base = [ '-XX:+UseParallelGC', # native image generation is a throughput-oriented task But you will hit another issue after that: Building libjvmcicompiler.so.image... [dependency GRAALVM_39063E534F_JAVA16_STAGE1 updated] [libjvmcicompiler:16649] classlist: 1,946.65 ms, 0.96 GB [libjvmcicompiler:16649] setup: 519.64 ms, 0.96 GB Error: could not find target method: private static native com.oracle.svm.core.jdk.Target_java_lang_invoke_MemberName com.oracle.svm.core.jdk.Target_java_lang_invoke_MethodHandleNatives.resolve(com.oracle.svm.core.jdk.Target_java_lang_invoke_MemberName,java.lang.Class,boolean) throws java.lang.LinkageError,java.lang.ClassNotFoundException com.oracle.svm.core.util.UserError$UserException: could not find target method: private static native com.oracle.svm.core.jdk.Target_java_lang_invoke_MemberName com.oracle.svm.core.jdk.Target_java_lang_invoke_MethodHandleNatives.resolve(com.oracle.svm.core.jdk.Target_java_lang_invoke_MemberName,java.lang.Class,boolean) throws java.lang.LinkageError,java.lang.ClassNotFoundException at com.oracle.svm.core.util.UserError.abort(UserError.java:68) at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findOriginalMethod(AnnotationSubstitutionProcessor.java:695) at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleMethodInAliasClass(AnnotationSubstitutionProcessor.java:349) As I said before you most likely fail to build libgraal with latest JDK until GraalVM (SubstrateVM) supports it. Regards, Vladimir K On 9/4/20 1:52 AM, Roland Westrelin wrote: > > Hi Vladimir, > > Thanks for writing the steps down. I gave it a try but for step 6: > >> 6. Build libgraal >> >> cd //graal/vm >> mx --env libgraal build > > I get: > > Building libjvmcicompiler.so.image... [dependency GRAAL_HOTSPOT_LIBRARY updated] > Error: Requirements for building native images are not fulfilled [cause: Image building not supported for Java version 16-internal in /mnt/ssd/rwestrel/metropolis/graal/sdk/mxbuild/linux-amd64/GRAALVM_39063E534F_JAVA16_STAGE1/graalvm-39063e534f-java16-20.3.0-dev with VM configuration "OpenJDK 64-Bit Server VM"] > > Building libjvmcicompiler.so.image failed > 1 build tasks failed > > You said: > >> Unfortunately step 6 fail currently (August 25, 2020) because JDK misses JVMCI part of 8209961 fix [2] which is used by >> latest Graal which already have that fix. > > but AFAICT 8209961 is fixed now. > > Any idea what could go wrong? > > Roland. >