Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to and GraalVM slack:
katox 2020-03-23T10:01:37.354100Z

@hi895 the simplest way is to build within the docker container and copy the DNS dynamic .so

katox 2020-03-23T10:01:44.354300Z

Have a look at this


Thanks @katox! That looks interesting πŸ™‚ For now I think I stick with the alpine-glibc approach but if the image size is really critical, that is definitely a neat solution!

katox 2020-03-23T10:22:03.354800Z

Dev image size is critical? While building? Because this target image really just contains the shared libraries and the final graal native binary, nothing else.


I meant, copying all the shared libraries is a great solution to get a small FROM scratch image. With alpine the image is probably a little bigger. The reason for me to still stick with alpine for now is simply that the Dockerfile has less lines of code and feels easier to maintain.. but it’s really cool that all it takes to run from scratch is copying those libraries πŸ™‚

katox 2020-03-23T12:50:59.355200Z

Note that it is not totally safe to build a graal image on one system and run it against shared libraries of another. Slight incompatibilities or memory corruption would be hell to debug. Unfortunately you can't use static linking if you need DNS resolving.


hm I do use --static … or you refer to something else?

katox 2020-03-23T14:21:50.355700Z

Yes, you can't use static linking, therefore -static. See


Interesting, because that is not the issue I get. I use --static . DNS lookup works as long as glibc is included in the final image. If glibc is not included, I also don’t get a SEGFAULT. I get a UnknownHostException.

katox 2020-03-23T14:30:56.356200Z

Yes, it is in the linked issues, see


Yes, that is exactly the issue I also came across πŸ™‚

katox 2020-03-23T14:42:10.356800Z

I talked about the issue with Oracle guys. In the end they marked the whole "static linking with glibc" as an usupported case. Not just by them but GNU as well. So I ended up with something that's more or less the same for me minus some initial hunting of dynamically linked shared libraries. But if you stick with a stable distribution like stable debian they are very unlike to ever change.


That sounds like a good compromise, yes πŸ™‚ Sad to hear the don’t plant to support this πŸ˜• The easy of creating static binaries is something I miss from writing Go πŸ˜‰

Chris Lester 2020-03-23T15:25:05.358100Z

I'm seeing an error "clojure.core$pr_on was unintentionally initialized at build time", which isn't in the call tree nor does initialize-at-build-time help. Has anyone seen this error before?

borkdude 2020-03-23T15:34:46.358400Z

unfamiliar with that error.

borkdude 2020-03-23T21:32:13.358700Z

native-image webinar:

lread 2020-03-24T12:36:34.361600Z

Thanks for the info!