[graalvm-users] Error compiling SL against Java 9

Peter Burka peter at quux.net
Tue Apr 17 10:59:38 PDT 2018


I’m trying to get started with Truffle, so I began by trying to build the
Simple Language example following the instructions at
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.graalvm.org_docs_graalvm-2Das-2Da-2Dplatform_implement-2Dlanguage_&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=9VGNy7bfGnOyG8vk9X_ZjnxT1Id2Oz7Iqorhn56mYeg&s=_9wkbk0vHTV9o_eRbRdSDoKYX9V1jpxj8aC6zuAWYJ8&e=



***
Note! I skipped step 1 (“Ensure you set up GraalVM before you begin”)
because I’m using a Java 9 SDK, and it’s my understanding that this
includes Graal. This could be the source of all my problems below. If so,
perhaps the https://urldefense.proofpoint.com/v2/url?u=http-3A__www.graalvm.org_docs_getting-2Dstarted_&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=9VGNy7bfGnOyG8vk9X_ZjnxT1Id2Oz7Iqorhn56mYeg&s=Lh65NWvlvftk_K95mpmeNGAy8o-zfQlRMD9umbj56is&e= page should be
updated to mention Java 9.

***

I’m using Maven 3.3.9 and Java 9.0.4. I’m also behind a corporate firewall
and using a web proxy, but I don’t think that’s related.

When I run mvn package, I get the following compile errors:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
(default-compile) on project simplelanguage: Compilation failure:
Compilation failure:
[ERROR]
/home/pburka/graal-truffle/simplelanguage/language/src/main/java/com/oracle/truffle/sl/SLLanguage.java:[219,39]
incompatible types:
java.util.Map<java.lang.String,com.oracle.truffle.sl.nodes.SLRootNode>
cannot be converted to
java.util.Map<java.lang.String,com.oracle.truffle.api.RootCallTarget>
[ERROR]
/home/pburka/graal-truffle/simplelanguage/language/src/main/java/com/oracle/truffle/sl/SLLanguage.java:[238,39]
incompatible types:
java.util.Map<java.lang.String,com.oracle.truffle.sl.nodes.SLRootNode>
cannot be converted to
java.util.Map<java.lang.String,com.oracle.truffle.api.RootCallTarget>
[ERROR]
/home/pburka/graal-truffle/simplelanguage/language/src/main/java/com/oracle/truffle/sl/runtime/SLFunctionRegistry.java:[98,9]
no suitable method found for
register(java.util.Map<java.lang.String,com.oracle.truffle.sl.nodes.SLRootNode>)
[ERROR] method
com.oracle.truffle.sl.runtime.SLFunctionRegistry.register(java.util.Map<java.lang.String,com.oracle.truffle.api.RootCallTarget>)
is not applicable
[ERROR] (argument mismatch;
java.util.Map<java.lang.String,com.oracle.truffle.sl.nodes.SLRootNode>
cannot be converted to
java.util.Map<java.lang.String,com.oracle.truffle.api.RootCallTarget>)
[ERROR] method
com.oracle.truffle.sl.runtime.SLFunctionRegistry.register(com.oracle.truffle.api.source.Source)
is not applicable
[ERROR] (argument mismatch;
java.util.Map<java.lang.String,com.oracle.truffle.sl.nodes.SLRootNode>
cannot be converted to com.oracle.truffle.api.source.Source)
[ERROR]
/home/pburka/graal-truffle/simplelanguage/language/src/main/java/com/oracle/truffle/sl/parser/Parser.java:[490,19]
constructor SLParseError in class com.oracle.truffle.sl.parser.SLParseError
cannot be applied to given types;
[ERROR] required:
com.oracle.truffle.api.source.Source,int,int,int,java.lang.String
[ERROR] found: java.lang.String
[ERROR] reason: actual and formal argument lists differ in length
[ERROR]
/home/pburka/graal-truffle/simplelanguage/language/src/main/java/com/oracle/truffle/sl/parser/Parser.java:[492,46]
incompatible types:
java.util.Map<java.lang.String,com.oracle.truffle.api.RootCallTarget>
cannot be converted to
java.util.Map<java.lang.String,com.oracle.truffle.sl.nodes.SLRootNode>

Any chance this is a known issue?

If it’s related to using a standard Java 9 build, is there a solution for
building Simple Language against the SDK? I don’t want to require my
potential users to build a custom SDK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/graalvm-users/attachments/20180417/d9adf70a/attachment-0001.html 


More information about the GraalVM-Users mailing list