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

Create a jdk21u x64/aarch64/ppc64le Linux DevKit toolchain within Jenkins #3519

Closed
andrew-m-leonard opened this issue Nov 2, 2023 · 6 comments
Assignees
Labels
aarch Issues that affect or relate to the aarch ARCHITECTURE p-linux Issues that affect or relate to the ppc LINUX OS reproducible-build

Comments

@andrew-m-leonard
Copy link
Contributor

andrew-m-leonard commented Nov 2, 2023

  • Got through the steps and document the experience of making a jdk21u x64/aarch64/ppc64le linux "DevKit" within the adoptopenjdk/centos7_build_image
  • Create a new ci.adoptium.net job to create a DevKit and store the result as an artifact
@andrew-m-leonard
Copy link
Contributor Author

@andrew-m-leonard
Copy link
Contributor Author

andrew-m-leonard commented Nov 8, 2023

  1. The standard DevKit make script supports OL 6.4/7.6 and Fedora (any published version)
  2. As per doc, build a DevKit by changing to "make/devkit" folder and running make eg.
make TARGETS="aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21
  1. The built DevKit is found under the build/devkit/result directory
  2. We need to build on CentOS7 so a small patch is required to make/devkit/Tools.gmk to support it:
diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk
index 187320ca2..ec43995fc 100644
--- a/make/devkit/Tools.gmk
+++ b/make/devkit/Tools.gmk
@@ -62,6 +62,17 @@ ifeq ($(BASE_OS), OL)
     BASE_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
     LINUX_VERSION := OL6.4
   endif
+else ifeq ($(BASE_OS), Centos)
+  DEFAULT_OS_VERSION := 7
+  ifeq ($(BASE_OS_VERSION), )
+    BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
+  endif
+  ifeq ($(ARCH), x86_64)
+    BASE_URL := https://vault.centos.org/$(BASE_OS_VERSION)/os/$(ARCH)/Packages/
+  else
+    BASE_URL := http://vault.centos.org/altarch/$(BASE_OS_VERSION)/os/$(ARCH)/Packages/
+  endif
+  LINUX_VERSION := Centos$(BASE_OS_VERSION)
 else ifeq ($(BASE_OS), Fedora)
   ifeq ($(ARCH), riscv64)
     DEFAULT_OS_VERSION := rawhide/68692
@@ -246,7 +257,7 @@ download-rpms:
         # Only run this if rpm dir is empty.
         ifeq ($(wildcard $(DOWNLOAD_RPMS)/*.rpm), )
 	  cd $(DOWNLOAD_RPMS) && \
-	      wget -r -np -nd $(patsubst %, -A "*%*.rpm", $(RPM_LIST)) $(BASE_URL)
+	      wget -e robots=off -r -np -nd $(patsubst %, -A "*%*.rpm", $(RPM_LIST)) $(BASE_URL)
         endif
 
 ##########################################################################################
  1. Then build DevKit for CentOS using:
make TARGETS="aarch64-linux-gnu" BASE_OS=Centos BASE_OS_VERSION=7.6.1810
  1. DevKit build then available in: build/devkit/result/aarch64-linux-gnu-to-aarch64-linux-gnu
  2. To build openjdk with this DevKit, issue a configure with the devkit and an appropriate boot jdk:
bash ./configure --with-devkit=/home/andrew/jdk21u/build/devkit/result/aarch64-linux-gnu-to-aarch64-linux-gnu --with-boot-jdk=/home/andrew/temurin-build/jdk-20

@andrew-m-leonard
Copy link
Contributor Author

andrew-m-leonard commented Dec 6, 2023

A problem trying to build the DevKit for jdk21u on Centos7, due to a bug in binutils-2.39 ref : https://sourceware.org/bugzilla/show_bug.cgi?id=29476

Each linux platform needs a devkit patch file placed
into make/devkit/patches <arch>-binutils-2.39.patch (eg.x86_64-binutils-2.39.patch) :

diff --git a/gprofng/Makefile.am b/gprofng/Makefile.am
index 2fcd695140ca6e3f06f3cc6844d498847a21a63d..96f8015700885e00b9e121cd61adede63c2b832e 100644 (file)
--- a/gprofng/Makefile.am
+++ b/gprofng/Makefile.am
@@ -23,11 +23,14 @@ AUTOMAKE_OPTIONS = dejagnu foreign
 if BUILD_COLLECTOR
     COLLECTOR_SUBDIRS = libcollector
 endif
+if BUILD_MAN
+    DOC_SUBDIR = doc
+endif
 if BUILD_SRC
-    SRC_SUBDIRS = src gp-display-html doc
+    SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR)
 endif
 SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
-DIST_SUBDIRS = libcollector src gp-display-html doc
+DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR)
 
 # Setup the testing framework, if you have one
 EXPECT = expect
diff --git a/gprofng/Makefile.in b/gprofng/Makefile.in
index fd5279b4df13ca21061bfc833797a0bb6ada62bc..d660f99233fedef9df9cae31629cd3ba57a51150 100644 (file)
--- a/gprofng/Makefile.in
+++ b/gprofng/Makefile.in
@@ -381,9 +381,10 @@ zlibinc = @zlibinc@
 ACLOCAL_AMFLAGS = -I . -I .. 
 AUTOMAKE_OPTIONS = dejagnu foreign
 @BUILD_COLLECTOR_TRUE@COLLECTOR_SUBDIRS = libcollector
-@BUILD_SRC_TRUE@SRC_SUBDIRS = src gp-display-html doc
+@BUILD_MAN_TRUE@DOC_SUBDIR = doc
+@BUILD_SRC_TRUE@SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR)
 SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
-DIST_SUBDIRS = libcollector src gp-display-html doc
+DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR)
 RUNTEST = runtest
 RUNTESTFLAGS = 
 BASEDIR = $(srcdir)/..

@andrew-m-leonard andrew-m-leonard changed the title Document experience using a jdk21u Linux DevKit toolchain Create a jdk21u aarch64 Linux DevKit toolchain Dec 7, 2023
@github-actions github-actions bot added the aarch Issues that affect or relate to the aarch ARCHITECTURE label Dec 7, 2023
@andrew-m-leonard andrew-m-leonard changed the title Create a jdk21u aarch64 Linux DevKit toolchain Create a jdk21u aarch64 Linux DevKit toolchain within Jenkins Dec 7, 2023
@andrew-m-leonard
Copy link
Contributor Author

PR to implement Devkit creation in Jenkins and publishing to a new devkit-binaries repo: adoptium/ci-jenkins-pipelines#955

@andrew-m-leonard
Copy link
Contributor Author

The openjdk make/devkit/Tools.gmk does not perform any Centos GPG key verification, and since we need to ensure a secure DevKit is created, I will need to add a separate rpm download and gpg key verification step.

@andrew-m-leonard andrew-m-leonard changed the title Create a jdk21u aarch64 Linux DevKit toolchain within Jenkins Create a jdk21u x64/aarch64/ppc64le Linux DevKit toolchain within Jenkins Mar 19, 2024
@github-actions github-actions bot added the p-linux Issues that affect or relate to the ppc LINUX OS label Mar 19, 2024
@andrew-m-leonard
Copy link
Contributor Author

Completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aarch Issues that affect or relate to the aarch ARCHITECTURE p-linux Issues that affect or relate to the ppc LINUX OS reproducible-build
Projects
Status: Done
Development

No branches or pull requests

1 participant