optimism-java / hildr

Hildr is an OP Stack rollup client written in Java 21 with GraalVM native.
MIT License
35 stars 9 forks source link

Error building docker image on arm machine #170

Open barnabasbusa opened 2 weeks ago

barnabasbusa commented 2 weeks ago

I have tried to build the docker image on an arm machine (M1 mac) and got this error:

 => ERROR [builder  6/10] RUN java -version                                                                               0.2s
------
 > [builder  6/10] RUN java -version:
0.140 OrbStack ERROR: Dynamic loader not found: /lib64/ld-linux-x86-64.so.2
0.140
0.140 This usually means that you're running an x86 program on an arm64 OS without multi-arch libraries.
0.140 To fix this, you can:
0.140   1. Use an Intel (amd64) machine to run this program; or
0.140   2. Install multi-arch libraries in this machine.
0.140
0.140 This can also be caused by running a glibc executable in a musl distro (e.g. Alpine), or vice versa.
0.140
0.140 For more details and instructions, see https://go.orbstack.dev/multiarch
------
Dockerfile:11
--------------------
   9 |     #RUN /usr/java/jdk-20/bin/gu install native-image
  10 |     ENV PATH=$JAVA_HOME/bin:$PATH
  11 | >>> RUN java -version
  12 |     RUN native-image --version
  13 |     #ENV MUSL_PKG=https://more.musl.cc/10/x86_64-linux-musl/x86_64-linux-musl-native.tgz \
--------------------
ERROR: failed to solve: process "/bin/sh -c java -version" did not complete successfully: exit code: 255

Would it be possible to add multiarch support?

GrapeBaBa commented 1 week ago

@thinkAfCod Can you help to check it?

thinkAfCod commented 6 days ago

I tried using sdkman to install the JAVA environment, and this step was successfully completed.

However, compiling the binary on the ARM platform is currently not supported by GraalVM.

It is recommended to try specifying the jvm.dock file to compile the image.

GrapeBaBa commented 4 days ago

@thinkAfCod is it fixed by v0.4.2?