GNU bug report logs - #36685
ant-bootstrap fails on core-updates (409 dependents)

Previous Next

Package: guix;

Reported by: Chris Marusich <cmmarusich <at> gmail.com>

Date: Tue, 16 Jul 2019 06:59:01 UTC

Severity: important

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36685 in the body.
You can then email your comments to 36685 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Tue, 16 Jul 2019 06:59:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chris Marusich <cmmarusich <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 16 Jul 2019 06:59:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: ant-bootstrap fails on core-updates (409 dependents)
Date: Mon, 15 Jul 2019 23:58:28 -0700
[Message part 1 (text/plain, inline)]
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)'
...
Issued 1 semantic warning compiling "src/main/org/apache/tools/ant/filters/FixCrLfFilter.java":

                        <---------
   665.                 case '\r':
   . . .
   684.                     }
        -------------------->
*** Semantic Warning: This switch block can fall through to the next case. Did you forget a break statement?

Issued 1 semantic warning compiling "src/main/org/apache/tools/ant/taskdefs/Zip.java":

  1555.             Vector resources = new Vector();
                           ^-------^
*** Semantic Warning: Local "resources" shadows a field of the same name in "org.apache.tools.ant.taskdefs.Zip".

Issued 1 semantic warning compiling "src/main/org/apache/tools/ant/taskdefs/Get.java":

   633.             URLConnection connection = aSource.openConnection();
                                  ^--------^
*** Semantic Warning: Local "connection" shadows a field of the same name in "org.apache.tools.ant.taskdefs.Get$GetThread".

Issued 1 semantic warning compiling "src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java":

    34.     public static final String COMPILER_NAME = "xnew";
                                       ^-----------^
*** Semantic Warning: Field "COMPILER_NAME" shadows a field of the same name in "org.apache.tools.ant.taskdefs.rmic.ForkingSunRmic".
... Copying Required Files
... Building Ant Distribution
Buildfile: /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml

BUILD FAILED
Could not load the version information.

Total time: 0 seconds
... Failed Building Ant Distribution !
command "bash" "bootstrap.sh" "-Ddist.dir=/gnu/store/jd6jm79d0r5g59d0l2l3w445adykp5p9-ant-bootstrap-1.8.4" failed with status 1
builder for `/gnu/store/76apf0hpcdabpjy0839nhkwgfrz3m8z5-ant-bootstrap-1.8.4.drv' failed with exit code 1
build of /gnu/store/76apf0hpcdabpjy0839nhkwgfrz3m8z5-ant-bootstrap-1.8.4.drv failed
View build log at '/var/log/guix/drvs/76/apf0hpcdabpjy0839nhkwgfrz3m8z5-ant-bootstrap-1.8.4.drv.bz2'.
guix build: error: build of `/gnu/store/76apf0hpcdabpjy0839nhkwgfrz3m8z5-ant-bootstrap-1.8.4.drv' failed
--8<---------------cut here---------------end--------------->8---

It fails quite quickly, so you can easily get a copy failing locally if
you want to test it out.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Tue, 16 Jul 2019 07:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 36685 <at> debbugs.gnu.org
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Tue, 16 Jul 2019 09:03:44 +0200
[Message part 1 (text/plain, inline)]
Hi,

Chris Marusich <cmmarusich <at> gmail.com> ezt írta (időpont: 2019. júl. 16., Ke
8:59):

> 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)'
> ...
> Issued 1 semantic warning compiling
> "src/main/org/apache/tools/ant/filters/FixCrLfFilter.java":
>
>                         <---------
>    665.                 case '\r':
>    . . .
>    684.                     }
>         -------------------->
> *** Semantic Warning: This switch block can fall through to the next case.
> Did you forget a break statement?
>
> Issued 1 semantic warning compiling
> "src/main/org/apache/tools/ant/taskdefs/Zip.java":
>
>   1555.             Vector resources = new Vector();
>                            ^-------^
> *** Semantic Warning: Local "resources" shadows a field of the same name
> in "org.apache.tools.ant.taskdefs.Zip".
>
> Issued 1 semantic warning compiling
> "src/main/org/apache/tools/ant/taskdefs/Get.java":
>
>    633.             URLConnection connection = aSource.openConnection();
>                                   ^--------^
> *** Semantic Warning: Local "connection" shadows a field of the same name
> in "org.apache.tools.ant.taskdefs.Get$GetThread".
>
> Issued 1 semantic warning compiling
> "src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java":
>
>     34.     public static final String COMPILER_NAME = "xnew";
>                                        ^-----------^
> *** Semantic Warning: Field "COMPILER_NAME" shadows a field of the same
> name in "org.apache.tools.ant.taskdefs.rmic.ForkingSunRmic".
> ... Copying Required Files
> ... Building Ant Distribution
> Buildfile:
> /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml
>
> BUILD FAILED
> Could not load the version information.
>
> Total time: 0 seconds
> ... Failed Building Ant Distribution !
> command "bash" "bootstrap.sh"
> "-Ddist.dir=/gnu/store/jd6jm79d0r5g59d0l2l3w445adykp5p9-ant-bootstrap-1.8.4"
> failed with status 1
> builder for
> `/gnu/store/76apf0hpcdabpjy0839nhkwgfrz3m8z5-ant-bootstrap-1.8.4.drv'
> failed with exit code 1
> build of
> /gnu/store/76apf0hpcdabpjy0839nhkwgfrz3m8z5-ant-bootstrap-1.8.4.drv failed
> View build log at
> '/var/log/guix/drvs/76/apf0hpcdabpjy0839nhkwgfrz3m8z5-ant-bootstrap-1.8.4.drv.bz2'.
> guix build: error: build of
> `/gnu/store/76apf0hpcdabpjy0839nhkwgfrz3m8z5-ant-bootstrap-1.8.4.drv' failed
> --8<---------------cut here---------------end--------------->8---
>
> It fails quite quickly, so you can easily get a copy failing locally if
> you want to test it out.
>
Thanks for the report.
I will have a look at this soon.

>
> --
> Chris
>
Best regards,
g_bor

>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Tue, 16 Jul 2019 08:09:02 GMT) Full text and rfc822 format available.

Message #11 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 36685 <at> debbugs.gnu.org
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Tue, 16 Jul 2019 11:08:16 +0300
[Message part 1 (text/plain, inline)]
Building with gcc-5 didn't make it suddenly start working, before anyone
goes down that path.


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Tue, 16 Jul 2019 16:14:02 GMT) Full text and rfc822 format available.

Message #14 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: cmmarusich <at> gmail.com
Cc: 36685 <at> debbugs.gnu.org
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Tue, 16 Jul 2019 18:13:38 +0200
Chris Marusich <cmmarusich <at> gmail.com> 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)'
[…]
> BUILD FAILED
> Could not load the version information.

This error means that it couldn’t find the version.txt file.  This is
strange because it’s right there in src/main, but not in build/classes.
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 <javac ...> tags in build.xml
              (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
@@ -260,6 +262,17 @@ JNI.")
                       `((string-append m "-Xnocompact "))
                       `((string-append m "-Xnocompact -Xnoinlining ")))))

+             (substitute* "src/main/org/apache/tools/ant/version.txt"
+               (("VERSION=.*") (string-append "VERSION=" ,version "\n"))
+               (("DATE=.*") "DATE=reproducible"))
+
+             ;; XXX: Copying the source files appears to be necessary because
+             ;; ant won't find the XML and txt resources in src/main for some
+             ;; 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 tests.
              (substitute* "build.xml"
--8<---------------cut here---------------end--------------->8---

It’s 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’t seem to help.  Yes, the bootstrap script no longer
aborts but it gets stuck compiling things.  I can’t get it to tell me
anything about the compilation progress, but strace shows me that it
keeps stat’ing 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’s
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
that creates them, which is used by Jikes.java.  We should see if
there’s a race somewhere or if perhaps “jikes” crashes and thus gets
executed over and over again.

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Wed, 17 Jul 2019 08:10:01 GMT) Full text and rfc822 format available.

Message #17 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: cmmarusich <at> gmail.com
Cc: 36685 <at> debbugs.gnu.org
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Wed, 17 Jul 2019 10:09:39 +0200
[Message part 1 (text/plain, inline)]
Ricardo Wurmus <rekado <at> elephly.net> writes:

> However, this doesn’t seem to help.  Yes, the bootstrap script no longer
> aborts but it gets stuck compiling things.  I can’t get it to tell me
> anything about the compilation progress, but strace shows me that it
> keeps stat’ing 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’s
> src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
> that creates them, which is used by Jikes.java.  We should see if
> there’s a race somewhere or if perhaps “jikes” crashes and thus gets
> executed over and over again.

The problem appears to be in GNU Classpath (classpath-bootstrap).  Its
“native/jni/java-io/java_io_VMFile.c” defines
“Java_java_io_VMFile_exists”, which returns “1” when a file exists.  It
does so by calling “cpio_isFileExists” which is defined in
“native/jni/native-lib/cpio.c”:

--8<---------------cut here---------------start------------->8---
int cpio_isFileExists (const char *filename)
{
  struct stat statbuf;

  if (stat(filename, &statbuf) < 0)
    {
      return errno;
    }

  return 0;
}
--8<---------------cut here---------------end--------------->8---

I have confirmed with printf debugging that there’s a mismatch between
what the Java side thinks and what the C side tells it.  On the C side
the temporary file is determined to not exist yet, but on the Java side
it is said to exist — this is in spite of the fact that the Java side
only converts the C side’s return value.

Here’s an example from the printf output:

    exists? /tmp/files16bfd145b82_1 : 2 -- 0;
    classpath trying to create: /tmp/files16bfd145b82_1 exists? true

The first line is from C, the 2 is ENOENT, and 0 is the return value.
The zero is taken to be a Java boolean, so it maps to false.  The second
line comes from Java.

It hangs in “while (VMFile.exists(file.path))”:

--8<---------------cut here---------------start------------->8---
    File file;
    if (!VMFile.IS_DOS_8_3)
      {
        do
          {
            long now = System.currentTimeMillis();
            if (now > last_tmp)
              {
                // The last temporary file was created more than 1 ms ago.
                last_tmp = now;
                n_created = 0;
              }
            else
              n_created++;

            String name = Long.toHexString(now);
            if (n_created > 0)
              name += '_'+Integer.toHexString(n_created);
            String filename = prefix + name + suffix;
            file = new File(directory, filename);
          }
        while (VMFile.exists(file.path));
      }
    else …
--8<---------------cut here---------------end--------------->8---

I have confirmed that this is the problem by replacing “while
(VMFile.exists(file.path))” with “while (false)”.  The build doesn’t
fully complete then either, but it gets past the compilation of the Ant
source files.  This clears JamVM and Jikes.

I’m attaching my embarrassing printf debugging patches.

Any ideas?

--
Ricardo

