adoptium / temurin-build

Eclipse Temurin™ build scripts - common across all releases/versions
Apache License 2.0
1.03k stars 249 forks source link

OpenJDK aarch64 docker build #2870

Open gounthar opened 2 years ago

gounthar commented 2 years ago

What are you trying to do? I'm trying to build with the following command ./makejdk-any-platform.sh --docker --clean-docker-build jdk11u on a Oracle Free Tier Ubuntu 20.04.2 aarch64 machine running kernel 5.13.0-1018-oracle with docker 20.10.7, build 20.10.7-0ubuntu5~20.04.2.

Expected behaviour: A built jdk.

Observed behaviour:

/openjdk/sbin/common/common.sh: line 185: /usr/lib/jvm/jdk11/bin/java: cannot execute binary file: Exec format error

I guess the process is linked somehow to x86_64 binaries

Step 4/23 : RUN sh -c "mkdir -p /usr/lib/jvm/jdk11 && wget 'https://api.adoptium.net/v3/binary/latest/11/ga/linux/x64/jdk/hotspot/normal/adoptium?project=jdk' -O - | tar xzf - -C /usr/lib/jvm/jdk11 --strip-components=1"

Any other comments: Would it be possible to detect the arch and dynamize the previous wget command?

Thanks.

sxa commented 2 years ago

That will probably be this line here: https://github.com/adoptium/temurin-build/blob/57385678aecff3ca355dce930d4779d9aed81791/docker/dockerfile-generator.sh#L303

Would you be interested in submitting a PR to do the detection? The API architectures are mostly the same as uname other than x64 (x64 instead of x86-64) and arm32 (arm instead of armv7l)

gounthar commented 2 years ago

Yes, sure, let me try that.

bbednarek commented 1 year ago

Any updates on this? When do you plan to support aarch64?

We are waiting for Metabase ARM image which is blocked by this issue.

karianna commented 1 year ago

@bbednarek We have Aarch 64 binaries available through adoptium.net - is that what you're after? This ticket is about allowing folks to build their own binaries at home for themselves.

bbednarek commented 1 year ago

@karianna Thank for quick reply. I am not talking about binaries. I'm asking about linux/arm64 arch of eclipse-temurin:11-jre-alpine Docker image

sxa commented 1 year ago

@bbednarek As @karianna says this issue is NOT related to the availability of Temurin on Alpine/aarch64. The issue we have covering Alpine on aarch64 is https://github.com/adoptium/containers/issues/158