kawamuray / wasmtime-java

Java or JVM-language binding for Wasmtime
Apache License 2.0
127 stars 29 forks source link

Support aarch64-linux for docker on macos #53

Closed rob-odwyer closed 11 months ago

rob-odwyer commented 11 months ago

This adds a build configuration for aarch64-linux, which is used when running a Linux docker container on a aarch64 Mac.

A different docker image base is needed to get a aarch64 cross-compiler, and there's a small tradeoff in terms of GCC compatibility from using a newer image in this case (ubuntu:16:04 vs centos:7).

I also fixed an issue that had appeared with the release build - the directory for JAVA_HOME in the docker image was too specific and changed along with the package being upgraded. It should be using a more generic symlinked directory now.

kawamuray commented 11 months ago

I'm just curious do we had to use docker based build for aarch64/linux if we give up old glibc compatibility?

rob-odwyer commented 11 months ago

@kawamuray I think we don't need to use the docker based build - but one reason to use this would be to test locally against an image used in production. In that case you might have an image with an old glibc that still needs the compatibility.

rob-odwyer commented 11 months ago

I also should mention that I based some of this on the wasmtime project's build system again - they also use an ubuntu:16.04 container to build for aarch64-linux:

https://github.com/bytecodealliance/wasmtime/tree/main/ci/docker

kawamuray commented 11 months ago

Understood, thanks :) LGTM!