babashka-sci-dev

lispyclouds 2022-04-18T09:03:20.281029Z

Re: https://clojurians.slack.com/archives/CLX41ASCS/p1650269317966249 Does this warrant a trial with graalvm 17?

borkdude 2022-04-18T09:05:29.975469Z

@rahul080327 I already had JVM 17 once but we decided to hold off since it added 5mb to the native image size without any significant new features.

lispyclouds 2022-04-18T09:06:31.788819Z

yeah i remember that, im not sure adding socat and netcat for convenience is warranted on the docker image

borkdude 2022-04-18T09:06:36.938509Z

but feel free to experiment locally to see if that solves some problem. last time we tried the java.net.http stuff didn't work yet with the unix socket stuff.

borkdude 2022-04-18T09:06:43.641369Z

no, they can just make their own derived image

lispyclouds 2022-04-18T09:06:57.986689Z

yeah thats what i concluded with

lispyclouds 2022-04-18T09:08:21.142229Z

> last time we tried the java.net.http stuff didn't work yet with the unix socket stuff do you remember what it was exactly? i think apart from the image bloat there should not be an issue. we still would need curl to do http over unix sock though

lispyclouds 2022-04-18T09:09:15.679029Z

jdk 17 would just enable code like https://nipafx.dev/java-unix-domain-sockets/ which essentially is what socat is solving

lispyclouds 2022-04-18T09:10:58.252179Z

anyways, will try building a bb 17

borkdude 2022-04-18T09:12:15.389459Z

it was a java 17 bug

lispyclouds 2022-04-18T09:12:43.284249Z

right, will try to find it

borkdude 2022-04-18T09:13:37.064789Z

https://bugs.openjdk.java.net/browse/JDK-8275838

lispyclouds 2022-04-18T09:14:22.822609Z

yeah this is expected hence we need curl

lispyclouds 2022-04-18T09:15:47.205739Z

this is still not addressed til now, not sure when it would be

borkdude 2022-04-18T09:16:58.876039Z

pretty silly

borkdude 2022-04-18T12:25:43.418269Z

I haven't but maybe upgrade to 22.0.0.2

borkdude 2022-04-18T12:25:57.899939Z

and prior to this commit stuff still worked, so you might be able to see how it ran then

lispyclouds 2022-04-18T12:26:20.029649Z

seems to happen only on the arm instances

borkdude 2022-04-18T12:26:45.838229Z

you cannot use musl with aarch, use mostly static there

lispyclouds 2022-04-18T12:26:53.243769Z

ahh

lispyclouds 2022-04-18T12:27:30.039259Z

so we still still stick to static only also on arm?

borkdude 2022-04-18T12:27:40.890849Z

yeah, mostly ststiv

borkdude 2022-04-18T12:27:51.630579Z

this works better on raspberry

borkdude 2022-04-18T12:28:02.178099Z

as it then doesn't need anything libz etc on there

lispyclouds 2022-04-18T12:28:04.051369Z

okay, this was new to me

borkdude 2022-04-18T12:33:29.806959Z

so on aarch you need to pass the static-except-glibc flag

borkdude 2022-04-18T12:34:23.151029Z

else it will link against the build system glibc and that's never what we want

lispyclouds 2022-04-18T12:34:54.002689Z

right, need to add to the compile script

borkdude 2022-04-18T12:39:25.159699Z

I don't know if passing --static + mostly-static works

borkdude 2022-04-18T12:40:00.175109Z

Either way, that's not according to the docs

lispyclouds 2022-04-18T12:40:06.235359Z

thats what we are doing in bb right? static + -H:+StaticExecutableWithDynamicLibC ?

borkdude 2022-04-18T12:40:22.544399Z

ok

borkdude 2022-04-18T12:41:37.213809Z

you're right

borkdude 2022-04-18T12:41:40.482149Z

then it should work

lispyclouds 2022-04-18T12:43:06.257859Z

yeah meawhille shell doesnt seem to like the + i guess, trying to quote it

borkdude 2022-04-18T12:44:21.444799Z

that would surprise me

lispyclouds 2022-04-18T12:44:57.051549Z

this is just from me adding that flag into args

borkdude 2022-04-18T12:45:03.891669Z

$ bb -e '(babashka.tasks/shell "echo" "1+1")'
1+1

borkdude 2022-04-18T12:45:53.643229Z

try the script locally

borkdude 2022-04-18T12:46:00.806989Z

and debug locally

borkdude 2022-04-18T12:46:07.707719Z

fastest way

lispyclouds 2022-04-18T12:46:12.831749Z

yeah

borkdude 2022-04-18T13:44:49.453289Z

with newer babashka you no longer need to prepend that .cmd thing in windows

lispyclouds 2022-04-18T13:45:58.919249Z

right, as for the failure only thing i can think of is the graal cache we are doing has gone bad somehow

lispyclouds 2022-04-18T13:46:08.082679Z

its failing right at the gu install

lispyclouds 2022-04-18T13:46:32.919629Z

cannot reproduce this at all locally

lispyclouds 2022-04-18T13:50:14.919359Z

maybe the amd64 cache is used by the arm machines

lispyclouds 2022-04-18T13:51:22.505989Z

finally, holy shit, was a nightmare

lispyclouds 2022-04-18T13:52:10.893229Z

moral of the story: add arch to the cache key too

borkdude 2022-04-18T14:15:29.999259Z

Afk, will look when home

lispyclouds 2022-04-18T14:17:02.620879Z

updating them, seem to have support now, but the api has bunch of breaking changes 😕

borkdude 2022-04-18T14:18:15.943699Z

What api?

lispyclouds 2022-04-18T14:21:08.802679Z

the test lib functions of embedded pg lib we are using

lispyclouds 2022-04-18T14:21:32.956269Z

from 1.0 they have all arch support and the builder api has totally changed

lispyclouds 2022-04-18T14:25:35.446189Z

and it needs docker too now it seems, not sure i understand how it works

borkdude 2022-04-18T14:29:12.341269Z

That's weird