[printf.diff (text/x-patch, inline)]
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 403c446a82..0245b299f8 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -116,6 +116,8 @@
                (base32
                 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
     (build-system gnu-build-system)
+    (native-inputs
+     `(("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,13 +154,43 @@ 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/native-lib/cpio.c"
+               (("\\(stat\\(filename, &statbuf\\) < 0\\)")
+                "(stat(filename, &statbuf) != 0)"))
+             (substitute* "native/jni/java-io/java_io_VMFile.c"
+               (("return result == CPNATIVE_OK \\? 1 : 0;")
+                "return ((result == CPNATIVE_OK) ? 1 : 0);")
+               (("result = cpio_isFileExists.*" m)
+                (string-append m "\nfprintf(stderr, \"exists? %s : %d -- %d;\\n\", filename, result, ((result == CPNATIVE_OK) ? 1 : 0));")))
+             (substitute* "java/io/File.java"
+               (("String filename = ") "filename =")
+               (("File file;" m)
+                (string-append m "\nString filename;"))
+
+               ;; (("while \\(VMFile.exists\\(file.path\\)\\)")
+               ;;  "while (false)")
+               (("while \\(VMFile.exists\\(file.path\\)\\)")
+                "while (VMFile.exists(directory.path + \"/\" + filename))")
+               (("// Grab the system" m)
+                (string-append "System.err.println(\"classpath called createTempFile: prefix \" + prefix + \" suffix \" + suffix + \" directory \" + directory.path );\n"
+                               m))
+               (("// Verify that we" m)
+                (string-append "System.err.println(\"classpath after loop with: \" + prefix);\n
+file = new File(directory, filename);"
+                               m))
+               (("file = new File.*" m)
+                (string-append m "\nSystem.err.println(\"classpath trying to create: \" + file.path + \" exists? \" + String.valueOf(VMFile.exists(file.path)));\n")))
+             #t))
          (add-after 'install 'install-data
            (lambda _ (invoke "make" "install-data"))))))
     (native-inputs
      `(("jikes" ,jikes)
        ("fastjar" ,fastjar)
        ("libltdl" ,libltdl)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ("gcc" ,gcc-5)))
     (home-page "https://www.gnu.org/software/classpath/")
     (synopsis "Essential libraries for Java")
     (description "GNU Classpath is a project to create core class libraries
@@ -191,6 +223,8 @@ language.")
      `(("classpath" ,classpath-bootstrap)
        ("jikes" ,jikes)
        ("zlib" ,zlib)))
+    (native-inputs
+     `(("gcc-5" ,gcc-5)))
     (home-page "http://jamvm.sourceforge.net/")
     (synopsis "Small Java Virtual Machine")
     (description "JamVM is a Java Virtual Machine conforming to the JVM
@@ -225,7 +259,6 @@ JNI.")
        #:tests? #f ; no "check" target
        #:phases
        (modify-phases %standard-phases
-         (delete 'bootstrap)
          (delete 'configure)
          (replace 'build
            (lambda* (#:key inputs #:allow-other-keys)
@@ -244,9 +277,12 @@ 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 <javac ...> tags in build.xml
-             (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
+             (setenv "ANT_OPTS"
+                     "-Dbuild.compiler=jikes -Djava.io.tmpdir=/tmp")
 
              ;; jikes produces lots of warnings, but they are not very
              ;; interesting, so we silence them.
@@ -254,15 +290,49 @@ JNI.")
 
              ;; Without these JamVM options the build may freeze.
              (substitute* "bootstrap.sh"
+               ;;(("-emacs") "-debug")
                (("^\"\\$\\{JAVACMD\\}\" " m)
                 ,@(if (string-prefix? "armhf" (or (%current-system)
                                                   (%current-target-system)))
                       `((string-append m "-Xnocompact "))
                       `((string-append m "-Xnocompact -Xnoinlining ")))))
 
+             (substitute* "src/main/org/apache/tools/ant/version.txt"
+               (("VERSION=.*") (string-append "VERSION=" ,version "\n"))
+               (("DATE=.*") "DATE=reproducible"))
+
+             ;; XXX: Copying the source files appears to be necessary because
+             ;; ant won't find the XML and txt resources in src/main for some
+             ;; 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 "
+cp -ar {src/main,build/classes}/org/apache/tools/ant/version.txt
+cp -ar {src/main,build/classes}/org/apache/tools/ant/antlib.xml
+")))
+             (substitute* "src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java"
+               (("tmpFile = FILE_UTILS.createTempFile" m)
+                (string-append "attributes.log(\"REKADO createTempFile\", Project.MSG_WARN);"
+                               m))
+               (("out = new.*" m)
+                (string-append m
+                               "\nattributes.log(\"REKADO created\", Project.MSG_WARN);"))
+               (("exe.execute\\(\\)" m)
+                (string-append "attributes.log(\"REKADO executing\", Project.MSG_WARN);"
+                               m)))
+
+             (substitute* "src/main/org/apache/tools/ant/util/FileUtils.java"
+               (("result = File.*" m)
+                (string-append "System.err.println(\"Trying to create \" + prefix);\n"
+                               m
+                               "\nSystem.err.println(\"Created file \" + result);")))
+             
              ;; Disable tests because we are bootstrapping and thus don't have
              ;; any of the dependencies required to build and run the tests.
              (substitute* "build.xml"
+               ;; (("includeantruntime=\"false\"")
+               ;;  (string-append "includeantruntime=\"true\" createMissingPackageInfoClass=\"false\" fork=\"true\""))
                (("depends=\"jars,test-jar\"") "depends=\"jars\""))
              (invoke "bash" "bootstrap.sh"
                      (string-append "-Ddist.dir="

Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Wed, 17 Jul 2019 22:43:02 GMT) Full text and rfc822 format available.

Message #20 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: cmmarusich <at> gmail.com
Cc: 36685 <at> debbugs.gnu.org
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Thu, 18 Jul 2019 00:41:56 +0200
[Message part 1 (text/plain, inline)]
Ricardo Wurmus <rekado <at> elephly.net> writes:

> I have confirmed that this is the problem by replacing “while
> (VMFile.exists(file.path))” with “while (false)”.  The build doesn’t
> fully complete then either, but it gets past the compilation of the Ant
> source files.  This clears JamVM and Jikes.

It doesn’t.

VMFile.exists always returns “true”, 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:

[printf.diff (text/x-patch, inline)]
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.
[Message part 3 (text/plain, inline)]
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’t know yet.

The changes in ant-bootstrap might not be needed.

Can someone confirm that this patch helps?

--
Ricardo

Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Thu, 18 Jul 2019 10:52:02 GMT) Full text and rfc822 format available.

Message #23 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: cmmarusich <at> gmail.com
Cc: guix-devel <at> gnu.org, 36685 <at> debbugs.gnu.org
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Thu, 18 Jul 2019 12:51:23 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

> Ricardo Wurmus <rekado <at> elephly.net> writes:
>
>> I have confirmed that this is the problem by replacing “while
>> (VMFile.exists(file.path))” with “while (false)”.  The build doesn’t
>> fully complete then either, but it gets past the compilation of the Ant
>> source files.  This clears JamVM and Jikes.
>
> It doesn’t.
>
> VMFile.exists always returns “true”, 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: […]

Here’s a shorter patch:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 403c446a82..bd98784232 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -152,6 +152,13 @@ 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 "
+//Without a long comment the Java side will return \"true\" on x86_64 all the time.")))
+             #t))
          (add-after 'install 'install-data
            (lambda _ (invoke "make" "install-data"))))))
     (native-inputs
--8<---------------cut here---------------end--------------->8---

This only adds a comment.  If the comment is too short it won’t work.

I suspected some misguided optimizations, so I built jamvm-1-bootstrap
and classpath-bootstrap with -O0, -O1, and I disabled stripping of
binaries, but to no avail.

Any ideas?

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Fri, 19 Jul 2019 08:10:01 GMT) Full text and rfc822 format available.

Message #26 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: cmmarusich <at> gmail.com
Cc: guix-devel <at> gnu.org, 36685 <at> debbugs.gnu.org
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Fri, 19 Jul 2019 10:09:06 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:
> Here’s a shorter patch:
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 403c446a82..bd98784232 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -152,6 +152,13 @@ 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 "
> +//Without a long comment the Java side will return \"true\" on x86_64 all the time.")))
> +             #t))
>           (add-after 'install 'install-data
>             (lambda _ (invoke "make" "install-data"))))))
>      (native-inputs
> --8<---------------cut here---------------end--------------->8---
>
> This only adds a comment.  If the comment is too short it won’t work.

No, that’s wrong.

To my eternal embarrassement but also great relief this substitution has
the effect of commenting the *following* line which frees up previously
claimed resources (a bunch of characters making up the file name).  The
other comments I tested must have ended on \n, so they did not have this
effect.

Thanks to Julien for pointing this out!

So!  Creating a memory leak lets us successfully build ant-bootstrap.
It does not, however, get us all the way through the Java bootstrap.
When configuring the first icedtea I get this error:

--8<---------------cut here---------------start------------->8---
checking if the VM and compiler work together... ./configure: line 9614:   697 Illegal instruction     $JAVA -classpath . $BYTECODE 1>&5 2>&1
configure: error: VM failed to run compiled class.
command "/gnu/store/h9c5g3inn5zmkixk08m27zzpj58zbfgy-bash-minimal-5.0.7/bin/bash" "./configure" "CONFIG_SHELL=/gnu/store/h9c5g3inn5zmkixk08m27zzpj58zbfgy-bash-minimal-5.0.7/bin/bash" "SHELL=/gnu/store/h9c5g3inn5zmkixk08m27zzpj58zbfgy-bash-minimal-5.0.7/bin/bash" "--prefix=/gnu/store/802356lxpjkqk66kv35mdzxhvaw6rghp-icedtea-1.13.13" "--enable-fast-install" "--docdir=/gnu/store/d4c4w9bka2bnnrwrmph1ilgjss5i37h9-icedtea-1.13.13-doc/share/doc/icedtea" "--build=x86_64-unknown-linux-gnu" "--enable-bootstrap" "--enable-nss" "--without-rhino" "--with-parallel-jobs" "--disable-downloading" "--disable-tests" "--with-ecj=/gnu/store/6dijv9ynn5j2bya86dgjn8v0qfd1nv3j-ecj-bootstrap-3.2.2/share/java/ecj-bootstrap.jar" "--with-jar=/gnu/store/hw67b3w83cc2abbgrf0wqzra07iiz3a1-fastjar-0.98/bin/fastjar" "--with-jdk-home=/gnu/store/1agbz95p2ljcvbb88w7p7jn2hnd6z3gv-classpath-0.99-1.e7c13ee0c" "--with-java=/gnu/store/ril2kk63p1grib14vl88z3aladfs33gf-jamvm-2.0.0/bin/jamvm" failed with status 1
--8<---------------cut here---------------end--------------->8---

Illegal instruction?  This uses JamVM 2.0.0 as the JVM.  I’ll try to
figure out what instruction this is and where it comes from.

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Fri, 19 Jul 2019 12:39:02 GMT) Full text and rfc822 format available.

Message #29 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Chris Marusich <cmmarusich <at> gmail.com>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Fri, 19 Jul 2019 12:37:47 +0000
[Message part 1 (text/plain, inline)]
Hello,

Ricardo Wurmus <rekado <at> elephly.net> ezt írta (időpont: 2019. júl. 19., P,
8:09):

>
> Ricardo Wurmus <rekado <at> elephly.net> writes:
> > Here’s a shorter patch:
> >
> > --8<---------------cut here---------------start------------->8---
> > diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> > index 403c446a82..bd98784232 100644
> > --- a/gnu/packages/java.scm
> > +++ b/gnu/packages/java.scm
> > @@ -152,6 +152,13 @@ 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 "
> > +//Without a long comment the Java side will return \"true\" on x86_64
> all the time.")))
> > +             #t))
> >           (add-after 'install 'install-data
> >             (lambda _ (invoke "make" "install-data"))))))
> >      (native-inputs
> > --8<---------------cut here---------------end--------------->8---
> >
> > This only adds a comment.  If the comment is too short it won’t work.
>
>
I confirm this path works.
I tested a modified version, where I took out the comment text. It also
works that way.
We might contact the classpath devs to get a proper fix, and maybe a new
release, they
were super responsive the last time.


> No, that’s wrong.
>
> To my eternal embarrassement but also great relief this substitution has
> the effect of commenting the *following* line which frees up previously
> claimed resources (a bunch of characters making up the file name).  The
> other comments I tested must have ended on \n, so they did not have this
> effect.
>
> Thanks to Julien for pointing this out!
>
> So!  Creating a memory leak lets us successfully build ant-bootstrap.
> It does not, however, get us all the way through the Java bootstrap.
> When configuring the first icedtea I get this error:
>
> --8<---------------cut here---------------start------------->8---
> checking if the VM and compiler work together... ./configure: line 9614:
>  697 Illegal instruction     $JAVA -classpath . $BYTECODE 1>&5 2>&1
> configure: error: VM failed to run compiled class.
> command
> "/gnu/store/h9c5g3inn5zmkixk08m27zzpj58zbfgy-bash-minimal-5.0.7/bin/bash"
> "./configure"
> "CONFIG_SHELL=/gnu/store/h9c5g3inn5zmkixk08m27zzpj58zbfgy-bash-minimal-5.0.7/bin/bash"
> "SHELL=/gnu/store/h9c5g3inn5zmkixk08m27zzpj58zbfgy-bash-minimal-5.0.7/bin/bash"
> "--prefix=/gnu/store/802356lxpjkqk66kv35mdzxhvaw6rghp-icedtea-1.13.13"
> "--enable-fast-install"
> "--docdir=/gnu/store/d4c4w9bka2bnnrwrmph1ilgjss5i37h9-icedtea-1.13.13-doc/share/doc/icedtea"
> "--build=x86_64-unknown-linux-gnu" "--enable-bootstrap" "--enable-nss"
> "--without-rhino" "--with-parallel-jobs" "--disable-downloading"
> "--disable-tests"
> "--with-ecj=/gnu/store/6dijv9ynn5j2bya86dgjn8v0qfd1nv3j-ecj-bootstrap-3.2.2/share/java/ecj-bootstrap.jar"
> "--with-jar=/gnu/store/hw67b3w83cc2abbgrf0wqzra07iiz3a1-fastjar-0.98/bin/fastjar"
> "--with-jdk-home=/gnu/store/1agbz95p2ljcvbb88w7p7jn2hnd6z3gv-classpath-0.99-1.e7c13ee0c"
> "--with-java=/gnu/store/ril2kk63p1grib14vl88z3aladfs33gf-jamvm-2.0.0/bin/jamvm"
> failed with status 1
> --8<---------------cut here---------------end--------------->8---
>
> Illegal instruction?  This uses JamVM 2.0.0 as the JVM.  I’ll try to
> figure out what instruction this is and where it comes from.
>

I hit the same bug now.


> --
> Ricardo
>
>
>
Best regards,
g_bor

-- 
OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Fri, 19 Jul 2019 12:57:01 GMT) Full text and rfc822 format available.

