-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can swift be running in graalvm? #2897
Comments
I found |
Currently, yes. GraalVM cannot be run on macOS Big Sur 11. An Internal issue was created for the Dev team to fix this issue |
@libin049 could you provide a reproducer for |
@oubidar-Abderrahim Sure! Steps:
then the error occurs:
|
Thank you @libin049 |
Answering the first question:
Using LLVM it should be possible. I don't have prior experience with Swift and cannot provide much help on how to do it but as I mentioned in #2905 (comment) It should be possible. For the issue with Big Sur: |
@oubidar-Abderrahim I'm not sure if this issue should have been closed. At least on my machine, the initial problem still exists: ERROR: com.oracle.truffle.api.CompilerDirectives$ShouldNotReachHere
org.graalvm.polyglot.PolyglotException: com.oracle.truffle.api.CompilerDirectives$ShouldNotReachHere
at com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:570)
at com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:542)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.getSignatureSource(LLVMDispatchNode.java:132)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.bindSymbol(LLVMDispatchNode.java:272)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeAndSpecialize(LLVMDispatchNodeGen.java:437)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeDispatch(LLVMDispatchNodeGen.java:214)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:82)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:28)
at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute_generic1(LLVMWriteNodeFactory.java:1030)
at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute(LLVMWriteNodeFactory.java:1007)
at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlockNode.execute(LLVMBasicBlockNode.java:172)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.doDispatch(LLVMDispatchBasicBlockNode.java:99)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNodeGen.executeGeneric(LLVMDispatchBasicBlockNodeGen.java:23)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.doRun(LLVMFunctionRootNode.java:81)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNodeGen.executeGeneric(LLVMFunctionRootNodeGen.java:25)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:93)
at <llvm> main(Unknown)
at org.graalvm.polyglot.Value.execute(Value.java:839)
at com.oracle.truffle.llvm.launcher.LLVMLauncher.execute(LLVMLauncher.java:254)
at com.oracle.truffle.llvm.launcher.LLVMLauncher.launch(LLVMLauncher.java:75)
at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:295)
at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:121)
at com.oracle.truffle.llvm.launcher.LLVMLauncher.main(LLVMLauncher.java:53)
Original Internal Error:
com.oracle.truffle.api.CompilerDirectives$ShouldNotReachHere
at com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:570)
at com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:542)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.getSignatureSource(LLVMDispatchNode.java:132)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.bindSymbol(LLVMDispatchNode.java:272)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeAndSpecialize(LLVMDispatchNodeGen.java:437)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeDispatch(LLVMDispatchNodeGen.java:214)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:82)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:28)
at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute_generic1(LLVMWriteNodeFactory.java:1030)
at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute(LLVMWriteNodeFactory.java:1007)
at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlockNode.execute(LLVMBasicBlockNode.java:172)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.doDispatch(LLVMDispatchBasicBlockNode.java:99)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNodeGen.executeGeneric(LLVMDispatchBasicBlockNodeGen.java:23)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.doRun(LLVMFunctionRootNode.java:81)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNodeGen.executeGeneric(LLVMFunctionRootNodeGen.java:25)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:93)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:655)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:627)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:560)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.invokeCallBoundary(SubstrateOptimizedCallTarget.java:121)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTargetInstalledCode.doInvoke(SubstrateOptimizedCallTargetInstalledCode.java:176)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:104)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:486)
at org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.doDirectFunction(LLVMDispatchNode.java:180)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeAndSpecialize(LLVMDispatchNodeGen.java:316)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeDispatch(LLVMDispatchNodeGen.java:214)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:82)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:28)
at com.oracle.truffle.llvm.runtime.nodes.api.LLVMFrameNullerExpression.doGeneric(LLVMFrameNullerExpression.java:71)
at com.oracle.truffle.llvm.runtime.nodes.api.LLVMFrameNullerExpressionNodeGen.executeGeneric(LLVMFrameNullerExpressionNodeGen.java:20)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:79)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:28)
at com.oracle.truffle.llvm.runtime.nodes.api.LLVMVoidStatementNodeGen.execute(LLVMVoidStatementNodeGen.java:22)
at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlockNode.execute(LLVMBasicBlockNode.java:172)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.doDispatch(LLVMDispatchBasicBlockNode.java:99)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNodeGen.executeGeneric(LLVMDispatchBasicBlockNodeGen.java:23)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.doRun(LLVMFunctionRootNode.java:81)
at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNodeGen.executeGeneric(LLVMFunctionRootNodeGen.java:25)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:93)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:655)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:627)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:560)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.invokeCallBoundary(SubstrateOptimizedCallTarget.java:121)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTargetInstalledCode.doInvoke(SubstrateOptimizedCallTargetInstalledCode.java:176)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:104)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:486)
at org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMGlobalRootNode.executeWithoutFrame(LLVMGlobalRootNode.java:88)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMGlobalRootNode.execute(LLVMGlobalRootNode.java:77)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:655)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:627)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:560)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.invokeCallBoundary(SubstrateOptimizedCallTarget.java:121)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTargetInstalledCode.doInvoke(SubstrateOptimizedCallTargetInstalledCode.java:176)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:104)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:486)
at org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
at com.oracle.truffle.llvm.runtime.SulongLibrary$Execute.doCached(SulongLibrary.java:235)
at com.oracle.truffle.llvm.runtime.SulongLibraryGen$InteropLibraryExports$Cached.executeAndSpecialize(SulongLibraryGen.java:154)
at com.oracle.truffle.llvm.runtime.SulongLibraryGen$InteropLibraryExports$Cached.execute(SulongLibraryGen.java:114)
at com.oracle.truffle.api.interop.InteropLibraryGen$CachedDispatch.execute(InteropLibraryGen.java:7588)
at com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue$AbstractExecuteNode.executeShared(PolyglotValueDispatch.java:4234)
at com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue$ExecuteNoArgsNode.executeImpl(PolyglotValueDispatch.java:4341)
at com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:125)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:655)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:627)
at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:560)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.invokeCallBoundary(SubstrateOptimizedCallTarget.java:121)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTargetInstalledCode.doInvoke(SubstrateOptimizedCallTargetInstalledCode.java:176)
at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:104)
at org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callProfiled(GraalRuntimeSupport.java:235)
at com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue.execute(PolyglotValueDispatch.java:2377)
at org.graalvm.polyglot.Value.execute(Value.java:839)
at com.oracle.truffle.llvm.launcher.LLVMLauncher.execute(LLVMLauncher.java:254)
at com.oracle.truffle.llvm.launcher.LLVMLauncher.launch(LLVMLauncher.java:75)
at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:295)
at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:121)
at com.oracle.truffle.llvm.launcher.LLVMLauncher.main(LLVMLauncher.java:53)
Caused by: com.oracle.truffle.llvm.runtime.NativeContextExtension$UnsupportedNativeTypeException: unsupported type %{swift.bridge*, i8*} in native interop
at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension.getNativeType(NFIContextExtension.java:418)
at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension.getNativeSignature(NFIContextExtension.java:595)
at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension.access$000(NFIContextExtension.java:72)
at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension$SignatureSourceCache.getSignatureSource(NFIContextExtension.java:163)
at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension$SignatureSourceCache.getSignatureSourceSkipStackArg(NFIContextExtension.java:156)
at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension.getNativeSignatureSourceSkipStackArg(NFIContextExtension.java:550)
at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.getSignatureSource(LLVMDispatchNode.java:130)
... 76 more
Caused by: Attached Guest Language Frames (4) |
Hello, all:
I want running swift in graalvm, but failed. here is my steps. Can swift be running in graalvm? and how?
OS: ubuntu 16.04
Graalvm: graalvm-ce-java8-linux-amd64-20.2.0
hello.swift: as follows
some error occur:
I also try it in macOS
OS: macOS 11.0 beta
Graalvm: graalvm-ce-java8-darwin-amd64-20.2.0
however, when run
export LLVM_TOOLCHAIN=$(lli --print-toolchain-path)
, an error occurs:The text was updated successfully, but these errors were encountered: