Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install OpenJDK 21 in ATH image #1321

Merged
merged 2 commits into from
Aug 12, 2023
Merged

Install OpenJDK 21 in ATH image #1321

merged 2 commits into from
Aug 12, 2023

Conversation

basil
Copy link
Member

@basil basil commented Aug 11, 2023

Prerequisite for #1320. Without changing the existing configuration (Java 17 as default, Java 11 available), add OpenJDK 21 to the image.

Testing done

Verified OpenJDK 17 was still the default. Verified I could switch to OpenJDK 21 with set-java.sh and ran java -version successfully.

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails to build on arm64:

➜  acceptance-test-harness git:(openjdk21) docker build -t ath src/main/resources/ath-container
[+] Building 55.2s (9/27)
 => [internal] load build definition from Dockerfile                                                                                                                                                 0.0s
 => => transferring dockerfile: 6.47kB                                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                                                                      0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.04                                                                                                                                      0.0s
 => [ 1/23] FROM docker.io/library/ubuntu:22.04                                                                                                                                                      0.0s
 => [internal] load build context                                                                                                                                                                    0.0s
 => => transferring context: 3.92kB                                                                                                                                                                  0.0s
 => [ 2/23] RUN apt-get update &&   apt-get install -y --no-install-recommends     gpg-agent     software-properties-common     &&   apt-get clean all && rm -rf /var/cache/apt                     15.0s
 => [ 3/23] RUN apt-get update &&     DEBIAN_FRONTEND=noninteractive     TZ=Etc/UTC     apt-get install -y --no-install-recommends         ca-certificates         gnupg         lsb-release        30.9s
 => [ 4/23] RUN curl -sSLo /tmp/jdk21.tar.gz "https://github.com/adoptium/temurin21-binaries/releases/download/jdk21-${JDK21_VERSION}/OpenJDK21U-jdk_x64_linux_hotspot_${JDK21_VERSION//-beta/}.tar  9.0s
 => ERROR [ 5/23] RUN update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk-amd64/bin/java 21   && update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-21-  0.2s
------
 > [ 5/23] RUN update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk-amd64/bin/java 21   && update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-21-openjdk-amd64/bin/javac 21   && update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java   && update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac:
#8 0.171 update-alternatives: error: alternative /usr/lib/jvm/java-17-openjdk-amd64/bin/java for java not registered; not setting
------
executor failed running [/bin/bash -o pipefail -c update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk-amd64/bin/java 21   && update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-21-openjdk-amd64/bin/javac 21   && update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java   && update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac]: exit code: 2

@basil
Copy link
Member Author

basil commented Aug 11, 2023

Just a few lines below, there is this:

curl --silent https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2 --output /tmp/firefox.tar.bz2

If ARM64 was supported, that line would not exist.

@timja
Copy link
Member

timja commented Aug 11, 2023

Just a few lines below, there is this:

curl --silent https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2 --output /tmp/firefox.tar.bz2

If ARM64 was supported, that line would not exist.

Right broken in #1043.

ath-user@2e4cc33d2a8f:~/sources$ firefox
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

I guess this makes it very explicit that it was broken, it still built before.
We can file an issue and continue for now.

@timja timja merged commit 993880e into jenkinsci:master Aug 12, 2023
22 checks passed
@basil basil deleted the openjdk21 branch August 12, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants