* bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap
@ 2021-08-10 21:38 Julien Lepiller
2021-08-30 11:51 ` Efraim Flashner
2021-09-02 22:27 ` bug#49990: [PATCH] gnu: Fix classpath-bootstrap compilation muradm
0 siblings, 2 replies; 10+ messages in thread
From: Julien Lepiller @ 2021-08-10 21:38 UTC (permalink / raw)
To: 49990
Hi Guix!
I've finally taken the time to investigate the build failure of
ant-bootstrap. It is failing after reporting a file exists:
```
/tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml:558:
Unable to create directory as a file already exists with that name:
/tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build
```
So, I set an environment variable to pass a different build directory
to ant (-Dbuild.dir=bootstrapped-build), but it fails in the same way:
```
/tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml:558:
Unable to create directory as a file already exists with that name:
/tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/bootstrapped-build
```
However, using -K, I could check the directory does not exist. After
investigating a bit, I found that File.isFile() is not working as
expected. With the following file (Test.java):
```
import java.io.File;
public class Test {
public static void main(String[] args) {
File f = new File("non-existent");
if(f.isFile())
System.out.println("yes");
else
System.out.println("no");
}
}
```
compiled in a guix environment for ant-bootstrap (I had to temporarily
export it):
```
$ ./pre-inst-env guix environment ant-bootstrap
[env]$ CLASSPATH=$GUIX_ENVIRONMENT/lib/rt.jar jikes Test.java
[env]$ java Test
no
[env]$ jamvm Test
yes
```
(java comes from outside the environment). jamvm from master is
working, and I don't see any difference in it, classpath or jikes
recipes.
After investigation, it turns out that java.io.File is actually
implemented in classpath, not jamvm, and there is a comment that refers
to another similar issue:
https://issues.guix.gnu.org/issue/36685
I tried the obvious, that is to introduce a new memory leak, but that
did not work. So, to better understand what was going on, I instead
added some printing:
```
@@ -256,7 +256,9 @@ only faster.")
(lambda _
(substitute* "native/jni/java-io/java_io_VMFile.c"
(("result = cpio_isFileExists.*" m)
- (string-append m "\n//")))
+ (string-append m "\n//"))
+ (("result = cpio_checkType.*" m)
+ (string-append m "\nfprintf(stderr, \"type? %s : %d --
%d -- %d;\\n\", filename, result, entryType, ((result == CPNATIVE_OK &&
entryType == CPFILE_FILE) ? 1 : 0));\n"))) #t)) (add-after 'install
'install-data (lambda _ (invoke "make" "install-data"))))))
```
and surprisingly, this prints the expected values, and it is enough to
get the correct answer from the java side too. With the above diff, I'm
able to build ant-bootstrap and all the dependencies of icedtea@1, with
a lot of useless debug lines... Unfortunately icedtea itself ends in a
failure after building quite a lot.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap
2021-08-10 21:38 bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Julien Lepiller
@ 2021-08-30 11:51 ` Efraim Flashner
2021-08-31 22:32 ` Ludovic Courtès
2021-09-02 22:27 ` bug#49990: [PATCH] gnu: Fix classpath-bootstrap compilation muradm
1 sibling, 1 reply; 10+ messages in thread
From: Efraim Flashner @ 2021-08-30 11:51 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 49990
[-- Attachment #1: Type: text/plain, Size: 3984 bytes --]
On Tue, Aug 10, 2021 at 11:38:01PM +0200, Julien Lepiller wrote:
> Hi Guix!
>
> I've finally taken the time to investigate the build failure of
> ant-bootstrap. It is failing after reporting a file exists:
>
I tried working around it a different way, and tried removing some lines
from build.xml but didn't make it to a built package.
Interestingly, ant-bootstrap as it currently exists in
core-updates-frozen, builds just fine on armhf, aarch64 and powerpc.
> ```
> /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml:558:
> Unable to create directory as a file already exists with that name:
> /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build
> ```
>
> So, I set an environment variable to pass a different build directory
> to ant (-Dbuild.dir=bootstrapped-build), but it fails in the same way:
>
> ```
> /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml:558:
> Unable to create directory as a file already exists with that name:
> /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/bootstrapped-build
> ```
>
> However, using -K, I could check the directory does not exist. After
> investigating a bit, I found that File.isFile() is not working as
> expected. With the following file (Test.java):
>
> ```
> import java.io.File;
> public class Test {
> public static void main(String[] args) {
> File f = new File("non-existent");
> if(f.isFile())
> System.out.println("yes");
> else
> System.out.println("no");
> }
> }
> ```
>
> compiled in a guix environment for ant-bootstrap (I had to temporarily
> export it):
>
> ```
> $ ./pre-inst-env guix environment ant-bootstrap
> [env]$ CLASSPATH=$GUIX_ENVIRONMENT/lib/rt.jar jikes Test.java
> [env]$ java Test
> no
> [env]$ jamvm Test
> yes
> ```
>
> (java comes from outside the environment). jamvm from master is
> working, and I don't see any difference in it, classpath or jikes
> recipes.
>
> After investigation, it turns out that java.io.File is actually
> implemented in classpath, not jamvm, and there is a comment that refers
> to another similar issue:
>
> https://issues.guix.gnu.org/issue/36685
>
> I tried the obvious, that is to introduce a new memory leak, but that
> did not work. So, to better understand what was going on, I instead
> added some printing:
>
> ```
> @@ -256,7 +256,9 @@ only faster.")
> (lambda _
> (substitute* "native/jni/java-io/java_io_VMFile.c"
> (("result = cpio_isFileExists.*" m)
> - (string-append m "\n//")))
> + (string-append m "\n//"))
> + (("result = cpio_checkType.*" m)
> + (string-append m "\nfprintf(stderr, \"type? %s : %d --
> %d -- %d;\\n\", filename, result, entryType, ((result == CPNATIVE_OK &&
> entryType == CPFILE_FILE) ? 1 : 0));\n"))) #t)) (add-after 'install
> 'install-data (lambda _ (invoke "make" "install-data"))))))
> ```
>
> and surprisingly, this prints the expected values, and it is enough to
> get the correct answer from the java side too. With the above diff, I'm
> able to build ant-bootstrap and all the dependencies of icedtea@1, with
> a lot of useless debug lines... Unfortunately icedtea itself ends in a
> failure after building quite a lot.
I was able to use your diff to build ant-bootstrap for x86_64. aarch64,
armhf and powerpc still build and i686 still fails.
I'm not sure why icedtea@1 didn't build for you, I was able to build it
on x86_64. The other architectures are building more slowly.
Looks to me like you should add it, with a comment like:
With the power of ... debug spam? we magically enable building on x86_64.
--
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] 10+ messages in thread
* bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap
2021-08-30 11:51 ` Efraim Flashner
@ 2021-08-31 22:32 ` Ludovic Courtès
2021-09-01 1:02 ` Julien Lepiller
0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2021-08-31 22:32 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 49990
[-- Attachment #1: Type: text/plain, Size: 2134 bytes --]
Hello!
As discussed on IRC, I had a semi-victory with the attached patch, which
works around a miscompilation issue in ‘Java_java_io_VMFile_isFile’.
Unfortunately, with this patch applied, ‘ant-bootstrap’ fails to build
with:
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build -e '(@@ (gnu packages java) ant-bootstrap)' -K
[…]
... 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 !
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "bash" arguments: ("bootstrap.sh" "-Ddist.dir=/gnu/store/88qc3rkp3bc6qsf6gmknv51vprd3r8j4-ant-bootstrap-1.8.4") exit-status: 1 term-signal: #f stop-signal: #f>
phase `build' failed after 0.8 seconds
command "bash" "bootstrap.sh" "-Ddist.dir=/gnu/store/88qc3rkp3bc6qsf6gmknv51vprd3r8j4-ant-bootstrap-1.8.4" failed with status 1
--8<---------------cut here---------------end--------------->8---
The message “Could not load the version information.” indicates a
NullPointerException in Main.java:
--8<---------------cut here---------------start------------->8---
try {
Properties props = new Properties();
InputStream in =
Main.class.getResourceAsStream("/org/apache/tools/ant/version.txt");
props.load(in);
// …
} catch (NullPointerException npe) {
throw new BuildException("Could not load the version information.");
}
--8<---------------cut here---------------end--------------->8---
Specifically, ‘in’ is null.
‘version.txt’ is looked for in
/tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build/classes/org/apache/tools/ant/version.txt
but at this point it’s still in src/ only. My understanding is that the
“build” target in ‘build.xml’ should copy it to build/classes/.
Ideas? What a wonderful puzzle we have! :-)
Thanks,
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2874 bytes --]
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 08ef7a8213..d3c95a456d 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -230,7 +230,8 @@ only faster.")
(sha256
(base32
"0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
- (patches (search-patches "classpath-aarch64-support.patch"))))
+ (patches (search-patches "classpath-aarch64-support.patch"
+ "classpath-miscompilation.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
@@ -247,17 +248,6 @@ only faster.")
"--disable-gjdoc")
#:phases
(modify-phases %standard-phases
- ;; XXX: This introduces a memory leak as we remove a call to free up
- ;; memory for the file name string. This was necessary because of a
- ;; runtime error that would have prevented us from building
- ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
- ;; for the gnarly details.
- (add-after 'unpack 'remove-call-to-free
- (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
diff --git a/gnu/packages/patches/classpath-miscompilation.patch b/gnu/packages/patches/classpath-miscompilation.patch
new file mode 100644
index 0000000000..835113df71
--- /dev/null
+++ b/gnu/packages/patches/classpath-miscompilation.patch
@@ -0,0 +1,31 @@
+For some reason, the original code gets miscompiled on x86_64, leading
+'Java_java_io_VMFile_isFile' to return true when the return value of
+'cpio_checkType' is ENOENT (= 2).
+
+See <https://issues.guix.gnu.org/issue/36685>
+and <https://issues.guix.gnu.org/49990>.
+
+diff --git a/native/jni/java-io/java_io_VMFile.c b/native/jni/java-io/java_io_VMFile.c
+index de1320b..9a5d375 100644
+--- a/native/jni/java-io/java_io_VMFile.c
++++ b/native/jni/java-io/java_io_VMFile.c
+@@ -278,6 +278,7 @@ Java_java_io_VMFile_isFile (JNIEnv * env,
+ const char *filename;
+ int result;
+ jint entryType;
++ jboolean isfile;
+
+ /* Don't use the JCL convert function because it throws an exception
+ on failure */
+@@ -288,9 +289,10 @@ Java_java_io_VMFile_isFile (JNIEnv * env,
+ }
+
+ result = cpio_checkType (filename, &entryType);
++ isfile = (result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0);
+ (*env)->ReleaseStringUTFChars (env, name, filename);
+
+- return result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0;
++ return isfile;
+ #else /* not WITHOUT_FILESYSTEM */
+ return 0;
+ #endif /* not WITHOUT_FILESYSTEM */
^ permalink raw reply related [flat|nested] 10+ messages in thread
* bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap
2021-08-31 22:32 ` Ludovic Courtès
@ 2021-09-01 1:02 ` Julien Lepiller
2021-09-01 13:53 ` Ludovic Courtès
0 siblings, 1 reply; 10+ messages in thread
From: Julien Lepiller @ 2021-09-01 1:02 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 49990
[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]
Le Wed, 01 Sep 2021 00:32:39 +0200,
Ludovic Courtès <ludo@gnu.org> a écrit :
> Hello!
>
> As discussed on IRC, I had a semi-victory with the attached patch,
> which works around a miscompilation issue in
> ‘Java_java_io_VMFile_isFile’.
another possibility I tested was to disable optimization by adding
CFLAGS=-O0 to the configure-flags. This creates an unoptimized version,
but that should be fine since it's only for the bootstrap. However, I
noticed that my debug messages from my previous attempt were still
visible when compiling icedtea. I don't know what happened, since
there is at least another classpath version before it.
>
> Unfortunately, with this patch applied, ‘ant-bootstrap’ fails to build
> with:
>
> Ideas? What a wonderful puzzle we have! :-)
Even more wonderful is the fact I do not get this error at all when
using CFLAGS=-O0, but I do with your patch. I didn't have any issue
either with my previous attempt with debugging. Could there be other
problems with optimizations in classpath?
I attached my counter-patch :)
> Thanks,
> Ludo’.
>
[-- Attachment #2: classpath.patch --]
[-- Type: text/x-patch, Size: 821 bytes --]
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 08ef7a8213..b2fddcc055 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -244,7 +244,8 @@ only faster.")
"--disable-plugin"
"--disable-dssi"
"--disable-alsa"
- "--disable-gjdoc")
+ "--disable-gjdoc"
+ "CFLAGS=-O0")
#:phases
(modify-phases %standard-phases
;; XXX: This introduces a memory leak as we remove a call to free up
@@ -333,7 +334,7 @@ other small VMs it supports the full spec, including object finalisation and
JNI.")
(license license:gpl2+)))
-(define ant-bootstrap
+(define-public ant-bootstrap
(package
(name "ant-bootstrap")
;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
^ permalink raw reply related [flat|nested] 10+ messages in thread
* bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap
2021-09-01 1:02 ` Julien Lepiller
@ 2021-09-01 13:53 ` Ludovic Courtès
2021-09-02 14:15 ` Maxime Devos
0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2021-09-01 13:53 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 49990
[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]
Hi,
Julien Lepiller <julien@lepiller.eu> skribis:
> Le Wed, 01 Sep 2021 00:32:39 +0200,
> Ludovic Courtès <ludo@gnu.org> a écrit :
>
>> Hello!
>>
>> As discussed on IRC, I had a semi-victory with the attached patch,
>> which works around a miscompilation issue in
>> ‘Java_java_io_VMFile_isFile’.
>
> another possibility I tested was to disable optimization by adding
> CFLAGS=-O0 to the configure-flags. This creates an unoptimized version,
> but that should be fine since it's only for the bootstrap. However, I
> noticed that my debug messages from my previous attempt were still
> visible when compiling icedtea. I don't know what happened, since
> there is at least another classpath version before it.
>
>>
>> Unfortunately, with this patch applied, ‘ant-bootstrap’ fails to build
>> with:
The root cause is that, even tough we’re passing “-classpath
build/classes:src”, only the first element of the classpath is
searched. If we pass “-classpath foobar:build/classes”, then Main.class
is not found. That suggests another problem with ‘stat’-related
functions.
>> Ideas? What a wonderful puzzle we have! :-)
> Even more wonderful is the fact I do not get this error at all when
> using CFLAGS=-O0, but I do with your patch. I didn't have any issue
> either with my previous attempt with debugging. Could there be other
> problems with optimizations in classpath?
Hmm -O0 is brute-force. It doesn’t work for me though if I also remove
the ‘remove-call-to-free’ phase, though.
I also tried this Classpath patch:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 392 bytes --]
diff --git a/include/jni_md.h b/include/jni_md.h
index 989dbfe..f7867d7 100644
--- a/include/jni_md.h
+++ b/include/jni_md.h
@@ -32,7 +32,7 @@ executable file might be covered by the GNU General Public License. */
#define JNIEXPORT
#define JNIIMPORT
-typedef unsigned char jboolean;
+typedef int jboolean;
typedef signed char jbyte;
typedef unsigned short jchar;
typedef short jshort;
[-- Attachment #3: Type: text/plain, Size: 103 bytes --]
It seems to have the same effect as my initial patch.
I’m lacking inspiration now!
Ludo’.
^ permalink raw reply related [flat|nested] 10+ messages in thread
* bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap
2021-09-01 13:53 ` Ludovic Courtès
@ 2021-09-02 14:15 ` Maxime Devos
2021-09-02 14:57 ` Julien Lepiller
0 siblings, 1 reply; 10+ messages in thread
From: Maxime Devos @ 2021-09-02 14:15 UTC (permalink / raw)
To: Ludovic Courtès, Julien Lepiller; +Cc: 49990
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
Ludovic Courtès schreef op wo 01-09-2021 om 15:53 [+0200]:
> Hmm -O0 is brute-force.
What about only using "-O0" for whatever C file is responsible for
Java_java_io_VMFile_isFile?
Greetings,
Maxime
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap
2021-09-02 14:15 ` Maxime Devos
@ 2021-09-02 14:57 ` Julien Lepiller
2021-09-03 10:11 ` Ludovic Courtès
0 siblings, 1 reply; 10+ messages in thread
From: Julien Lepiller @ 2021-09-02 14:57 UTC (permalink / raw)
To: Maxime Devos, Ludovic Courtès; +Cc: 49990
[-- Attachment #1: Type: text/plain, Size: 547 bytes --]
Actually, Ludo's patch works, but we should not remove the workaround for isDirectory. With the patch to isFile and the workaround in isDirectory, I can build up to (but not including) icedtea@1. Ludo's patch is nicer than using -O0 :)
Le 2 septembre 2021 10:15:41 GMT-04:00, Maxime Devos <maximedevos@telenet.be> a écrit :
>Ludovic Courtès schreef op wo 01-09-2021 om 15:53 [+0200]:
>> Hmm -O0 is brute-force.
>
>What about only using "-O0" for whatever C file is responsible for
>Java_java_io_VMFile_isFile?
>
>Greetings,
>Maxime
[-- Attachment #2: Type: text/html, Size: 943 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#49990: [PATCH] gnu: Fix classpath-bootstrap compilation
2021-08-10 21:38 bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Julien Lepiller
2021-08-30 11:51 ` Efraim Flashner
@ 2021-09-02 22:27 ` muradm
2021-09-02 22:38 ` muradm
1 sibling, 1 reply; 10+ messages in thread
From: muradm @ 2021-09-02 22:27 UTC (permalink / raw)
To: 49990
---
gnu/packages/java.scm | 3 +-
.../patches/classpath-instruction-order.patch | 35 +++++++++++++++++++
2 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/classpath-instruction-order.patch
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 08ef7a8213..1e29cac401 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -230,7 +230,8 @@ only faster.")
(sha256
(base32
"0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
- (patches (search-patches "classpath-aarch64-support.patch"))))
+ (patches (search-patches "classpath-aarch64-support.patch"
+ "classpath-instruction-order.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
diff --git a/gnu/packages/patches/classpath-instruction-order.patch b/gnu/packages/patches/classpath-instruction-order.patch
new file mode 100644
index 0000000000..278ae912c7
--- /dev/null
+++ b/gnu/packages/patches/classpath-instruction-order.patch
@@ -0,0 +1,35 @@
+diff -ruN ../classpath/classpath-0.93/native/jni/java-io/java_io_VMFile.c ./native/jni/java-io/java_io_VMFile.c
+--- ../classpath/classpath-0.93/native/jni/java-io/java_io_VMFile.c 2006-09-23 08:17:45.000000000 +0300
++++ ./native/jni/java-io/java_io_VMFile.c 2021-09-03 01:08:17.073644627 +0300
+@@ -278,6 +278,7 @@
+ const char *filename;
+ int result;
+ jint entryType;
++ int fres;
+
+ /* Don't use the JCL convert function because it throws an exception
+ on failure */
+@@ -288,9 +289,22 @@
+ }
+
+ result = cpio_checkType (filename, &entryType);
++
++ fres = 1;
++
++ if (result != CPNATIVE_OK)
++ {
++ fres = 0;
++ }
++
++ if (entryType != CPFILE_FILE)
++ {
++ fres = 0;
++ }
++
+ (*env)->ReleaseStringUTFChars (env, name, filename);
+
+- return result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0;
++ return fres;
+ #else /* not WITHOUT_FILESYSTEM */
+ return 0;
+ #endif /* not WITHOUT_FILESYSTEM */
--
2.33.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* bug#49990: [PATCH] gnu: Fix classpath-bootstrap compilation
2021-09-02 22:27 ` bug#49990: [PATCH] gnu: Fix classpath-bootstrap compilation muradm
@ 2021-09-02 22:38 ` muradm
0 siblings, 0 replies; 10+ messages in thread
From: muradm @ 2021-09-02 22:38 UTC (permalink / raw)
To: 49990
This patch fixes issue in the way that it:
a) calculates the result before call to
(*env)->ReleaseStringUTFChars
b) attempt to trick gcc optimizations by complicating path
I suppose issue is with what (*env)->ReleaseStringUTFChars does
and
how.
One should note that similar approach is not applicable to
substitute
in package definition.
Why not just build ancient code with ancient gcc?
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap
2021-09-02 14:57 ` Julien Lepiller
@ 2021-09-03 10:11 ` Ludovic Courtès
0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2021-09-03 10:11 UTC (permalink / raw)
To: Julien Lepiller; +Cc: muradm, 49990-done
Hi there!
I pushed a variant of the patch proposed earlier, adding a similar
workaround to ‘Java_java_io_VMFile_exists’ and
‘Java_java_io_VMFile_isDirectory’:
https://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates-frozen&id=7f50543d55b20cd528b28d7e15f1bb81001a8da9
With this, I can build ‘ant-bootstrap’ just fine. \o/
Next up: icedtea 1.13.13 chokes on obscure C++ issues:
--8<---------------cut here---------------start------------->8---
In file included from /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.13/openjdk-ecj/hotspot/src/share/vm/asm/assembler.hpp:29,
from /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.13/openjdk-ecj/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
/tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.13/openjdk-ecj/hotspot/src/share/vm/code/relocInfo.hpp:374:27: error: friend declaration of ‘relocInfo prefix_relocInfo(int)’ specifies default arguments and isn’t a definition [-fpermissive]
374 | inline friend relocInfo prefix_relocInfo(int datalen = 0);
| ^~~~~~~~~~~~~~~~
In file included from /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.13/openjdk-ecj/hotspot/src/share/vm/asm/assembler.hpp:29,
from /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.13/openjdk-ecj/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
/tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.13/openjdk-ecj/hotspot/src/share/vm/code/relocInfo.hpp:472:18: error: friend declaration of ‘relocInfo prefix_relocInfo(int)’ specifies default arguments and isn’t the only declaration [-fpermissive]
472 | inline relocInfo prefix_relocInfo(int datalen) {
| ^~~~~~~~~~~~~~~~
--8<---------------cut here---------------end--------------->8---
Anyway, we’re making progress!
Ludo’.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-09-03 10:12 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-10 21:38 bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Julien Lepiller
2021-08-30 11:51 ` Efraim Flashner
2021-08-31 22:32 ` Ludovic Courtès
2021-09-01 1:02 ` Julien Lepiller
2021-09-01 13:53 ` Ludovic Courtès
2021-09-02 14:15 ` Maxime Devos
2021-09-02 14:57 ` Julien Lepiller
2021-09-03 10:11 ` Ludovic Courtès
2021-09-02 22:27 ` bug#49990: [PATCH] gnu: Fix classpath-bootstrap compilation muradm
2021-09-02 22:38 ` muradm
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.