You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
When building Ruby with other languages via native-image, and with PreinitializedContexts set to include ruby, the enclosed exception surfaces (on Oracle GVM latest release). The same exception surfaces at runtime if ruby is not pre-initialized.
Steps to reproduce the issue
Please include both build steps as well as run steps
git clone https://github.com/elide-dev/elide.git && cd elide
Edit the file packages/cli/build.gradle.kts to set enableRuby to true
Run a native build with ./gradlew :packages:cli:nativeCompile
com.oracle.svm.core.util.VMError$HostedError: java.lang.reflect.InvocationTargetException
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:82)
at org.graalvm.truffle.runtime.svm/com.oracle.svm.truffle.TruffleBaseFeature.invokeStaticMethod(TruffleBaseFeature.java:274)
at org.graalvm.truffle.runtime.svm/com.oracle.svm.truffle.TruffleBaseFeature.preInitializeEngine(TruffleBaseFeature.java:509)
at org.graalvm.truffle.runtime.svm/com.oracle.svm.truffle.TruffleFeature.beforeAnalysis(TruffleFeature.java:436)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$9(NativeImageGenerator.java:774)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:90)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:774)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:593)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:551)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:538)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:720)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:142)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:97)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.graalvm.truffle.runtime.svm/com.oracle.svm.truffle.TruffleBaseFeature.invokeStaticMethod(TruffleBaseFeature.java:272)
... 11 more
Caused by: java.lang.ExceptionInInitializerError
at org.truffleruby.core.symbol.CoreSymbols.createRubySymbol(CoreSymbols.java:213)
at org.truffleruby.core.symbol.CoreSymbols.createRubySymbol(CoreSymbols.java:224)
at org.truffleruby.core.symbol.CoreSymbols.<init>(CoreSymbols.java:35)
at org.truffleruby.RubyLanguage.<init>(RubyLanguage.java:366)
at org.truffleruby.RubyLanguageProvider.create(RubyLanguageProvider.java:31)
at org.graalvm.truffle/com.oracle.truffle.api.provider.LanguageProviderSupportImpl.create(LanguageProviderSupportImpl.java:59)
at org.graalvm.truffle/com.oracle.truffle.polyglot.LanguageCache$ModuleAwareProvider.create(LanguageCache.java:825)
at org.graalvm.truffle/com.oracle.truffle.polyglot.LanguageCache.loadLanguage(LanguageCache.java:634)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguageInstance.<init>(PolyglotLanguageInstance.java:101)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguage.createInstance(PolyglotLanguage.java:177)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotSharingLayer.allocateInstance(PolyglotSharingLayer.java:413)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguageContext.ensureCreated(PolyglotLanguageContext.java:617)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguageContext.ensureInitialized(PolyglotLanguageContext.java:731)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.getContextInitialized(PolyglotContextImpl.java:735)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.preinitialize(PolyglotContextImpl.java:3600)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotEngineImpl.preInitialize(PolyglotEngineImpl.java:1429)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotImpl.preInitializeEngine(PolyglotImpl.java:421)
at org.graalvm.polyglot/org.graalvm.polyglot.Engine$ImplHolder.preInitializeEngine(Engine.java:196)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 13 more
Caused by: java.lang.IllegalArgumentException: unknown encoding: "ASCII-8BIT"
at org.graalvm.truffle/com.oracle.truffle.api.strings.InternalErrors.illegalArgument(InternalErrors.java:76)
at org.graalvm.truffle/com.oracle.truffle.api.strings.InternalErrors.unknownEncoding(InternalErrors.java:96)
at org.graalvm.truffle/com.oracle.truffle.api.strings.TruffleString$Encoding.fromJCodingName(TruffleString.java:1089)
at org.truffleruby.core.encoding.TStringUtils.jcodingToTEncoding(TStringUtils.java:42)
at org.truffleruby.core.encoding.RubyEncoding.<init>(RubyEncoding.java:57)
at org.truffleruby.core.encoding.Encodings.initializeRubyEncodings(Encodings.java:82)
at org.truffleruby.core.encoding.Encodings.<clinit>(Encodings.java:38)
... 32 more
The text was updated successfully, but these errors were encountered:
Hi, where do you get TruffleRuby in Oracle GraalVM for JDK21? we no longer provide "gu" with this version, so you cannot install TruffleRuby with it. TruffleRuby can now be obtained either as a standalone distribution or added to your project as a dependency.
I don't see it added in your Gradle setting.
also
Could you please share a more detailed steps to reproduce, if there are changes to the code base, please push them to another branch and share that one
@oubidar-Abderrahim apologies, I just got your reply from October. It's helpful to tag me because that moves the notification to my Mentions tab (I get a lot of regular issue notifications for Graal)
We've upgraded to GVM 21 latest and I'll see if the error still surfaces.
you're still targeting JDK17 while using JDK21
In some places, we ship libraries which must work at earlier versions of Java (for example, Gradle plugins). Leaf modules target JDK21 and the build is hosted by JDK21.
And, of course, thank you for your help and hard work on Graal!
Describe the issue
When building Ruby with other languages via
native-image
, and withPreinitializedContexts
set to includeruby
, the enclosed exception surfaces (on Oracle GVM latest release). The same exception surfaces at runtime ifruby
is not pre-initialized.Steps to reproduce the issue
Please include both build steps as well as run steps
git clone https://github.com/elide-dev/elide.git && cd elide
packages/cli/build.gradle.kts
to setenableRuby
totrue
./gradlew :packages:cli:nativeCompile
Describe GraalVM and your environment:
Oracle GraalVM 21+35.1 (build 21+35-jvmci-23.1-b15)
21
macOS Ventura 13.5.1
aarch64
(M2)The text was updated successfully, but these errors were encountered: