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: Thu, 18 Jul 2019 00:41:56 +0200 Message-ID: <871ryogu6j.fsf@elephly.net> References: <8736j61n57.fsf@gmail.com> <87o91ugdot.fsf@elephly.net> <87ftn5gjzw.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39712) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnsdc-0001rN-5c for bug-guix@gnu.org; Wed, 17 Jul 2019 18:43:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnsdb-0005sU-0n for bug-guix@gnu.org; Wed, 17 Jul 2019 18:43:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44318) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnsda-0005sK-Ov for bug-guix@gnu.org; Wed, 17 Jul 2019 18:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hnsda-0001yg-In for bug-guix@gnu.org; Wed, 17 Jul 2019 18:43:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87ftn5gjzw.fsf@elephly.net> 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ricardo Wurmus writes: > I have confirmed that this is the problem by replacing =E2=80=9Cwhile > (VMFile.exists(file.path))=E2=80=9D with =E2=80=9Cwhile (false)=E2=80=9D.= The build doesn=E2=80=99t > fully complete then either, but it gets past the compilation of the Ant > source files. This clears JamVM and Jikes. It doesn=E2=80=99t. VMFile.exists always returns =E2=80=9Ctrue=E2=80=9D, no matter what. The C= part is fine, but the Java part is not, so I suspected the JVM to be at fault. I managed to build ant-bootstrap successfully with this patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=printf.diff diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 403c446a82..6ebfd0ffdf 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -152,6 +152,12 @@ 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 "\nfprintf(stderr, \"exists? %s : %d -- %d;\\n\", filename, result, ((result == CPNATIVE_OK) ? 1 : 0));"))) + #t)) (add-after 'install 'install-data (lambda _ (invoke "make" "install-data")))))) (native-inputs @@ -186,10 +192,12 @@ language.") (arguments `(#:configure-flags (list (string-append "--with-classpath-install-dir=" - (assoc-ref %build-inputs "classpath"))))) + (assoc-ref %build-inputs "classpath")) + "--enable-ffi"))) (inputs `(("classpath" ,classpath-bootstrap) ("jikes" ,jikes) + ("libffi" ,libffi) ("zlib" ,zlib))) (home-page "http://jamvm.sourceforge.net/") (synopsis "Small Java Virtual Machine") @@ -258,7 +266,11 @@ JNI.") ,@(if (string-prefix? "armhf" (or (%current-system) (%current-target-system))) `((string-append m "-Xnocompact ")) - `((string-append m "-Xnocompact -Xnoinlining "))))) + `((string-append m "-Xnocompact "))))) + + (substitute* "src/main/org/apache/tools/ant/version.txt" + (("VERSION=.*") (string-append "VERSION=" ,version "\n")) + (("DATE=.*") "DATE=reproducible")) ;; Disable tests because we are bootstrapping and thus don't have ;; any of the dependencies required to build and run the tests. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Note that the change to native/jni/java-io/java_io_VMFile.c is necessary even though it just prints things and compares values. So this might be time-related or it could be other stateful behaviour. Don=E2=80=99t know y= et. The changes in ant-bootstrap might not be needed. Can someone confirm that this patch helps? -- Ricardo --=-=-=--