From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH]: Add IcedTea 6 Date: Tue, 27 Jan 2015 22:55:06 +0100 Message-ID: <87386vubwl.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGE6Q-0002eP-Dx for guix-devel@gnu.org; Tue, 27 Jan 2015 16:55:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGE6M-0005Wr-GM for guix-devel@gnu.org; Tue, 27 Jan 2015 16:55:18 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGE6M-0005Wn-Cv for guix-devel@gnu.org; Tue, 27 Jan 2015 16:55:14 -0500 In-Reply-To: (Ricardo Wurmus's message of "Tue, 27 Jan 2015 16:33:04 +0100") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel Ricardo Wurmus skribis: > attached is a patch that gives us the liberated OpenJDK in the form of > IcedTea (version 6). IcedTea 6 is built with GCJ. Unfortunately, it > needs Ant, which cannot be built with GCJ, so it depends on a binary > bootstrap Ant. OK. > There are a couple of issues with this patch set that I'm aware of: > > * IcedTea 6 is built without JavaScript support as this would require > Rhino. > > * I'm not happy with replacing the unpack phase and I don't like to > refer to the OpenJDK source tarball by its full name > "openjdk-6-src-b34-20_jan_2015.tar.xz". Is there a way around this? You can just call it whatever you want in the 2nd argument to =E2=80=98copy-file=E2=80=99, no? > * The test suite has been disabled. I have been able to fix most issues > relating to the build environment (mostly hardcoded paths and > corrupted PATH variable), but even then many tests fail. One group of > tests depends on a shell wrapper around Xvfb, which is currently not > part of the xorg-server package. A considerable number of tests fails > upstream (see http://builder.classpath.org/icedtea/icedtea6/test/ for > logs). OK. I guess you did your best, we=E2=80=99re no substitute for upstream ha= ckers anyway. ;-) > * All this patching of tests is really not pretty. I'm not sure if > there's a better or more concise way to achieve this. I also don't > know which of these steps should better be implemented as snippets. > > * The patch to > openjdk/jdk/src/share/classes/java/util/CurrencyData.properties > really should be implemented upstream. > > * the make check-* targets do not return a non-zero status code upon > failure. This doesn't affect us now because tests are disabled > anyway, but using (and (zero? ...)) is just wishful thinking. > > * the synopsis tells us about IcedTea (the build harness), but actually > what we get after the build is a liberated OpenJDK. The same problem > affects the description, which probably should describe the purpose of > OpenJDK instead. Yeah, probably. > From 13490591fe7ad774e8ec95626113138d828366fb Mon Sep 17 00:00:00 2001 > From: Ricardo Wurmus > Date: Tue, 23 Dec 2014 12:32:25 +0100 > Subject: [PATCH] gnu: Add IcedTea 6 > > * gnu/packages/java.scm: New file. > * gnu-system.am (GNU_SYSTEM_MODULES): Add it. [...] > + `(;; There are many failing tests. You can add that many are known to fail upstream. [...] > + 'unpack > + (lambda* (#:key source inputs #:allow-other-keys) > + (let ((target (string-append ,name "-" ,version))) > + (and (zero? (system* "tar" "xvf" source)) > + (zero? (system* "tar" "xvjf" (assoc-ref inputs "ant-boo= tstrap"))) > + (chdir target)) > + (mkdir "openjdk") > + (with-directory-excursion "openjdk" > + (copy-file (assoc-ref inputs "openjdk6-src") > + "openjdk-6-src-b34-20_jan_2015.tar.xz") > + (system* "tar" "xvf" "openjdk-6-src-b34-20_jan_2015.tar.xz= ")))) (zero? (system* ...)) > + (substitute* "Makefile.in" > + ;; link against libgcj to avoid linker error > + (("-o native-ecj") > + "-lgcj -o native-ecj") > + ;; do not leak information about the build host > + (("DISTRIBUTION_ID=3D\"\\$\\(DIST_ID\\)\"") > + "DISTRIBUTION_ID=3D\"\\\"guix\\\"\"")) This could go to =E2=80=98snippet=E2=80=99 because it=E2=80=99s independent= of the inputs used for the build, but do whatever seems most appropriate to you in terms of structure. [...] > + ;; JDK tests > + (with-directory-excursion "openjdk/jdk/test/" > + (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" > + (("/bin/pwd") (which "pwd"))) > + (substitute* "com/sun/jdi/ShellScaffold.sh" > + (("/bin/kill") (which "kill"))) > + (substitute* "start-Xvfb.sh" > + (("/usr/bin/X11/Xvfb") (which "Xvfb")) > + (("/usr/bin/nohup") (which "nohup"))) > + (substitute* "javax/security/auth/Subject/doAs/Test.sh" > + (("/bin/rm") (which "rm"))) Maybe something coarser would work as well: (substitute* (find-files "openjdk/jdk/test" ".") (("/usr/bin/([[:graphic:]]+)" _ command) (or (which command) command)) (("/bin/([[:graphic:]]+)" _ command) (or (which command) command))) =20=20=20=20 WDYT? > + (alist-replace > + 'check > + (lambda _ > + (and (zero? (system* "make" "check-hotspot")) > + (zero? (system* "make" "check-langtools")) > + (zero? (system* "make" "check-jdk")))) Maybe add a comment that the check- targets always return zero? > + (synopsis "A harness to build OpenJDK using Free Software build tool= s") =E2=80=9CJava development kit=E2=80=9D? > + (description > + "The IcedTea project provides a harness to build the source code fr= om > +http://openjdk.java.net using Free Software build tools along with addit= ional > +features such as a Free Software plugin and web start implementation and= an > +LLVM-based JIT.") No good idea here. :-) I remember spending hours on this in my Nix days, so a big thanks, and congratulations for getting this far! Ludo=E2=80=99.