Message #32 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Chris Marusich <cmmarusich <at> gmail.com>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Fri, 19 Jul 2019 14:56:04 +0200
Hi Gábor,

> Ricardo Wurmus <rekado <at> elephly.net> ezt írta (időpont: 2019. júl. 19., P,
> 8:09):
>
>>
>> Ricardo Wurmus <rekado <at> elephly.net> writes:
>> > Here’s a shorter patch:
>> >
>> > --8<---------------cut here---------------start------------->8---
>> > diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
>> > index 403c446a82..bd98784232 100644
>> > --- a/gnu/packages/java.scm
>> > +++ b/gnu/packages/java.scm
>> > @@ -152,6 +152,13 @@ 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 "
>> > +//Without a long comment the Java side will return \"true\" on x86_64
>> all the time.")))
>> > +             #t))
>> >           (add-after 'install 'install-data
>> >             (lambda _ (invoke "make" "install-data"))))))
>> >      (native-inputs
>> > --8<---------------cut here---------------end--------------->8---
>> >
>> > This only adds a comment.  If the comment is too short it won’t work.
>>
>>
> I confirm this path works.
> I tested a modified version, where I took out the comment text. It also
> works that way.

Yes.  It’s just commenting the *following* line (i.e. removal of the
call to “free”) that fixes it.

> We might contact the classpath devs to get a proper fix, and maybe a new
> release, they
> were super responsive the last time.

I don’t think the problem is with GNU Classpath.  Classpath devs are
welcome to look at this, of course, but we are not even using the latest
version at this point in the bootstrap.

I wonder what could have caused this problem in the first place.  The
bootstrap hasn’t changed.  Using the same compiler as before doesn’t fix
it, so it’s probably not the compiler either.  So what is it?

>> Illegal instruction?  This uses JamVM 2.0.0 as the JVM.  I’ll try to
>> figure out what instruction this is and where it comes from.
>
> I hit the same bug now.

Good.  We need to figure out why – is it miscompilation?  Tuning to a
different CPU type…?

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Fri, 19 Jul 2019 16:31:02 GMT) Full text and rfc822 format available.

