From 4fb59c9e4dbb6455ef273c83113472be9c8bb51e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 7 Sep 2019 16:17:39 +0200 Subject: gnu: classpath-bootstrap: Remove call to free. Fixes . * gnu/packages/java.scm (classpath-bootstrap)[arguments]: Add build phase "remove-call-to-free" to let us build ant-bootstrap later. --- gnu/packages/java.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 403c446a82..cde32e451a 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -152,6 +152,17 @@ (define classpath-bootstrap "--disable-gjdoc") #:phases (modify-phases %standard-phases + ;; XXX: This introduces a memory leak as we remove a call to free up + ;; memory for the file name string. This was necessary because of a + ;; runtime error that would have prevented us from building + ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685 + ;; for the gnarly details. + (add-after 'unpack 'remove-call-to-free + (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 -- cgit v1.2.3 From 22bd735a3f060206ba42bd2542a4b82ff5e2bf6f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 7 Sep 2019 16:22:53 +0200 Subject: gnu: jamvm-1-bootstrap: Use older GCC and glibc. * gnu/packages/java.scm (jamvm-1-bootstrap)[native-inputs]: Add GCC version 5 and glibc 2.28. --- gnu/packages/java.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index cde32e451a..fee0970e74 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -202,6 +202,11 @@ (define jamvm-1-bootstrap `(("classpath" ,classpath-bootstrap) ("jikes" ,jikes) ("zlib" ,zlib))) + ;; When built with a recent GCC and glibc the configure step of icedtea-6 + ;; fails with an invalid instruction error. + (native-inputs + `(("gcc" ,gcc-5) + ("libc" ,glibc-2.28))) (home-page "http://jamvm.sourceforge.net/") (synopsis "Small Java Virtual Machine") (description "JamVM is a Java Virtual Machine conforming to the JVM -- cgit v1.2.3 From 306c1e614d617f02e9943c95a829395a2bc713fb Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 7 Sep 2019 16:23:54 +0200 Subject: gnu: icedtea-6: Patch required freetype version. * gnu/packages/java.scm (icedtea-6)[arguments]: Patch hardcoded version string for freetype version check. --- gnu/packages/java.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index fee0970e74..e2c47e417f 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -756,6 +756,9 @@ (define-public icedtea-6 (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\";") -- cgit v1.2.3 From 64ad3989d7ebe85c73d2f49ac65eebdbfbee3bf3 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 7 Sep 2019 16:25:08 +0200 Subject: gnu: icedtea-6: Remove old GCC. * gnu/packages/java.scm (icedtea-6)[native-inputs]: Remove gcc-4.9. --- gnu/packages/java.scm | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index e2c47e417f..51e738d864 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -926,7 +926,6 @@ (define-public icedtea-6 ("fastjar" ,fastjar) ("fontconfig" ,fontconfig) ("freetype" ,freetype) - ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7 ("gtk" ,gtk+-2) ("gawk" ,gawk) ("giflib" ,giflib) -- cgit v1.2.3 From 6b7e09ae6bb78c9e2d07a259d93d9b4911234f4b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 7 Sep 2019 16:25:47 +0200 Subject: gnu: icedtea-7: Patch code to enable build with newer glibc. * gnu/packages/java.scm (icedtea-7)[arguments]: Add build phase "patch-bitrot". (icedtea-8)[arguments]: Remove phase "patch-bitrot". --- gnu/packages/java.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 51e738d864..def2c8d92d 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1125,6 +1125,18 @@ (define-public icedtea-7 ((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" @@ -1604,6 +1616,7 @@ (define-public icedtea-8 (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 -- cgit v1.2.3 From 717b6ba6aa9ac876b2c2df36096e4579b19ee06c Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 17 Sep 2019 22:01:01 +1000 Subject: gnu: Add abcl. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/java.scm (abcl): New variable. * gnu/packages/patches/abcl-fix-build-xml.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/java.scm | 66 ++++++++++++++++++++++++++- gnu/packages/patches/abcl-fix-build-xml.patch | 50 ++++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/abcl-fix-build-xml.patch (limited to 'gnu/packages/java.scm') diff --git a/gnu/local.mk b/gnu/local.mk index d3e1dbc0ba..d056a2557e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -674,6 +674,7 @@ dist_patch_DATA = \ %D%/packages/patches/a2ps-CVE-2001-1593.patch \ %D%/packages/patches/a2ps-CVE-2014-0466.patch \ %D%/packages/patches/a2ps-CVE-2015-8107.patch \ + %D%/packages/patches/abcl-fix-build-xml.patch \ %D%/packages/patches/abiword-explictly-cast-bools.patch \ %D%/packages/patches/abiword-black-drawing-with-gtk322.patch \ %D%/packages/patches/acl-fix-perl-regex.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 403c446a82..6090dcd514 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Roel Janssen -;;; Copyright © 2017 Carlo Zancanaro +;;; Copyright © 2017, 2019 Carlo Zancanaro ;;; Copyright © 2017, 2018 Julien Lepiller ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2016, 2017, 2018 Alex Vong @@ -11109,3 +11109,67 @@ (define-public java-jgit-4.2 `(("java-javaewah" ,java-javaewah) ("java-jsch" ,java-jsch) ("java-slf4j-api" ,java-slf4j-api))))) + +(define-public abcl + (package + (name "abcl") + (version "1.5.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://abcl.org/releases/" + version "/abcl-src-" version ".tar.gz")) + (sha256 + (base32 + "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj")) + (patches + (search-patches + "abcl-fix-build-xml.patch")))) + (build-system ant-build-system) + (native-inputs + `(("java-junit" ,java-junit))) + (arguments + `(#:build-target "abcl.jar" + #:test-target "abcl.test" + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((share (string-append (assoc-ref outputs "out") + "/share/java/")) + (bin (string-append (assoc-ref outputs "out") + "/bin/"))) + (mkdir-p share) + (install-file "dist/abcl.jar" share) + (install-file "dist/abcl-contrib.jar" share) + (mkdir-p bin) + (with-output-to-file (string-append bin "abcl") + (lambda _ + (let ((classpath (string-append + share "abcl.jar" + ":" + share "abcl-contrib.jar"))) + (display (string-append + "#!" (which "sh") "\n" + "if [[ -z $CLASSPATH ]]; then\n" + " cp=\"" classpath "\"\n" + "else\n" + " cp=\"" classpath ":$CLASSPATH\"\n" + "fi\n" + "exec " (which "java") + " -cp $cp org.armedbear.lisp.Main $@\n"))))) + (chmod (string-append bin "abcl") #o755) + #t)))))) + (home-page "https://abcl.org/") + (synopsis "Common Lisp Implementation on the JVM") + (description + "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common +Lisp language featuring both an interpreter and a compiler, running in the +JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine +in any Java application. Additionally, it can be used to implement (parts of) +the application using Java to Lisp integration APIs.") + (license (list license:gpl2+ + ;; named-readtables is released under 3 clause BSD + license:bsd-3 + ;; jfli is released under CPL 1.0 + license:cpl1.0)))) diff --git a/gnu/packages/patches/abcl-fix-build-xml.patch b/gnu/packages/patches/abcl-fix-build-xml.patch new file mode 100644 index 0000000000..dd315b4271 --- /dev/null +++ b/gnu/packages/patches/abcl-fix-build-xml.patch @@ -0,0 +1,50 @@ +ABCL's build calls the hostname command, and needs the internet to download +JUnit. Neither of these are really required, though, so we can patch them out +to make it build. + +We also remove the Implemetation-Build property that ends up in the manifest +file, because it stores information about the time of the build, which makes +it non-deterministic. + +--- a/build.xml ++++ b/build.xml +@@ -327,7 +327,7 @@ from ${abcl.home.dir} + + ++ depends="abcl.compile,abcl.stamp.version"> + + +@@ -455,11 +455,6 @@ from ${abcl.home.dir} + value="${abcl.version}-${abcl.version.src}"/> + + +- +- +- abcl.hostname: ${abcl.hostname} +- +- + + + +@@ -500,8 +495,6 @@ from ${abcl.home.dir} + value="ABCL"/> + +- + + + +@@ -1019,8 +1012,7 @@ ${basedir}/../cl-bench + + + +- ++ + + Date: Fri, 4 Oct 2019 10:35:22 +0200 Subject: gnu: jamvm-1-bootstrap: Fix segfault in bootstrap JVM. * gnu/packages/java.scm (jamvm-1-bootstrap)[arguments]: Add configure flags: --disable-int-caching, --enable-runtime-reloc-checks, and --enable-ffi. [inputs]: Add libffi. --- gnu/packages/java.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 6090dcd514..aa624b4c28 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -186,10 +186,14 @@ (define jamvm-1-bootstrap (arguments `(#:configure-flags (list (string-append "--with-classpath-install-dir=" - (assoc-ref %build-inputs "classpath"))))) + (assoc-ref %build-inputs "classpath")) + "--disable-int-caching" + "--enable-runtime-reloc-checks" + "--enable-ffi"))) (inputs `(("classpath" ,classpath-bootstrap) ("jikes" ,jikes) + ("libffi" ,libffi) ("zlib" ,zlib))) (home-page "http://jamvm.sourceforge.net/") (synopsis "Small Java Virtual Machine") -- cgit v1.2.3 From 1b6f99ea538d767099596860017e67755c1ac42f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 4 Oct 2019 10:36:29 +0200 Subject: gnu: icedtea-7: Fix build on i686-linux. * gnu/packages/java.scm (icedtea-7)[arguments]: Use "i386" lib directory when the system is "i686-linux". --- gnu/packages/java.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index aa624b4c28..3b7404973a 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1376,7 +1376,12 @@ (define-public icedtea-7 (add-after 'install 'install-libjvm (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((lib-path (string-append (assoc-ref outputs "out") - "/lib/amd64"))) + "/lib/" + ,(match (%current-system) + ("i686-linux" + "i386") + ("x86_64-linux" + "amd64"))))) (symlink (string-append lib-path "/server/libjvm.so") (string-append lib-path "/libjvm.so"))) #t)) -- cgit v1.2.3 From d3e22bcc1141cd33dde7017f51058f18d428917c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 7 Oct 2019 09:50:51 +0200 Subject: gnu: icedtea-7: Support non-Intel systems. This is a followup to 1b6f99ea538d767099596860017e67755c1ac42f. * gnu/packages/java.scm (icedtea-7)[arguments]: In 'install-libjvm' phase, match armhf and aarch64. [supported-systems]: New field. --- gnu/packages/java.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 3b7404973a..452180eead 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1377,11 +1377,17 @@ (define-public icedtea-7 (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((lib-path (string-append (assoc-ref outputs "out") "/lib/" + ;; See 'INSTALL_ARCH_DIR' in + ;; 'configure'. ,(match (%current-system) ("i686-linux" "i386") ("x86_64-linux" - "amd64"))))) + "amd64") + ("armhf-linux" + "arm") + ("aarch64-linux" + "aarch64"))))) (symlink (string-append lib-path "/server/libjvm.so") (string-append lib-path "/libjvm.so"))) #t)) @@ -1529,6 +1535,10 @@ (define (import-cert cert) (description "This package provides the Java development kit OpenJDK built with the IcedTea build harness.") + + ;; 'configure' lists "mips" and "mipsel", but not "mips64el'. + (supported-systems (delete "mips64el-linux" %supported-systems)) + ;; IcedTea is released under the GPL2 + Classpath exception, which is the ;; same license as both GNU Classpath and OpenJDK. (license license:gpl2+)))) -- cgit v1.2.3 From 048d21a8733f4173705ed59a22a03caddb876fe1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 7 Oct 2019 10:38:22 +0200 Subject: gnu: icedtea-7: Avoid massive rebuild. Reported by Efraim Flashner. * gnu/packages/java.scm (icedtea-7)[arguments]: Change 'lib-path' definition in 'install-libjvm' to avoid the rebuilds that commit 1b6f99ea538d767099596860017e67755c1ac42f would otherwise entail. --- gnu/packages/java.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 452180eead..1f5e39d9c6 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1376,18 +1376,17 @@ (define-public icedtea-7 (add-after 'install 'install-libjvm (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((lib-path (string-append (assoc-ref outputs "out") - "/lib/" ;; See 'INSTALL_ARCH_DIR' in ;; 'configure'. ,(match (%current-system) ("i686-linux" - "i386") + "/lib/i386") ("x86_64-linux" - "amd64") + "/lib/amd64") ("armhf-linux" - "arm") + "/lib/arm") ("aarch64-linux" - "aarch64"))))) + "/lib/aarch64"))))) (symlink (string-append lib-path "/server/libjvm.so") (string-append lib-path "/libjvm.so"))) #t)) -- cgit v1.2.3