From 5bd13a835b27abf4660dceb8f3de8cf62e704c11 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Wed, 3 Sep 2025 16:35:56 +0000 Subject: [PATCH] gnu: openjdk11: Disable parallel build. * gnu/packages/java.scm (openjdk11)[arguments] <#:parallel-build?>: Unset. <#:phases>{build, build-jre}: Explicitly set JOBS to 1 when parallel build unset. (openjdk12)[arguments]<#:parallel-build?>: Set. (openjdk9)<#:phases>{build}: Explicitly set JOBS to 1 when parallel build is unset. Change-Id: I1a1e5d89e6a223f069755ab7dcc6242a4e90e7cc Signed-off-by: Julien Lepiller --- gnu/packages/java.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 4fc3ee00d46..e2dcd2d1c0d 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -981,7 +981,7 @@ new Date();")) `(,@(if parallel-build? (list (string-append "JOBS=" (number->string (parallel-job-count)))) - '()) + '("JOBS=1")) ,@make-flags)))) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. @@ -1340,6 +1340,8 @@ new Date();")) (outputs '("out" "jdk" "doc")) (arguments (list + ;; Prevent a java.util.ConcurrentModificationException. + #:parallel-build? #f #:modules `((guix build gnu-build-system) (guix build utils) (ice-9 match) @@ -1438,7 +1440,7 @@ new Date();")) `(,@(if parallel-build? (list (string-append "JOBS=" (number->string (parallel-job-count)))) - '()) + '("JOBS=1")) ,@make-flags)))) ;; jdk 11 does not build jre by default any more; so explicitly build ;; it (see: @@ -1449,7 +1451,7 @@ new Date();")) `(,@(if parallel-build? (list (string-append "JOBS=" (number->string (parallel-job-count)))) - '()) + '("JOBS=1")) ,@make-flags)))) (replace 'install (lambda _ @@ -1665,6 +1667,8 @@ new Date();")) (patches (search-patches "openjdk-10-setsignalhandler.patch")))) (arguments (substitute-keyword-arguments (package-arguments openjdk11) + ;; Re-enable parallel build. + ((#:parallel-build? _ #t) #t) ((#:phases phases) #~(modify-phases #$phases #$@(if (target-aarch64?)