Message #35 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Chris Marusich <cmmarusich <at> gmail.com>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Fri, 19 Jul 2019 18:30:04 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

>>> Illegal instruction?  This uses JamVM 2.0.0 as the JVM.  I’ll try to
>>> figure out what instruction this is and where it comes from.
>>
>> I hit the same bug now.
>
> Good.  We need to figure out why – is it miscompilation?  Tuning to a
> different CPU type…?

With this patch I can get past the configure phase in icedtea:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 403c446a82..14179f85e9 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
@@ -907,7 +927,10 @@ 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-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)
--8<---------------cut here---------------end--------------->8---

The build aborts early with “ERROR: FreeType version 2.2.1 or higher is
required.”  So I added this:

  (substitute* "patches/freetypeversion.patch"
   (("REQUIRED_FREETYPE_VERSION = 2.2.1")
    "REQUIRED_FREETYPE_VERSION = 2.10.1"))

and icedtea is being built now.

We may want to check where the use of glibc-2.28 and gcc-5 is really
needed and where we can do without.

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Sat, 20 Jul 2019 08:43:02 GMT) Full text and rfc822 format available.

Message #38 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Sat, 20 Jul 2019 10:42:25 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

> The build aborts early with “ERROR: FreeType version 2.2.1 or higher is
> required.”  So I added this:
>
>   (substitute* "patches/freetypeversion.patch"
>    (("REQUIRED_FREETYPE_VERSION = 2.2.1")
>     "REQUIRED_FREETYPE_VERSION = 2.10.1"))
>
> and icedtea is being built now.

