Fork me on GitHub
#graalvm
<
2021-03-02
>
katox17:03:33

@borkdude I tried to compile deps.clj locally but I can't find a graal version that is able to actually build it. With 20.1.0 I get Fatal error:java.lang.NoSuchMethodError: 'org.graalvm.compiler.options.OptionDescriptor org.graalvm.compiler.options.OptionDescriptor.create(java.lang.String, org.graalvm.compiler.options.OptionType, java.lang.Class, java.lang.String, java.lang.Class, java.lang.String, org.graalvm.compiler.options.OptionKey, boolean)'. Something familiar?

borkdude17:03:53

@katox huh? deps.clj is a pretty standard project that should work with most any graalvm version. I haven't seen this error before, but fwiw, deps.clj is also used in babashka, so you might be able to check how it's used there

borkdude17:03:02

Try 21.0.0 btw

borkdude17:03:18

And perhaps Java 11. This is what I use for most of my projects now

katox17:03:28

I did, Fatal error:com.oracle.svm.core.util.VMError$HostedError: Option name "HotSpotPostOnExceptions" has multiple definitions: org.graalvm.compiler.hotspot.meta.HotSpotExceptionDispatchPlugin$Options.HotSpotPostOnExceptions and org.graalvm.compiler.hotspot.meta.HotSpotNodePlugin$Options.HotSpotPostOnExceptions

katox17:03:40

it is java11

borkdude17:03:57

My wife is calling me, I must go now :/

borkdude17:03:02

dinner time ;)

katox17:03:06

the multiple deps is graalvm-ce-java11-21.0.0.2

katox17:03:18

I can build other things just fine

katox17:03:39

np, enjoy your dinner

borkdude18:03:14

@katox I'm back. Just for the record. Are you using deps.clj as a library or are you trying to compile the project to native as is?

katox18:03:54

as is to native

katox18:03:07

it seems like a some kind of a compatibility error

katox18:03:38

I can't build the latest babashka either but it fails uberjaring it so I don't really know

katox18:03:42

$ env BABASHKA_LEAN=true script/uberjar
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing)
OpenJDK 64-Bit Server VM warning: forcing TieredStopAtLevel to full optimization because JVMCI is enabled
OpenJDK 64-Bit Server VM warning: forcing TieredStopAtLevel to full optimization because JVMCI is enabled
Syntax error (FileNotFoundException) compiling at (babashka/impl/transit.clj:1:1).
Could not locate sci/impl/namespaces__init.class, sci/impl/namespaces.clj or sci/impl/namespaces.cljc on classpath.

Full report at:
/tmp/clojure-9354290185570760188.edn
Error encountered performing task 'do' with profile(s): 'base,system,user,provided,dev,transit,hiccup,test-check,reflection'
Suppressed exit
katox@oryx ~/p/babashka (master)$ cat /tmp/clojure-9354290185570760188.edn
{:clojure.main/message
 "Syntax error (FileNotFoundException) compiling at (babashka/impl/transit.clj:1:1).\nCould not locate sci/impl/namespaces__init.class, sci/impl/namespaces.clj or sci/impl/namespaces.cljc on classpath.\n",

borkdude18:03:41

@katox As for babashka: you should clone the repo with --recursive so it clones the submodules. Sci is a submodule of babashka

borkdude18:03:29

As for deps.clj, it's currently based on 20.3.0: https://github.com/borkdude/deps.clj/blob/0b70844983bf23fff4c2991dadb3fd14c4102b27/project.clj#L18 This is a hard dependency but this can be removed when upgrading to 21.0.0

borkdude18:03:45

A PR to upgrade that project to 21.0.0 is welcome

katox18:03:51

I also tried that but it failed as well

katox18:03:06

kinda getting errors everywhere .)

borkdude18:03:21

It builds on CI

borkdude18:03:38

with 20.3.0 java 11

katox18:03:41

what's puzzling is that it bb doesnt uberjar in docker build

katox18:03:10

I have 6 graal versions here, let me try .)

katox18:03:20

hmm, yes, it seems to build with this one

katox18:03:00

it doesn't with 20.1 or 21 on my machine

borkdude18:03:48

yes, you MUST use 20.3.0 java 11 to compile it. > This is a hard dependency

borkdude18:03:00

But this will change from 21.0.0 on

katox18:03:14

my bad, thanks

borkdude18:03:23

babashka is already on 21.0.0

borkdude18:03:31

PR to upgrade deps.clj welcome

katox18:03:42

I'll have a look

borkdude18:03:49

(mainly the CI config and removal of the reflector fix lib)

katox23:03:10

@borkdude mostly done but I can't guess what's the right gu filepath on mac

borkdude23:03:51

I'll have a look tomorrow

katox23:03:33

last try .)

katox23:03:55

hmm, not /Users/distiller/graalvm-ce-java11-21.0.0.2/Contents/Home/bin/gu: No such file or directory either

katox23:03:38

nvm, someone with a mac would know

delaguardo09:03:10

you can use brew install delaguardo/graalvm/[email protected] and follow instructions given in Caveats

katox23:03:38

green, stupid copy-and-paste .)