From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#36685: ant-bootstrap fails on core-updates (409 dependents) Date: Tue, 16 Jul 2019 18:13:38 +0200 Message-ID: <87o91ugdot.fsf@elephly.net> References: <8736j61n57.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:47578) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnQ5c-0000cQ-8V for bug-guix@gnu.org; Tue, 16 Jul 2019 12:14:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnQ5b-0007lZ-2b for bug-guix@gnu.org; Tue, 16 Jul 2019 12:14:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42209) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnQ5a-0007lA-LT for bug-guix@gnu.org; Tue, 16 Jul 2019 12:14:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hnQ5a-0005KD-Dw for bug-guix@gnu.org; Tue, 16 Jul 2019 12:14:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <8736j61n57.fsf@gmail.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: cmmarusich@gmail.com Cc: 36685@debbugs.gnu.org Chris Marusich writes: > Hi, > > At commit 464a29d3d74e7d2f27042db6ab166bfdbe1f992e ('git branch --all > --contains 464a29d3d74e7d2f27042db6ab166bfdbe1f992e' tells me that only > core-updates has this commit at this time), the following error occurs > when trying to build ant-bootstrap, which causes the 409 dependent > packages to fail, also: > > --8<---------------cut here---------------start------------->8--- > $ guix build -e '(@@ (gnu packages java) ant-bootstrap)' [=E2=80=A6] > BUILD FAILED > Could not load the version information. This error means that it couldn=E2=80=99t find the version.txt file. This = is strange because it=E2=80=99s right there in src/main, but not in build/clas= ses. So I thought I could just fix this by copying files from src/main to build/classes and the bootstrap build does in fact begin: --8<---------------cut here---------------start------------->8--- diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 403c446a82..0ec582d10a 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -244,6 +244,8 @@ JNI.") (setenv "HOME" "/tmp") (with-output-to-file "/tmp/.ant.properties" (lambda _ (display ""))) + (with-output-to-file ".ant.properties" + (lambda _ (display ""))) ;; Use jikes instead of javac for tags in build.x= ml (setenv "ANT_OPTS" "-Dbuild.compiler=3Djikes") @@ -260,6 +262,17 @@ JNI.") `((string-append m "-Xnocompact ")) `((string-append m "-Xnocompact -Xnoinlining "))))) + (substitute* "src/main/org/apache/tools/ant/version.txt" + (("VERSION=3D.*") (string-append "VERSION=3D" ,version "\n"= )) + (("DATE=3D.*") "DATE=3Dreproducible")) + + ;; XXX: Copying the source files appears to be necessary beca= use + ;; ant won't find the XML and txt resources in src/main for s= ome + ;; reason. It really shouldn't be needed, so maybe this can = be + ;; avoided by setting some environment variable. + (substitute* "bootstrap.sh" + (("cp src/script/antRun bin" m) + (string-append m "\ncp -ar src/main/* build/classes/"))) ;; Disable tests because we are bootstrapping and thus don't = have ;; any of the dependencies required to build and run the test= s. (substitute* "build.xml" --8<---------------cut here---------------end--------------->8--- It=E2=80=99s possible we could get away with just adding these lines: cp {src/main,build/classes}/org/apache/tools/ant/antlib.xml cp {src/main,build/classes}/org/apache/tools/ant/version.txt However, this doesn=E2=80=99t seem to help. Yes, the bootstrap script no l= onger aborts but it gets stuck compiling things. I can=E2=80=99t get it to tell = me anything about the compilation progress, but strace shows me that it keeps stat=E2=80=99ing for non-existent files like "/tmp/files16bfb86414e_b" until the end of the day. Judging by the name of the file I think this is ant=E2=80=99s src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java that creates them, which is used by Jikes.java. We should see if there=E2=80=99s a race somewhere or if perhaps =E2=80=9Cjikes=E2=80=9D cras= hes and thus gets executed over and over again. -- Ricardo