Next problem: icedtea 2 fails its configure phase:

--8<---------------cut here---------------start------------->8---
checking attr/xattr.h usability... no
checking attr/xattr.h presence... no
checking for attr/xattr.h... no
configure: error: Could not find required system headers; install the appropriate files from glibc-headers, libc6-dev and/or libattr-devel, libattr1-dev or use --disable-compile-against-syscalls if necessary.
command "/gnu/store/h9c5g3inn5zmkixk08m27zzpj58zbfgy-bash-minimal-5.0.7/bin/bash" "./configure" "CONFIG_SHELL=/gnu/store/h9c5g3inn5zmkixk08m27zzpj58zbfgy-bash-minimal-5.0.7/bin/bash" "SHELL=/gnu/store/h9c5g3inn5zmkixk08m27zzpj58zbfgy-bash-minimal-5.0.7/bin/bash" "--prefix=/gnu/store/wg3ywf88n2qd1hpc8fk39svm9ksah1l4-icedtea-2.6.13" "--enable-fast-install" "--docdir=/gnu/store/4l3xf1dmbx9494ica8cgllm6dvs3py2n-icedtea-2.6.13-doc/share/doc/icedtea" "--build=x86_64-unknown-linux-gnu" "--disable-system-pcsc" "--disable-system-sctp" "--enable-bootstrap" "--enable-nss" "--without-rhino" "--disable-downloading" "--disable-tests" "--with-openjdk-src-dir=./openjdk.src" "--with-jdk-home=/gnu/store/r4jz94v5xjxw95s0msxdxm36hlv07x64-icedtea-1.13.13-jdk" failed with status 1
builder for `/gnu/store/cda07il6lpg0j9l8blx5z8ah8d7wmjlz-icedtea-2.6.13.drv' failed with exit code 1
build of /gnu/store/cda07il6lpg0j9l8blx5z8ah8d7wmjlz-icedtea-2.6.13.drv failed
--8<---------------cut here---------------end--------------->8---

Of course the inputs include the attr package.  Any ideas?

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Sat, 20 Jul 2019 09:07:02 GMT) Full text and rfc822 format available.

Message #41 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Gábor Boskovits <boskovits <at> gmail.com>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Sat, 20 Jul 2019 11:06:12 +0200
Le Sat, 20 Jul 2019 10:42:25 +0200,
Ricardo Wurmus <rekado <at> elephly.net> a écrit :

> configure: error: Could not find required system headers; install the
> appropriate files from glibc-headers, libc6-dev and/or libattr-devel,
> libattr1-dev or use --disable-compile-against-syscalls if necessary.

Can you check the content of config.log? It should tell you what test
it runs to determine whether attr is present or not.




Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Sat, 20 Jul 2019 21:08:01 GMT) Full text and rfc822 format available.

Message #44 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Gábor Boskovits <boskovits <at> gmail.com>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Sat, 20 Jul 2019 23:07:30 +0200
Julien Lepiller <julien <at> lepiller.eu> writes:

> Le Sat, 20 Jul 2019 10:42:25 +0200,
> Ricardo Wurmus <rekado <at> elephly.net> a écrit :
>
>> configure: error: Could not find required system headers; install the
>> appropriate files from glibc-headers, libc6-dev and/or libattr-devel,
>> libattr1-dev or use --disable-compile-against-syscalls if necessary.
>
> Can you check the content of config.log? It should tell you what test
> it runs to determine whether attr is present or not.

It’s pretty straight-forward: xattr.h is no longer provided by the attr
package.  sys/xattr.h from glibc should be used instead, so I’ve patched
it.

I fixed another problem in the icedtea 2 build and moved on.  Let’s see
how far I’ll get this time.  In the meantime it would be great to reach
consensus on whether we should shrug off the patch that introduces a
memory leak in GNU Classpath 0.93 as part of the bootstrap or if we
should spend more time trying to figure out how we can avoid it.

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Sun, 21 Jul 2019 11:30:03 GMT) Full text and rfc822 format available.

Message #47 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Gábor Boskovits <boskovits <at> gmail.com>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Sun, 21 Jul 2019 13:29:10 +0200
[Message part 1 (text/plain, inline)]
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?

[java.diff (text/x-patch, inline)]
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
[Message part 3 (text/plain, inline)]
--
Ricardo

Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Sun, 21 Jul 2019 15:58:01 GMT) Full text and rfc822 format available.

Message #50 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Julien Lepiller <julien <at> lepiller.eu>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Sun, 21 Jul 2019 17:57:35 +0200
[Message part 1 (text/plain, inline)]
Hello,

Ricardo Wurmus <rekado <at> elephly.net> ezt írta (időpont: 2019. júl. 21., Vas
13:29):

> 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?
>

I will have a look at reducing the patch later today. I will report back
tomorrow morning with the results.


>
> --
> Ricardo
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Wed, 24 Jul 2019 21:08:02 GMT) Full text and rfc822 format available.

Message #53 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Julien Lepiller <julien <at> lepiller.eu>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Wed, 24 Jul 2019 23:07:18 +0200
Hi Gábor,

>> 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?
>>
>
> I will have a look at reducing the patch later today. I will report back
> tomorrow morning with the results.

Did you have any luck with this?

-- 
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Fri, 06 Sep 2019 13:41:02 GMT) Full text and rfc822 format available.

Message #56 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Julien Lepiller <julien <at> lepiller.eu>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Fri, 06 Sep 2019 15:40:00 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

>>> 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?
>>>
>>
>> I will have a look at reducing the patch later today. I will report back
>> tomorrow morning with the results.
>
> Did you have any luck with this?

We should decide soon, because core-updates is about to be merged
(finally!) – any objections to my earlier patch?

-- 
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#36685; Package guix. (Fri, 06 Sep 2019 13:42:01 GMT) Full text and rfc822 format available.

Message #59 received at 36685 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Guix-devel <guix-devel <at> gnu.org>, 36685 <at> debbugs.gnu.org,
 Julien Lepiller <julien <at> lepiller.eu>
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Fri, 6 Sep 2019 15:41:29 +0200
[Message part 1 (text/plain, inline)]
Ricardo Wurmus <rekado <at> elephly.net> ezt írta (időpont: 2019. szept. 6., Pén
15:40):

>
> Ricardo Wurmus <rekado <at> elephly.net> writes:
>
> >>> 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?
> >>>
> >>
> >> I will have a look at reducing the patch later today. I will report back
> >> tomorrow morning with the results.
> >
> > Did you have any luck with this?
>
> We should decide soon, because core-updates is about to be merged
> (finally!) – any objections to my earlier patch?
>

No objection from here.

>
> --
> Ricardo
>
g_bor

>
[Message part 2 (text/html, inline)]

Severity set to 'important' from 'normal' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Fri, 06 Sep 2019 13:53:03 GMT) Full text and rfc822 format available.

Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Sat, 07 Sep 2019 14:29:01 GMT) Full text and rfc822 format available.

Notification sent to Chris Marusich <cmmarusich <at> gmail.com>:
bug acknowledged by developer. (Sat, 07 Sep 2019 14:29:01 GMT) Full text and rfc822 format available.

Message #66 received at 36685-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: Guix-devel <guix-devel <at> gnu.org>, Julien Lepiller <julien <at> lepiller.eu>,
 36685-done <at> debbugs.gnu.org
Subject: Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents)
Date: Sat, 07 Sep 2019 16:28:37 +0200
I reduced the patch and built openjdk once more to test that it all
works.  I pushed the changes in a series of commits ending with
6b7e09ae6b to core-updates.

--
Ricardo





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 06 Oct 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.