Fork me on GitHub
#graalvm
<
2021-07-29
>
cap10morgan21:07:24

not 100% sure this is the only thing that changed, but since upgrading to clojure tools-deps 1.10.3.933 I'm getting this error (consistently after several attempts & cleans) in my native-image project:

Fatal error:com.oracle.svm.core.util.VMError$HostedError: com.oracle.svm.core.util.VMError$HostedError: clojure.tools.reader.reader_types$indexing_push_back_reader.invokeStatic(Object, Object, Object): has no code address offset set.

cap10morgan21:07:42

I'll try downgrading back to the previous stable release of tools-deps and see if that makes any difference

cap10morgan21:07:13

nope, same error. hmm...

borkdude21:07:57

@cap10morgan this is a symptom of compiling one namespace several times

borkdude21:07:33

I've seen this in a lot of projects. E.g. with lein, when you compile with :aot true you might see this, but when you change it to :aot [my.main] it will disappear

cap10morgan21:07:49

yeah I found your old issue saying that so I changed my :aot true (depstar) to :aot [my.main.ns] but no change

borkdude21:07:46

try a manual (compile 'my.main.ns) and be sure to clean your targets before compiling

cap10morgan21:07:31

oh, maybe found it! org.clojure/tools.reader 1.3.5 works, 1.3.6 breaks

cap10morgan21:07:19

I'll see if I can make a minimal repro project or if the issue really still is in mine

borkdude21:07:08

in my experience this issue is hard to reproduce but in all cases I've had this, it had to do with the compilation

borkdude21:07:16

keep us posted

borkdude21:07:38

you don't really need depstar for graalvm btw

borkdude21:07:56

you can just compile manually and give graalvm a classpath with clojure + your classes dir

cap10morgan21:07:33

oh, actually, I am already not using depstar for my native-image target; just clj.native-image

borkdude21:07:58

that might be the culprit then

borkdude21:07:42

the above tool should only have to compile the main-ns

borkdude21:07:51

all the other namespaces will already be compiled then

borkdude22:07:51

I bet you a beer that when you fork that tool and remove all but the main-ns, it will work