This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-17
Channels
- # announcements (3)
- # beginners (107)
- # calva (13)
- # clj-kondo (5)
- # cljsrn (21)
- # clojure (99)
- # clojure-australia (8)
- # clojure-dev (51)
- # clojure-europe (108)
- # clojure-nl (1)
- # clojure-portugal (3)
- # clojure-spec (9)
- # clojure-uk (10)
- # clojurescript (147)
- # component (7)
- # conjure (5)
- # core-async (2)
- # cursive (11)
- # datomic (11)
- # emacs (14)
- # graalvm (163)
- # graalvm-mobile (317)
- # honeysql (15)
- # introduce-yourself (4)
- # jobs (3)
- # lambdaisland (1)
- # lsp (19)
- # luminus (3)
- # malli (17)
- # off-topic (10)
- # pathom (11)
- # reagent (10)
- # remote-jobs (2)
- # ring (1)
- # shadow-cljs (22)
- # test-check (2)
- # testing (5)
- # tools-deps (39)
I'm curious what you would be interesting in build as well what kind of GUI interface you would be looking for.
Responding in order:
It would be great to double check that theĀ basic mobile setupĀ 1) works , 2) is easy to follow.
Iāll try the project tonight.
It would great to get your take on what kind of GUI API you think would make sense (clj bindings for SwiftUI?, UIKit, something else?).
I think SwiftUI is the future for MacOS/iOS/iPad/iOS. I havenāt used it much (just a bit) but the model looks solid. Very close to React, but also made to do ādata syncā with classes/mutable objects.
UIKit is very low level in comparison, and a very mutable API, 90s style. Do this, do that. Mutable everything.
SwiftUI in comparison is very declarative. With caveats, from the surface, it feels like it can be a great fit for Clojure. But I donāt have enough experience with it and the interop between Swift/Clojure to say what the technical hurdles are going to be.
I'd also like to know what you think of React Native generally. One interesting strategy would be to create bindings to theĀ native sideĀ of React Native.
I like React Native. Itās very close to React, basically the same model. It can have limitations but they are mostly in performance for specific cases like animation performance, and can be worked around. There are libraries like Reanimated V2 which solve that quite well. Otherwise, RN is probably the best and most easily iterable way to build general UIs on iOS today.
SwiftUI does seem pretty functional. I haven't tried it in any real capacity though
React Native is built on top of UIKit, btw. It basically uses a āviewā like a ādivā.
I wouldnāt say I like it more than React, but for what Swift/Obj-C is, itās definitely towards best they can have.
My sense is that's there's way more stuff built on top of UIKit. The other benefit is that objective-c seems more dynamically malleable compared to swift. It seems like it would be possible to implement interop on of obc_msgsend similar to how java interop works
However, I don't think that's the main consideration
Yes, there definitely is. But I think things should be moving towards the SwiftUI direction.
Obj-C definitely very dynamic. Whatās your sense about interop between Clojure and Swift? Would it be possible?
I'm sure it's possible
worst case scenario is that you use the reference api to generate the interface on both the clojure and swift sides
Cool. Iāve been doing a bit of Swift over the last 2 weeks. Definitely not an expert, but learning things. (I needed a custom camera solution and access to the raw frames of the camera, and re-made a component that interfaces with RN to do that)
https://developer.apple.com/tutorials/data/documentation/technologies.json?language=swift
If you get the compiler to be happy, Swift aināt that bad. But thatās a big if š.
I am still wrapping my head around the rules about initializations in Swift structs. As long as I stick to (mostly) static classes and static vars, things are much āeasierā and āfamiliarā, sort of Java-static style.
:thumbsup:
Going through the GraalVM setup. Should I be using Java 11 or Java 16, any difference?
my setup was java 11
ideally, it shouldn't matter, but I haven't tried Java 16
Ok, got GraalVM installed, I believe. Perhaps adding a link to this issue can be helpful to somebody https://stackoverflow.com/questions/65786439/problem-with-installing-running-grallvm-on-mac
Or just a note about MacOS:
xattr -d com.apple.quarantine <PATH TO GRAALVM INSTALLATION>
good call. it's been so long that I forgot
trying to figure out the best place to put the link
it's on the release page: https://github.com/graalvm/graalvm-ce-builds/releases
but after all the links
I guess I didnāt scroll that far. I was going through this page at the moment: https://github.com/BrunoBonacci/graalvm-clojure/blob/master/doc/clojure-graalvm-native-binary.md
to be fair, Mac OSX has been getting less developer friendly over the years
Ok, Iām running
./scripts/compile-shared
I get this:
./scripts/compile-shared: line 20: /bin/native-image: No such file or directory
do you have your graalvm home set?
rather GRAALVM_HOME
the compile script references GRAALVM_HOME
not sure what might be a better alternative
it's looking for graalvm's native-image
raspasov@MBP mobiletest % ./scripts/compile-sharedĀ Ā Ā Ā
+ set -e
+++ dirname ./scripts/compile-shared
++ cd ./scripts
++ pwd
+ DIR=/Users/raspasov/projects/github/mobiletest/scripts
+ cd /Users/raspasov/projects/github/mobiletest/scripts
+ PROJECT_DIR=/Users/raspasov/projects/github/mobiletest/scripts/..
+ cd ..
+ rm -rf ./classes
+ mkdir classes
+ clojure -X com.phronmophobic.mobiletest/compile-interface-class
+ clojure -X:depstar
[main] INFO hf.depstar.uberjar - Synchronizing pom.xml
Skipping paths: classes generated_classes native_test
[main] INFO hf.depstar.uberjar - Compiling com.phronmophobic.mobiletest ...
[main] INFO hf.depstar.uberjar - Compiling com.phronmophobic.mobiletest ...
[main] INFO hf.depstar.uberjar - Building uber jar: target/mobiletest-uber.jar
{:warning "could not find classpath entry", :path "generated_classes"}
{:warning "could not find classpath entry", :path "native_test"}
[main] INFO hf.depstar.uberjar - Processing pom.xml for {com.phronmophobic/mobiletest {:mvn/version "1.00-beta-1"}}
+ pushd library
~/projects/github/mobiletest/library ~/projects/github/mobiletest
+ /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home/bin/native-image --report-unsupported-elements-at-runtime --initialize-at-build-time --no-fallback --no-server -H:CompilerBackend=llvm -H:+ExitAfterRelocatableImageWrite -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:-SpawnIsolates -H:PageSize=16384 -Djdk.internal.lambda.eagerlyInitialize=false -H:+ReportExceptionStackTraces -H:TempDirectory=/Users/raspasov/projects/github/mobiletest/scripts/../library/tmp -H:ReflectionConfigurationFiles=/Users/raspasov/projects/github/mobiletest/scripts/../conf/reflectionconfig-arm64-ios.json -H:JNIConfigurationFiles=/Users/raspasov/projects/github/mobiletest/scripts/../conf/jniconfig-arm64-ios.json -H:ResourceConfigurationFiles=/Users/raspasov/projects/github/mobiletest/scripts/../conf/resourceconfig-arm64-ios.json -J-Dclojure.spec.skip-macros=true -J-Xmx20G -J-XX:MaxDirectMemorySize=8G -J-Dclojure.compiler.direct-linking=true -J-Dtech.v3.datatype.graal-native=true -Dsvm.targetName=iOS -Dsvm.targetArch=arm64 -H:+UseCAPCache -H:CAPCacheDir=/Users/raspasov/projects/github/mobiletest/scripts/../conf/capcache '-Dsvm.platform=org.graalvm.nativeimage.Platform$IOS_AARCH64' -jar ../target/mobiletest-uber.jar -cp classes
[mobiletest-uber:8653]Ā Ā classlist: Ā 2,728.25 ms,Ā 0.94 GB
[mobiletest-uber:8653]Ā Ā Ā Ā (cap): Ā Ā 171.45 ms,Ā 0.94 GB
[mobiletest-uber:8653]Ā Ā Ā Ā setup: Ā 1,727.14 ms,Ā 0.94 GB
I'm a little surprised it's taking this long, but it's not completely crazy
especially if compiling the uberjar for the first time needed to download dependencies
Yeah it is weirdā¦ I am on a relatively recent MBP 2018, 2.9 GHz 6-Core Intel Core i9 (not sure if this makes a big difference in compilation)
I have seen it get stuck on setup before and killing and restarting can help
:thumbsup:
There a couple of warnings, {:warning ācould not find classpath entryā, :path āgenerated_classesā} {:warning ācould not find classpath entryā, :path ānative_testā} Do they matter?
It shouldn't. I'm just realizing those entries are from the avclj project that I based the initial project on
Random feedback for the README, perhaps add right before ./scripts/compile-shared
export GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-VERSION/Contents/Home
export PATH=$GRAALVM_HOME/bin:$PATH
(assuming MacOS)that does seem suspicous
i'm running it on my computer and all the activity seems to be showing up under java rather than "native-image"
weird. I'm running it now on my computer and it's taking forever
I don't remember it taking this long before
native image shouldn't be downloading anything
only to make the uberjar, which it looks like you've completed
now it's not working on my computer š. I swear this was all working earlier
I think I know the issue on my computer
I forgot to switch my JAVA_HOME to point to graalvm
if you do which java
, does it print the java in graalvm?
raspasov@MBP mobiletest % echo $JAVA_HOME raspasov@MBP mobiletest % which javaĀ /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home/bin/java
export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home
Running againā¦ok, looking back at my setup. My JAVA_HOME wasn't set, but I was using a different the first time around
I would try deleting the library/classes
directory
and trying again
it did compile for me this time in 213,763.55 ms
aka ~3.5 minutes
Progress: Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of tech.v3.datatype.UnsafeUtil. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.
that's actually a good sign
I've noticed that when it prints that, it's past the part where it gets stuck sometimes
raspasov@MBP mobiletest % ./scripts/compile-shared
+ set -e
+++ dirname ./scripts/compile-shared
++ cd ./scripts
++ pwd
+ DIR=/Users/raspasov/projects/github/mobiletest/scripts
+ cd /Users/raspasov/projects/github/mobiletest/scripts
+ PROJECT_DIR=/Users/raspasov/projects/github/mobiletest/scripts/..
+ cd ..
+ rm -rf ./classes
+ mkdir classes
+ clojure -X com.phronmophobic.mobiletest/compile-interface-class
+ clojure -X:depstar
[main] INFO hf.depstar.uberjar - Synchronizing pom.xml
Skipping paths: classes generated_classes native_test
[main] INFO hf.depstar.uberjar - Compiling com.phronmophobic.mobiletest ...
[main] INFO hf.depstar.uberjar - Compiling com.phronmophobic.mobiletest ...
[main] INFO hf.depstar.uberjar - Building uber jar: target/mobiletest-uber.jar
{:warning "could not find classpath entry", :path "generated_classes"}
{:warning "could not find classpath entry", :path "native_test"}
[main] INFO hf.depstar.uberjar - Processing pom.xml for {com.phronmophobic/mobiletest {:mvn/version "1.00-beta-1"}}
+ pushd library
~/projects/github/mobiletest/library ~/projects/github/mobiletest
+ /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home/bin/native-image --report-unsupported-elements-at-runtime --initialize-at-build-time --no-fallback --no-server -H:CompilerBackend=llvm -H:+ExitAfterRelocatableImageWrite -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:-SpawnIsolates -H:PageSize=16384 -Djdk.internal.lambda.eagerlyInitialize=false -H:+ReportExceptionStackTraces -H:TempDirectory=/Users/raspasov/projects/github/mobiletest/scripts/../library/tmp -H:ReflectionConfigurationFiles=/Users/raspasov/projects/github/mobiletest/scripts/../conf/reflectionconfig-arm64-ios.json -H:JNIConfigurationFiles=/Users/raspasov/projects/github/mobiletest/scripts/../conf/jniconfig-arm64-ios.json -H:ResourceConfigurationFiles=/Users/raspasov/projects/github/mobiletest/scripts/../conf/resourceconfig-arm64-ios.json -J-Dclojure.spec.skip-macros=true -J-Xmx20G -J-XX:MaxDirectMemorySize=8G -J-Dclojure.compiler.direct-linking=true -J-Dtech.v3.datatype.graal-native=true -Dsvm.targetName=iOS -Dsvm.targetArch=arm64 -H:+UseCAPCache -H:CAPCacheDir=/Users/raspasov/projects/github/mobiletest/scripts/../conf/capcache '-Dsvm.platform=org.graalvm.nativeimage.Platform$IOS_AARCH64' -jar ../target/mobiletest-uber.jar -cp classes
[mobiletest-uber:10698]Ā Ā classlist: Ā 2,932.32 ms,Ā 0.95 GB
[mobiletest-uber:10698]Ā Ā Ā Ā (cap): Ā Ā 191.21 ms,Ā 0.95 GB
[mobiletest-uber:10698]Ā Ā Ā Ā setup: Ā 1,622.68 ms,Ā 0.95 GB
Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of tech.v3.datatype.UnsafeUtil. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.Ā
[mobiletest-uber:10698] Ā Ā (clinit): Ā Ā 362.14 ms,Ā 2.69 GB
[mobiletest-uber:10698] Ā (typeflow): Ā 9,919.26 ms,Ā 2.69 GB
[mobiletest-uber:10698]Ā Ā (objects):Ā 10,759.01 ms,Ā 2.69 GB
[mobiletest-uber:10698] Ā (features): Ā 1,717.75 ms,Ā 2.69 GB
[mobiletest-uber:10698] Ā Ā analysis:Ā 23,893.47 ms,Ā 2.69 GB
[mobiletest-uber:10698] Ā Ā universe: Ā Ā 994.07 ms,Ā 3.86 GB
[mobiletest-uber:10698]Ā Ā Ā (parse): Ā 1,572.44 ms,Ā 3.86 GB
[mobiletest-uber:10698] Ā Ā (inline): Ā 5,622.28 ms,Ā 4.49 GB
[mobiletest-uber:10698]Ā Ā (compile): Ā 1,329.01 ms,Ā 4.49 GB
[mobiletest-uber:10698]Ā Ā Ā compile: Ā 8,696.35 ms,Ā 4.49 GB
7 fatal errors detected:
Fatal error:org.graalvm.compiler.graph.GraalGraphError: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at node: 6|Conditional { stamp=i32 [0 - 1] ā0000000000000001,Ā }
at method: void com.oracle.svm.core.graal.snippets.StackOverflowCheckSnippets.throwCachedStackOverflowError()Ā [Direct call from void FunctionPointerLogHandler.fatalError()]
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:291)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.generate(SubstrateLLVMBackend.java:147)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitLLVM(SubstrateLLVMBackend.java:123)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitBackEnd(SubstrateLLVMBackend.java:103)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:146)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compileGraph(GraalCompiler.java:130)
at com.oracle.svm.hosted.code.CompileQueue.defaultCompileFunction(CompileQueue.java:998)
at com.oracle.svm.hosted.code.CompileQueue.doCompile(CompileQueue.java:960)
at com.oracle.svm.hosted.code.CompileQueue$CompileTask.run(CompileQueue.java:265)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at com.oracle.svm.core.graal.llvm.LLVMGenerator.emitConditionalMove(LLVMGenerator.java:646)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitConditional(NodeLLVMBuilder.java:395)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.calc.ConditionalNode.generate(ConditionalNode.java:297)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitNode(NodeLLVMBuilder.java:327)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:287)
... 15 more
Fatal error:org.graalvm.compiler.graph.GraalGraphError: com.oracle.svm.core.util.UserError$UserException: Using the LLVM backend requires LLVM to be installed on your machine.
at node: 61|Conditional { stamp=i32 [0 - 1] ā0000000000000001,Ā }
at method: void com.oracle.svm.core.thread.VMThreads.detachThread(IsolateThread)Ā [Direct call from int CEntryPointSnippets.detachThreadMT(IsolateThread)]
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:291)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.generate(SubstrateLLVMBackend.java:147)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitLLVM(SubstrateLLVMBackend.java:123)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitBackEnd(SubstrateLLVMBackend.java:103)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:146)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compileGraph(GraalCompiler.java:130)
at com.oracle.svm.hosted.code.CompileQueue.defaultCompileFunction(CompileQueue.java:998)
at com.oracle.svm.hosted.code.CompileQueue.doCompile(CompileQueue.java:960)
at com.oracle.svm.hosted.code.CompileQueue$CompileTask.run(CompileQueue.java:265)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.oracle.svm.core.util.UserError$UserException: Using the LLVM backend requires LLVM to be installed on your machine.
at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
at com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker.getLLVMVersion(LLVMFeature.java:149)
at com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker.<clinit>(LLVMFeature.java:135)
at com.oracle.svm.core.graal.llvm.LLVMGenerator.emitConditionalMove(LLVMGenerator.java:646)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitConditional(NodeLLVMBuilder.java:395)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.calc.ConditionalNode.generate(ConditionalNode.java:297)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitNode(NodeLLVMBuilder.java:327)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:287)
... 15 more
Fatal error:org.graalvm.compiler.graph.GraalGraphError: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at node: 119|Conditional { stamp=i32 [-1 - 2] ā0000000000000002,Ā }
at method: int com.oracle.svm.core.graal.snippets.CEntryPointSnippets.initializeIsolate(CEntryPointCreateIsolateParameters)Ā [Direct call from int CEntryPointNativeFunctions.createIsolate(CEntryPointCreateIsolateParameters, CEntryPointNativeFunctions$IsolatePointer, CEntryPointNativeFunctions$IsolateThreadPointer)]
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:291)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.generate(SubstrateLLVMBackend.java:147)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitLLVM(SubstrateLLVMBackend.java:123)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitBackEnd(SubstrateLLVMBackend.java:103)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:146)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compileGraph(GraalCompiler.java:130)
at com.oracle.svm.hosted.code.CompileQueue.defaultCompileFunction(CompileQueue.java:998)
at com.oracle.svm.hosted.code.CompileQueue.doCompile(CompileQueue.java:960)
at com.oracle.svm.hosted.code.CompileQueue$CompileTask.run(CompileQueue.java:265)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at com.oracle.svm.core.graal.llvm.LLVMGenerator.emitConditionalMove(LLVMGenerator.java:646)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitConditional(NodeLLVMBuilder.java:395)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.calc.ConditionalNode.generate(ConditionalNode.java:297)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitNode(NodeLLVMBuilder.java:327)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:287)
... 15 more
Fatal error:org.graalvm.compiler.graph.GraalGraphError: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at node: 5|Conditional { stamp=i32 [0 - 1] ā0000000000000001,Ā }
at method: void com.oracle.svm.core.graal.snippets.StackOverflowCheckSnippets.throwNewStackOverflowError()Ā [Direct call from void CEntryPointSnippets.ensureJavaThread()]
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:291)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.generate(SubstrateLLVMBackend.java:147)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitLLVM(SubstrateLLVMBackend.java:123)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitBackEnd(SubstrateLLVMBackend.java:103)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:146)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compileGraph(GraalCompiler.java:130)
at com.oracle.svm.hosted.code.CompileQueue.defaultCompileFunction(CompileQueue.java:998)
at com.oracle.svm.hosted.code.CompileQueue.doCompile(CompileQueue.java:960)
at com.oracle.svm.hosted.code.CompileQueue$CompileTask.run(CompileQueue.java:265)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at com.oracle.svm.core.graal.llvm.LLVMGenerator.emitConditionalMove(LLVMGenerator.java:646)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitConditional(NodeLLVMBuilder.java:395)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.calc.ConditionalNode.generate(ConditionalNode.java:297)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitNode(NodeLLVMBuilder.java:327)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:287)
... 15 more
Fatal error:org.graalvm.compiler.graph.GraalGraphError: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at node: 167|Conditional { stamp=i32 [0 - 1] ā0000000000000001,Ā }
at method: JNIObjectHandle com.oracle.svm.jni.functions.JNIFunctions.AllocObject(JNIEnvironment, JNIObjectHandle)Ā [Direct call from JNIObjectHandle IsolateEnterStub.JNIFunctions_AllocObject_fd679b648ff7a5bbe75e2b56d7c12125e4e73817(JNIEnvironment, JNIObjectHandle)]
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:291)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.generate(SubstrateLLVMBackend.java:147)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitLLVM(SubstrateLLVMBackend.java:123)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitBackEnd(SubstrateLLVMBackend.java:103)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:146)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compileGraph(GraalCompiler.java:130)
at com.oracle.svm.hosted.code.CompileQueue.defaultCompileFunction(CompileQueue.java:998)
at com.oracle.svm.hosted.code.CompileQueue.doCompile(CompileQueue.java:960)
at com.oracle.svm.hosted.code.CompileQueue$CompileTask.run(CompileQueue.java:265)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at com.oracle.svm.core.graal.llvm.LLVMGenerator.emitConditionalMove(LLVMGenerator.java:646)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitConditional(NodeLLVMBuilder.java:395)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.calc.ConditionalNode.generate(ConditionalNode.java:297)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitNode(NodeLLVMBuilder.java:327)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:287)
... 15 more
Fatal error:org.graalvm.compiler.graph.GraalGraphError: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at node: 34|Conditional { stamp=i32 [0 - 1] ā0000000000000001,Ā }
at method: void com.oracle.svm.core.thread.Safepoint.enterSlowPathSafepointCheck()Ā [Direct call from void CEntryPointSnippets.ensureJavaThread()]
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:291)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.generate(SubstrateLLVMBackend.java:147)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitLLVM(SubstrateLLVMBackend.java:123)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitBackEnd(SubstrateLLVMBackend.java:103)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:146)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compileGraph(GraalCompiler.java:130)
at com.oracle.svm.hosted.code.CompileQueue.defaultCompileFunction(CompileQueue.java:998)
at com.oracle.svm.hosted.code.CompileQueue.doCompile(CompileQueue.java:960)
at com.oracle.svm.hosted.code.CompileQueue$CompileTask.run(CompileQueue.java:265)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at com.oracle.svm.core.graal.llvm.LLVMGenerator.emitConditionalMove(LLVMGenerator.java:646)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitConditional(NodeLLVMBuilder.java:395)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.calc.ConditionalNode.generate(ConditionalNode.java:297)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitNode(NodeLLVMBuilder.java:327)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:287)
... 15 more
Fatal error:org.graalvm.compiler.graph.GraalGraphError: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at node: 42|Conditional { stamp=i32 [0 - 1] ā0000000000000001,Ā }
at method: void com.oracle.svm.core.thread.Safepoint.enterSlowPathTransitionFromNativeToNewStatus(int)Ā [Direct call from IsolateThread IsolateEnterStub.CEntryPointBuiltins_createIsolate_315bd7239ea2b5ed6515910416de2648c30349ea()]
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:291)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.generate(SubstrateLLVMBackend.java:147)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitLLVM(SubstrateLLVMBackend.java:123)
at com.oracle.svm.core.graal.llvm.SubstrateLLVMBackend.emitBackEnd(SubstrateLLVMBackend.java:103)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:146)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.GraalCompiler.compileGraph(GraalCompiler.java:130)
at com.oracle.svm.hosted.code.CompileQueue.defaultCompileFunction(CompileQueue.java:998)
at com.oracle.svm.hosted.code.CompileQueue.doCompile(CompileQueue.java:960)
at com.oracle.svm.hosted.code.CompileQueue$CompileTask.run(CompileQueue.java:265)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.oracle.svm.core.graal.llvm.LLVMFeature$LLVMVersionChecker
at com.oracle.svm.core.graal.llvm.LLVMGenerator.emitConditionalMove(LLVMGenerator.java:646)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitConditional(NodeLLVMBuilder.java:395)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.calc.ConditionalNode.generate(ConditionalNode.java:297)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.emitNode(NodeLLVMBuilder.java:327)
at com.oracle.svm.core.graal.llvm.NodeLLVMBuilder.doBlock(NodeLLVMBuilder.java:287)
... 15 more
Error: Image build request failed with exit status 1
that's a new error to me
from https://www.graalvm.org/reference-manual/native-image/LLVMBackend/
gu install llvm-toolchain
that should definitely be in the Readme somewhere
probably
that's probably worth putting in the script
I guess if it gets stuck before the Warning: RecomputeFieldValue.FieldOffset
, then it's worth restarting
yea. I have noticed it getting stuck there before
interesting
I thought I noticed happening less often, but I could never tell if it was just random or not
[mobiletest-uber:11153]Ā Ā classlist: Ā 2,731.31 ms,Ā 1.20 GB
[mobiletest-uber:11153]Ā Ā Ā Ā (cap): Ā Ā 232.85 ms,Ā 1.20 GB
[mobiletest-uber:11153]Ā Ā Ā Ā setup: Ā 1,997.64 ms,Ā 1.20 GB
Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of tech.v3.datatype.UnsafeUtil. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.Ā
[mobiletest-uber:11153] Ā Ā (clinit): Ā Ā 394.12 ms,Ā 4.66 GB
[mobiletest-uber:11153] Ā (typeflow): Ā 9,692.06 ms,Ā 4.66 GB
[mobiletest-uber:11153]Ā Ā (objects):Ā 11,286.21 ms,Ā 4.66 GB
[mobiletest-uber:11153] Ā (features): Ā 1,601.63 ms,Ā 4.66 GB
[mobiletest-uber:11153] Ā Ā analysis:Ā 24,224.42 ms,Ā 4.66 GB
[mobiletest-uber:11153] Ā Ā universe: Ā 1,081.17 ms,Ā 4.66 GB
[mobiletest-uber:11153]Ā Ā Ā (parse): Ā 2,090.61 ms,Ā 4.66 GB
[mobiletest-uber:11153] Ā Ā (inline): Ā 3,401.28 ms,Ā 4.66 GB
[mobiletest-uber:11153]Ā Ā (compile):Ā 21,491.40 ms,Ā 7.37 GB
[mobiletest-uber:11153]Ā Ā (bitcode): Ā 1,810.94 ms,Ā 7.37 GB
[mobiletest-uber:11153]Ā Ā (prelink): Ā 4,937.09 ms,Ā 7.37 GB
# Printing build artifacts to: mobiletest-uber.build_artifacts.txt
[mobiletest-uber:11153]Ā Ā Ā [total]: 136,380.22 ms,Ā 7.61 GB
+ rm -rf ./build/out
+ mkdir -p build/out
++ find . -name llvm.o -print0
++ xargs -r -0 ls -1 -t
++ head -1
+ LLVM_PATH=./tmp/SVM-1623922437105/llvm/llvm.o
+ cp ./tmp/SVM-1623922437105/llvm/llvm.o build/out
++ find . -name mobiletest-uber.o -print0
++ xargs -r -0 ls -1 -t
++ head -1
+ MOBILETEST_PATH=./tmp/SVM-1623922437105/mobiletest-uber.o
+ cp ./tmp/SVM-1623922437105/mobiletest-uber.o build/out
+ popd
~/projects/github/mobiletest
XCode error:
ld: warning: directory not found for option '-L/Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home/lib/svm/clibraries/ios-arm64'
ld: library not found for -ljvm
interesting
MacBook-Air:mobiletest adrian$ ls '/Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home/lib/svm/clibraries/ios-arm64'
clibraries-ios-arm64.md5 libffi.a liblibchelper.a
libdarwin.a libjvm.a libstrictmath.a
raspasov@MBP ~ % ls '/Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home/lib/svm/clibraries/ios-arm64'
ls: /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home/lib/svm/clibraries/ios-arm64: No such file or directory
raspasov@MBP ~ %
is that the right graalvm path?
raspasov@MBP ~ % ls /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home/lib/svm/clibraries/
darwin-amd64
let's see if I can figure out how I got those clibraries
MacBook-Air:mobiletest adrian$ cd '/Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.1.0/Contents/Home/lib/svm/'
MacBook-Air:svm adrian$ ls
LICENSE_NATIVEIMAGE.txt builder clibraries.zip macros
bin clibraries library-support.jar
MacBook-Air:svm adrian$ ls -lt
total 320
drwxr-xr-x 4 adrian staff 128 Jun 5 23:18 clibraries
-rw-r--r-- 1 adrian staff 75393 Jun 5 23:18 clibraries.zip
drwxr-xr-x 16 adrian staff 512 May 9 23:30 macros
drwxr-xr-x 4 adrian staff 128 May 9 23:30 bin
-rw-r--r-- 1 adrian staff 21035 May 9 23:30 LICENSE_NATIVEIMAGE.txt
drwxr-xr-x 11 adrian staff 352 May 9 23:23 builder
-rw-r--r-- 1 adrian staff 59506 Apr 16 04:41 library-support.jar
I'm on Arm/M1
it looks like I got that clibraries on June 5th
before trying with clojure
I tried Gluon Mobile
and it looks like their maven plugin modified my setup
They don't make it easy to decipher, but I think it's an implementation of JavaFX and some other stuff that runs iOS/android
it does
I've tried to exclude any proprietary stuff
specifically the javaFX libraries I think
they have included some updates to the JVM implementation for mobile as well
but most of those changes are released under GPL
I think
they're integrating those back in to the regular JVM repo afaik
Got it; alright Iāll google around as well about the missing āios-arm64ā directory.
anyway, the clibs can be downloaded from https://download2.gluonhq.com/substrate/clibs/ios-arm64.zip
I referenced their maven plugin to figure out how to compile for iOS
did it print anything to console?
āhello42ā 2021-06-17 02:55:22.904126-0700 MobileTest[12654:4364688] the result is: 42 2021-06-17 02:55:22.904233-0700 MobileTest[12654:4364688] the result is: 42
so you have clojure running on your device now
now I just need to go back through the chat and improve the docs
Thank you!
oh, I haven't pushed my changes that starts the nrepl socket server
https://github.com/phronmophobic/mobiletest/blob/main/src/com/phronmophobic/mobiletest.clj
which is called from https://github.com/phronmophobic/mobiletest/blob/main/xcode/MobileTest/MobileTest/AppDelegate.swift#L17
call_eval
calls into https://github.com/phronmophobic/mobiletest/blob/main/xcode/MobileTest/csource/Bridge.c#L63 which calls into clj_eval
in the clojure file
yea, I was surprised too. Thanks to the magic of sci
the eval is interpreted by sci
but sci is compiled to native
So do we get full Clojure here or Sci? (sorry, I am not very familiar with sci, need to learn more)
https://github.com/borkdude/sci you get sci, but you can hook it up to whatever Clojure library you want
right. the union of whatever is graalvm compatible or can be executed by sci
That is totally wild I gotta say š Is there a big performance penalty, do you expect to be able to just code a full app with this at this point?
not totally sure, but I think so. phones are pretty powerful these days
@raspasov if you are familiar with babashka, it's the same interpreter. performance is pretty good for say, replacing bash scripts
you can try this "full stack app" in babashka + scittle (the CLJS version of sci): https://github.com/kloimhardt/babashka-scittle-guestbook
The thing where it becomes noticeably slower is when you have a loop with 1M iterations. In sci this can take 500ms whereas in Clojure it's only 20ms for example, because Clojure emits direct bytecode.
@smith.adriane what about that demo where you had some UI, was this using the same method?
But note that the functions you can hook into sci can be natively compiled, so you only pay the performance penalty for the "glue" code
@borkdude understood; That much looping is actually rare in a mobile app; so for some UI dev work definitely useable, I assume.
more or less. I also linked in a graphics library called skia. I have a cross platform UI library that can draw render using skia.
not sure itās ready for general use, but youāre welcome to try
So you can actually get a REPL running in this? So actually do dev work, like change the UI, etc? Youād need some way to constantly serve the updated code, ala figwheel-main, shadow-cljs etc I assume.
babashka has a nrepl compatible server
I use emacs/cider, so it "just worked" for me
to do actual dev work, it depends what is evaluated at runtime and what is baked statically into the binary
@borkdude thatās a good pointā¦ Wonder if thereās gonna be a difference there between UIKit and SwiftUI
I lack enough knowledge about the Objective-C runtime/Swift itself to say with 100% certainty.
just pushed my changes that start an nrepl server
@smith.adriane Do you have an end goal with this experiment, or itās just an exploration? I think if you can actually code native UIās through Clojure, that can serve a niche, even if small.
How do you guys deploy the app to your phone? I have 0 experience with mobile, but I do have an iPhone :)
eventually, I'd like to replace html/css/javascript with pure clojure, but no specific timeline š
I think you're supposed to be able to run apps on your phone with a free account, but there's a 10 day expiration after each deploy
if I recall correctly
Ah, got itā¦ @borkdude it comes down to knowing where to click inside of XCode, and itās confusing š
And thatās about it, it should be able to run at this point, assuming no build errors.
iOS simulator is pretty good, so you wonāt get much out of the phone per-se. Unless you need to access camera, and some APIs which are not available on the simulator. For most UI work, the simulator is 99% accurate (performance aside, that can be misleading).
cool, I'll try the simulator as well. but for me it's not real unless I can tell others to download the app and install it :)
I haven't tried to compile for the simulator yet. I assume there's some script changes necessary
@smith.adriane let me try, should be the same
Except for IP changes, Simulator is pretty much identical on iOS/XCode. Itās one of the few good things about Xcode š
yea, I think the architecture is different
how long does compilation take on your machines? it seems it's stuck at the setup step on mine
the repo adds a new shared library function
you'll have to recompile the shared library
Or nuking ālibraryā folderā¦ It was not very clear what was the cause of that issue.
This comment might be helpful: https://github.com/oracle/graal/issues/3251#issuecomment-842820130
I don't think the current repo is loading any native libraries.
@smith.adriane FWIW, killing it right now and starting again without nuking ālibraryā made it continue for meā¦
yea, that seems like a promising thread to pull
maybe it's as simple as creating all the necessary directories?
like ./library/tmp
Got an error: Fatal error:org.graalvm.compiler.debug.GraalError: LLVM linking failed into batch 8 (f8000-f9000). Use -H:LLVMMaxFunctionsPerBatch=1 to compile each method individually. (/Users/raspasov/projects/github/mobiletest/scripts/../library/tmp/SVM-1623926169792/llvm/b8.bc): 1
I've seen that error, but I thought it was usually when I compile with the wrong jvm
maybe it's something different or some cache error
raspasov@MBP mobiletest % java --version Ā Ā Ā Ā Ā openjdk 11.0.11 2021-04-20 OpenJDK Runtime Environment GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05) OpenJDK 64-Bit Server VM GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05, mixed mode, sharing)
I've tried that before, but it never seems to help
however, I've been using quite a bit of guess and check without 100% understanding what every flag does, so any improvements or experimentation are welcome
Yeahā¦ This is getting stuck again for me. Perhaps youāre seeing it less often because youāre on M1, and if it is a deadlock like borkdude was suggesting, it could be behaving differently on different CPUs.
at least, not directly from clojure
trying with the newest dev build... https://github.com/graalvm/graalvm-ce-dev-builds/releases/tag/21.2.0-dev-20210616_2034
Yeah, unfortunately this is getting stuck for me as well, and not able to compile anymore š