* bug#36685: ant-bootstrap fails on core-updates (409 dependents) @ 2019-07-16 6:58 Chris Marusich 2019-07-16 7:03 ` Gábor Boskovits ` (2 more replies) 0 siblings, 3 replies; 35+ messages in thread From: Chris Marusich @ 2019-07-16 6:58 UTC (permalink / raw) To: 36685 [-- Attachment #1: Type: text/plain, Size: 2764 bytes --] 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-16 6:58 bug#36685: ant-bootstrap fails on core-updates (409 dependents) Chris Marusich @ 2019-07-16 7:03 ` Gábor Boskovits 2019-07-16 8:08 ` Efraim Flashner 2019-07-16 16:13 ` Ricardo Wurmus 2 siblings, 0 replies; 35+ messages in thread From: Gábor Boskovits @ 2019-07-16 7:03 UTC (permalink / raw) To: Chris Marusich; +Cc: 36685 [-- Attachment #1: Type: text/plain, Size: 3104 bytes --] Hi, Chris Marusich <cmmarusich@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 > [-- Attachment #2: Type: text/html, Size: 4225 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-16 6:58 bug#36685: ant-bootstrap fails on core-updates (409 dependents) Chris Marusich 2019-07-16 7:03 ` Gábor Boskovits @ 2019-07-16 8:08 ` Efraim Flashner 2019-07-16 16:13 ` Ricardo Wurmus 2 siblings, 0 replies; 35+ messages in thread From: Efraim Flashner @ 2019-07-16 8:08 UTC (permalink / raw) To: Chris Marusich; +Cc: 36685 [-- Attachment #1: Type: text/plain, Size: 311 bytes --] Building with gcc-5 didn't make it suddenly start working, before anyone goes down that path. -- Efraim Flashner <efraim@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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-16 6:58 bug#36685: ant-bootstrap fails on core-updates (409 dependents) Chris Marusich 2019-07-16 7:03 ` Gábor Boskovits 2019-07-16 8:08 ` Efraim Flashner @ 2019-07-16 16:13 ` Ricardo Wurmus 2019-07-17 8:09 ` Ricardo Wurmus 2 siblings, 1 reply; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-16 16:13 UTC (permalink / raw) To: cmmarusich; +Cc: 36685 Chris Marusich <cmmarusich@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 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-16 16:13 ` Ricardo Wurmus @ 2019-07-17 8:09 ` Ricardo Wurmus 2019-07-17 22:41 ` Ricardo Wurmus 0 siblings, 1 reply; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-17 8:09 UTC (permalink / raw) To: cmmarusich; +Cc: 36685 [-- Attachment #1: Type: text/plain, Size: 3240 bytes --] Ricardo Wurmus <rekado@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 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: printf.diff --] [-- Type: text/x-patch, Size: 6928 bytes --] 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=" ^ permalink raw reply related [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-17 8:09 ` Ricardo Wurmus @ 2019-07-17 22:41 ` Ricardo Wurmus 2019-07-18 10:51 ` Ricardo Wurmus 2019-07-18 10:51 ` Ricardo Wurmus 0 siblings, 2 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-17 22:41 UTC (permalink / raw) To: cmmarusich; +Cc: 36685 [-- Attachment #1: Type: text/plain, Size: 550 bytes --] Ricardo Wurmus <rekado@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: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: printf.diff --] [-- Type: text/x-patch, Size: 2053 bytes --] 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. [-- Attachment #3: Type: text/plain, Size: 338 bytes --] 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 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-17 22:41 ` Ricardo Wurmus @ 2019-07-18 10:51 ` Ricardo Wurmus 2019-07-18 11:09 ` Efraim Flashner ` (2 more replies) 2019-07-18 10:51 ` Ricardo Wurmus 1 sibling, 3 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-18 10:51 UTC (permalink / raw) To: cmmarusich; +Cc: guix-devel, 36685 Ricardo Wurmus <rekado@elephly.net> writes: > Ricardo Wurmus <rekado@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 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-18 10:51 ` Ricardo Wurmus @ 2019-07-18 11:09 ` Efraim Flashner 2019-07-21 17:44 ` Ricardo Wurmus 2019-07-19 8:09 ` Ricardo Wurmus 2019-07-19 8:09 ` Ricardo Wurmus 2 siblings, 1 reply; 35+ messages in thread From: Efraim Flashner @ 2019-07-18 11:09 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 747 bytes --] On Thu, Jul 18, 2019 at 12:51:23PM +0200, Ricardo Wurmus wrote: > > 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 > currently on bayfront on core-updates ant-bootstrap builds just fine on i686-linux, where it fails on master. Another option could be to bootstrap 32 bit -> 64 bit -- Efraim Flashner <efraim@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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-18 11:09 ` Efraim Flashner @ 2019-07-21 17:44 ` Ricardo Wurmus 0 siblings, 0 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-21 17:44 UTC (permalink / raw) To: Efraim Flashner; +Cc: guix-devel Efraim Flashner <efraim@flashner.co.il> writes: > currently on bayfront on core-updates ant-bootstrap builds just fine on > i686-linux, where it fails on master. Another option could be to > bootstrap 32 bit -> 64 bit This would be possible, but I consider it a last resort and would very much like to avoid having to cross-build things. -- Ricardo ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-18 10:51 ` Ricardo Wurmus 2019-07-18 11:09 ` Efraim Flashner @ 2019-07-19 8:09 ` Ricardo Wurmus 2019-07-19 8:09 ` Ricardo Wurmus 2 siblings, 0 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-19 8:09 UTC (permalink / raw) To: cmmarusich; +Cc: guix-devel, 36685 Ricardo Wurmus <rekado@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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-18 10:51 ` Ricardo Wurmus 2019-07-18 11:09 ` Efraim Flashner 2019-07-19 8:09 ` Ricardo Wurmus @ 2019-07-19 8:09 ` Ricardo Wurmus 2019-07-19 12:37 ` Gábor Boskovits 2019-07-19 12:37 ` Gábor Boskovits 2 siblings, 2 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-19 8:09 UTC (permalink / raw) To: cmmarusich; +Cc: guix-devel, 36685 Ricardo Wurmus <rekado@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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-19 8:09 ` Ricardo Wurmus @ 2019-07-19 12:37 ` Gábor Boskovits 2019-07-19 12:56 ` Ricardo Wurmus 2019-07-19 12:56 ` Ricardo Wurmus 2019-07-19 12:37 ` Gábor Boskovits 1 sibling, 2 replies; 35+ messages in thread From: Gábor Boskovits @ 2019-07-19 12:37 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Guix-devel, 36685 [-- Attachment #1: Type: text/plain, Size: 3799 bytes --] Hello, Ricardo Wurmus <rekado@elephly.net> ezt írta (időpont: 2019. júl. 19., P, 8:09): > > Ricardo Wurmus <rekado@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 [-- Attachment #2: Type: text/html, Size: 5147 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-19 12:37 ` Gábor Boskovits @ 2019-07-19 12:56 ` Ricardo Wurmus 2019-07-19 12:56 ` Ricardo Wurmus 1 sibling, 0 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-19 12:56 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685 Hi Gábor, > Ricardo Wurmus <rekado@elephly.net> ezt írta (időpont: 2019. júl. 19., P, > 8:09): > >> >> Ricardo Wurmus <rekado@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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-19 12:37 ` Gábor Boskovits 2019-07-19 12:56 ` Ricardo Wurmus @ 2019-07-19 12:56 ` Ricardo Wurmus 2019-07-19 16:30 ` Ricardo Wurmus 1 sibling, 1 reply; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-19 12:56 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685 Hi Gábor, > Ricardo Wurmus <rekado@elephly.net> ezt írta (időpont: 2019. júl. 19., P, > 8:09): > >> >> Ricardo Wurmus <rekado@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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-19 12:56 ` Ricardo Wurmus @ 2019-07-19 16:30 ` Ricardo Wurmus 2019-07-20 8:42 ` Ricardo Wurmus 0 siblings, 1 reply; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-19 16:30 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685 Ricardo Wurmus <rekado@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 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-19 16:30 ` Ricardo Wurmus @ 2019-07-20 8:42 ` Ricardo Wurmus 2019-07-20 9:06 ` Julien Lepiller 2019-07-20 9:06 ` Julien Lepiller 0 siblings, 2 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-20 8:42 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685 Ricardo Wurmus <rekado@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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-20 8:42 ` Ricardo Wurmus @ 2019-07-20 9:06 ` Julien Lepiller 2019-07-20 21:07 ` Ricardo Wurmus 2019-07-20 21:07 ` Ricardo Wurmus 2019-07-20 9:06 ` Julien Lepiller 1 sibling, 2 replies; 35+ messages in thread From: Julien Lepiller @ 2019-07-20 9:06 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Guix-devel, 36685 Le Sat, 20 Jul 2019 10:42:25 +0200, Ricardo Wurmus <rekado@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. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-20 9:06 ` Julien Lepiller @ 2019-07-20 21:07 ` Ricardo Wurmus 2019-07-20 21:07 ` Ricardo Wurmus 1 sibling, 0 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-20 21:07 UTC (permalink / raw) To: Julien Lepiller; +Cc: Guix-devel, 36685 Julien Lepiller <julien@lepiller.eu> writes: > Le Sat, 20 Jul 2019 10:42:25 +0200, > Ricardo Wurmus <rekado@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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-20 9:06 ` Julien Lepiller 2019-07-20 21:07 ` Ricardo Wurmus @ 2019-07-20 21:07 ` Ricardo Wurmus 2019-07-21 11:29 ` Ricardo Wurmus 2019-07-21 11:29 ` Ricardo Wurmus 1 sibling, 2 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-20 21:07 UTC (permalink / raw) To: Julien Lepiller; +Cc: Guix-devel, 36685 Julien Lepiller <julien@lepiller.eu> writes: > Le Sat, 20 Jul 2019 10:42:25 +0200, > Ricardo Wurmus <rekado@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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-20 21:07 ` Ricardo Wurmus @ 2019-07-21 11:29 ` Ricardo Wurmus 2019-07-21 15:57 ` Gábor Boskovits 2019-07-21 15:57 ` Gábor Boskovits 2019-07-21 11:29 ` Ricardo Wurmus 1 sibling, 2 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-21 11:29 UTC (permalink / raw) To: Julien Lepiller; +Cc: Guix-devel, 36685 [-- Attachment #1: Type: text/plain, Size: 257 bytes --] 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? [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: java.diff --] [-- Type: text/x-patch, Size: 5143 bytes --] 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 [-- Attachment #3: Type: text/plain, Size: 12 bytes --] -- Ricardo ^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-21 11:29 ` Ricardo Wurmus @ 2019-07-21 15:57 ` Gábor Boskovits 2019-07-24 21:07 ` Ricardo Wurmus 2019-07-24 21:07 ` Ricardo Wurmus 2019-07-21 15:57 ` Gábor Boskovits 1 sibling, 2 replies; 35+ messages in thread From: Gábor Boskovits @ 2019-07-21 15:57 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Guix-devel, 36685 [-- Attachment #1: Type: text/plain, Size: 515 bytes --] Hello, Ricardo Wurmus <rekado@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 > [-- Attachment #2: Type: text/html, Size: 1040 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-21 15:57 ` Gábor Boskovits @ 2019-07-24 21:07 ` Ricardo Wurmus 2019-07-24 21:07 ` Ricardo Wurmus 1 sibling, 0 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-24 21:07 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685 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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-21 15:57 ` Gábor Boskovits 2019-07-24 21:07 ` Ricardo Wurmus @ 2019-07-24 21:07 ` Ricardo Wurmus 2019-09-06 13:40 ` Ricardo Wurmus 2019-09-06 13:40 ` Ricardo Wurmus 1 sibling, 2 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-24 21:07 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685 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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-24 21:07 ` Ricardo Wurmus @ 2019-09-06 13:40 ` Ricardo Wurmus 2019-09-06 13:40 ` Ricardo Wurmus 1 sibling, 0 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-09-06 13:40 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685 Ricardo Wurmus <rekado@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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-24 21:07 ` Ricardo Wurmus 2019-09-06 13:40 ` Ricardo Wurmus @ 2019-09-06 13:40 ` Ricardo Wurmus 2019-09-06 13:41 ` Gábor Boskovits ` (3 more replies) 1 sibling, 4 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-09-06 13:40 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685 Ricardo Wurmus <rekado@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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-09-06 13:40 ` Ricardo Wurmus @ 2019-09-06 13:41 ` Gábor Boskovits 2019-09-06 13:41 ` Gábor Boskovits ` (2 subsequent siblings) 3 siblings, 0 replies; 35+ messages in thread From: Gábor Boskovits @ 2019-09-06 13:41 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Guix-devel, 36685 [-- Attachment #1: Type: text/plain, Size: 810 bytes --] Ricardo Wurmus <rekado@elephly.net> ezt írta (időpont: 2019. szept. 6., Pén 15:40): > > Ricardo Wurmus <rekado@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 > [-- Attachment #2: Type: text/html, Size: 1684 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-09-06 13:40 ` Ricardo Wurmus 2019-09-06 13:41 ` Gábor Boskovits @ 2019-09-06 13:41 ` Gábor Boskovits 2019-09-07 14:28 ` Ricardo Wurmus 2019-09-07 14:28 ` Ricardo Wurmus 3 siblings, 0 replies; 35+ messages in thread From: Gábor Boskovits @ 2019-09-06 13:41 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Guix-devel, 36685 [-- Attachment #1: Type: text/plain, Size: 810 bytes --] Ricardo Wurmus <rekado@elephly.net> ezt írta (időpont: 2019. szept. 6., Pén 15:40): > > Ricardo Wurmus <rekado@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 > [-- Attachment #2: Type: text/html, Size: 1684 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-09-06 13:40 ` Ricardo Wurmus 2019-09-06 13:41 ` Gábor Boskovits 2019-09-06 13:41 ` Gábor Boskovits @ 2019-09-07 14:28 ` Ricardo Wurmus 2019-09-07 15:01 ` Julien Lepiller 2019-09-07 14:28 ` Ricardo Wurmus 3 siblings, 1 reply; 35+ messages in thread From: Ricardo Wurmus @ 2019-09-07 14:28 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685-done 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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-09-07 14:28 ` Ricardo Wurmus @ 2019-09-07 15:01 ` Julien Lepiller 0 siblings, 0 replies; 35+ messages in thread From: Julien Lepiller @ 2019-09-07 15:01 UTC (permalink / raw) To: Ricardo Wurmus, Gábor Boskovits; +Cc: Guix-devel Le 7 septembre 2019 16:28:37 GMT+02:00, Ricardo Wurmus <rekado@elephly.net> a écrit : > >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 Chank you for all that work! ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-09-06 13:40 ` Ricardo Wurmus ` (2 preceding siblings ...) 2019-09-07 14:28 ` Ricardo Wurmus @ 2019-09-07 14:28 ` Ricardo Wurmus 3 siblings, 0 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-09-07 14:28 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Guix-devel, 36685-done 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 ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-21 11:29 ` Ricardo Wurmus 2019-07-21 15:57 ` Gábor Boskovits @ 2019-07-21 15:57 ` Gábor Boskovits 1 sibling, 0 replies; 35+ messages in thread From: Gábor Boskovits @ 2019-07-21 15:57 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Guix-devel, 36685 [-- Attachment #1: Type: text/plain, Size: 515 bytes --] Hello, Ricardo Wurmus <rekado@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 > [-- Attachment #2: Type: text/html, Size: 1040 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-20 21:07 ` Ricardo Wurmus 2019-07-21 11:29 ` Ricardo Wurmus @ 2019-07-21 11:29 ` Ricardo Wurmus 1 sibling, 0 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-21 11:29 UTC (permalink / raw) To: Julien Lepiller; +Cc: Guix-devel, 36685 [-- Attachment #1: Type: text/plain, Size: 257 bytes --] 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? [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: java.diff --] [-- Type: text/x-patch, Size: 5143 bytes --] 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 [-- Attachment #3: Type: text/plain, Size: 12 bytes --] -- Ricardo ^ permalink raw reply related [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-20 8:42 ` Ricardo Wurmus 2019-07-20 9:06 ` Julien Lepiller @ 2019-07-20 9:06 ` Julien Lepiller 1 sibling, 0 replies; 35+ messages in thread From: Julien Lepiller @ 2019-07-20 9:06 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Guix-devel, 36685 Le Sat, 20 Jul 2019 10:42:25 +0200, Ricardo Wurmus <rekado@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. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-19 8:09 ` Ricardo Wurmus 2019-07-19 12:37 ` Gábor Boskovits @ 2019-07-19 12:37 ` Gábor Boskovits 1 sibling, 0 replies; 35+ messages in thread From: Gábor Boskovits @ 2019-07-19 12:37 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Guix-devel, 36685 [-- Attachment #1: Type: text/plain, Size: 3799 bytes --] Hello, Ricardo Wurmus <rekado@elephly.net> ezt írta (időpont: 2019. júl. 19., P, 8:09): > > Ricardo Wurmus <rekado@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 [-- Attachment #2: Type: text/html, Size: 5147 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#36685: ant-bootstrap fails on core-updates (409 dependents) 2019-07-17 22:41 ` Ricardo Wurmus 2019-07-18 10:51 ` Ricardo Wurmus @ 2019-07-18 10:51 ` Ricardo Wurmus 1 sibling, 0 replies; 35+ messages in thread From: Ricardo Wurmus @ 2019-07-18 10:51 UTC (permalink / raw) To: cmmarusich; +Cc: guix-devel, 36685 Ricardo Wurmus <rekado@elephly.net> writes: > Ricardo Wurmus <rekado@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 ^ permalink raw reply related [flat|nested] 35+ messages in thread
end of thread, other threads:[~2019-09-07 15:01 UTC | newest] Thread overview: 35+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-07-16 6:58 bug#36685: ant-bootstrap fails on core-updates (409 dependents) Chris Marusich 2019-07-16 7:03 ` Gábor Boskovits 2019-07-16 8:08 ` Efraim Flashner 2019-07-16 16:13 ` Ricardo Wurmus 2019-07-17 8:09 ` Ricardo Wurmus 2019-07-17 22:41 ` Ricardo Wurmus 2019-07-18 10:51 ` Ricardo Wurmus 2019-07-18 11:09 ` Efraim Flashner 2019-07-21 17:44 ` Ricardo Wurmus 2019-07-19 8:09 ` Ricardo Wurmus 2019-07-19 8:09 ` Ricardo Wurmus 2019-07-19 12:37 ` Gábor Boskovits 2019-07-19 12:56 ` Ricardo Wurmus 2019-07-19 12:56 ` Ricardo Wurmus 2019-07-19 16:30 ` Ricardo Wurmus 2019-07-20 8:42 ` Ricardo Wurmus 2019-07-20 9:06 ` Julien Lepiller 2019-07-20 21:07 ` Ricardo Wurmus 2019-07-20 21:07 ` Ricardo Wurmus 2019-07-21 11:29 ` Ricardo Wurmus 2019-07-21 15:57 ` Gábor Boskovits 2019-07-24 21:07 ` Ricardo Wurmus 2019-07-24 21:07 ` Ricardo Wurmus 2019-09-06 13:40 ` Ricardo Wurmus 2019-09-06 13:40 ` Ricardo Wurmus 2019-09-06 13:41 ` Gábor Boskovits 2019-09-06 13:41 ` Gábor Boskovits 2019-09-07 14:28 ` Ricardo Wurmus 2019-09-07 15:01 ` Julien Lepiller 2019-09-07 14:28 ` Ricardo Wurmus 2019-07-21 15:57 ` Gábor Boskovits 2019-07-21 11:29 ` Ricardo Wurmus 2019-07-20 9:06 ` Julien Lepiller 2019-07-19 12:37 ` Gábor Boskovits 2019-07-18 10:51 ` Ricardo Wurmus
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.