From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) Date: Sun, 21 Jul 2019 13:29:10 +0200 Message-ID: <87muh7eid5.fsf@elephly.net> References: <8736j61n57.fsf@gmail.com> <87o91ugdot.fsf@elephly.net> <87ftn5gjzw.fsf@elephly.net> <871ryogu6j.fsf@elephly.net> <87r26nfwes.fsf@elephly.net> <87a7dafntp.fsf@elephly.net> <878ssufajf.fsf@elephly.net> <875znyf0mr.fsf@elephly.net> <87zhl9drm6.fsf@elephly.net> <20190720110612.3f33171f@sybil.lepiller.eu> <87sgr0e7ot.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44599) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpA24-0005Xp-I7 for guix-devel@gnu.org; Sun, 21 Jul 2019 07:29:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpA23-0004vY-6B for guix-devel@gnu.org; Sun, 21 Jul 2019 07:29:36 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hpA22-0004pI-Pq for guix-devel@gnu.org; Sun, 21 Jul 2019 07:29:35 -0400 In-reply-to: <87sgr0e7ot.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Julien Lepiller Cc: Guix-devel , 36685@debbugs.gnu.org --=-=-= Content-Type: text/plain So, with the following change I was able to build all the way up to the latest openjdk. Should we use it despite the introduction of a memory leak in a bootstrap JVM? Can we make the patch smaller (fewer uses of glibc 2.28 or gcc-5)? What do you think? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=java.diff diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 403c446a82..60363d60c3 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -116,6 +116,9 @@ (base32 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c")))) (build-system gnu-build-system) + (native-inputs + `(("libc" ,glibc-2.28) + ("gcc" ,gcc-5))) (home-page "http://jikes.sourceforge.net/") (synopsis "Compiler for the Java language") (description "Jikes is a compiler that translates Java source files as @@ -152,12 +155,20 @@ and binary format defined in The Java Virtual Machine Specification.") "--disable-gjdoc") #:phases (modify-phases %standard-phases + (add-after 'unpack 'foo + (lambda _ + (substitute* "native/jni/java-io/java_io_VMFile.c" + (("result = cpio_isFileExists.*" m) + (string-append m "\n//"))) + #t)) (add-after 'install 'install-data (lambda _ (invoke "make" "install-data")))))) (native-inputs `(("jikes" ,jikes) ("fastjar" ,fastjar) ("libltdl" ,libltdl) + ("gcc" ,gcc-5) + ("libc" ,glibc-2.28) ("pkg-config" ,pkg-config))) (home-page "https://www.gnu.org/software/classpath/") (synopsis "Essential libraries for Java") @@ -191,6 +202,9 @@ language.") `(("classpath" ,classpath-bootstrap) ("jikes" ,jikes) ("zlib" ,zlib))) + (native-inputs + `(("libc" ,glibc-2.28) + ("gcc" ,gcc-5))) (home-page "http://jamvm.sourceforge.net/") (synopsis "Small Java Virtual Machine") (description "JamVM is a Java Virtual Machine conforming to the JVM @@ -302,7 +316,9 @@ JNI.") `(("jikes" ,jikes) ("jamvm" ,jamvm-1-bootstrap) ("unzip" ,unzip) - ("zip" ,zip))) + ("zip" ,zip) + ("gcc" ,gcc-5) + ("libc" ,glibc-2.28))) (home-page "http://ant.apache.org") (synopsis "Build tool for Java") (description @@ -627,7 +643,9 @@ machine."))) ("fastjar" ,fastjar) ("jamvm" ,jamvm-1-bootstrap) ("libltdl" ,libltdl) - ("pkg-config" ,pkg-config)))))) + ("pkg-config" ,pkg-config) + ("gcc" ,gcc-5) + ("libc" ,glibc-2.28)))))) (define jamvm (package (inherit jamvm-1-bootstrap) @@ -656,7 +674,9 @@ machine."))) `(("guile" ,guile-2.2) ("ecj-bootstrap" ,ecj-bootstrap) ("jamvm" ,jamvm) - ("classpath" ,classpath-devel))))) + ("classpath" ,classpath-devel) + ("gcc" ,gcc-5) + ("libc" ,glibc-2.28))))) ;; The bootstrap JDK consisting of jamvm, classpath-devel, ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's @@ -740,6 +760,9 @@ machine."))) (with-directory-excursion "openjdk" (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src")) (rename-file "hg-checkout" "hotspot")) + (substitute* "patches/freetypeversion.patch" + (("REQUIRED_FREETYPE_VERSION = 2.2.1") + "REQUIRED_FREETYPE_VERSION = 2.10.1")) (substitute* "Makefile.in" (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;") "echo \"trust me\";") @@ -907,7 +930,8 @@ machine."))) ("fastjar" ,fastjar) ("fontconfig" ,fontconfig) ("freetype" ,freetype) - ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7 + ("gcc" ,gcc-5) + ("libc" ,glibc-2.28) ("gtk" ,gtk+-2) ("gawk" ,gawk) ("giflib" ,giflib) @@ -1107,6 +1131,18 @@ bootstrapping purposes.") ((name . _) name)) inputs)))) #t))) + (add-after 'unpack 'patch-bitrot + (lambda _ + (substitute* '("patches/boot/revert-6973616.patch" + "openjdk.src/jdk/make/common/shared/Defs-versions.gmk") + (("REQUIRED_FREETYPE_VERSION = 2.2.1") + "REQUIRED_FREETYPE_VERSION = 2.10.1")) + ;; As of attr 2.4.48 this header is no longer + ;; included. It is provided by the libc instead. + (substitute* '("configure" + "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c") + (("attr/xattr.h") "sys/xattr.h")) + #t)) (add-after 'unpack 'fix-x11-extension-include-path (lambda* (#:key inputs #:allow-other-keys) (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" @@ -1586,6 +1622,7 @@ IcedTea build harness.") (delete 'patch-paths) (delete 'set-additional-paths) (delete 'patch-patches) + (delete 'patch-bitrot) ;; Prevent the keytool from recording the current time when ;; adding certificates at build time. (add-after 'unpack 'patch-keystore --=-=-= Content-Type: text/plain -- Ricardo --=-=-=--