GNU bug report logs - #50567
[core-updates-frozen] icedtea-6 fails to build.

Previous Next

Package: guix;

Reported by: Guillaume Le Vaillant <glv <at> posteo.net>

Date: Mon, 13 Sep 2021 13:13:01 UTC

Severity: normal

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

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

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

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


Report forwarded to bug-guix <at> gnu.org:
bug#50567; Package guix. (Mon, 13 Sep 2021 13:13:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillaume Le Vaillant <glv <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 13 Sep 2021 13:13:01 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: bug-guix <at> gnu.org
Subject: [core-updates-frozen] icedtea-6 fails to build.
Date: Mon, 13 Sep 2021 13:01:55 +0000
[Message part 1 (text/plain, inline)]
I'm trying to get icedtea-6 to build on the core-updates-frozen branch.
I fixed a few C/C++ related issues, but then I get this error:

--8<---------------cut here---------------start------------->8---
Preload failed: checksum of class list was incorrect.
make: *** [Makefile:2746: stamps/add-archive-ecj.stamp] Error 1
--8<---------------cut here---------------end--------------->8---

Does someone know how to solve that?

Here's the patch I'm using to get to this point:
[0001-WIP-gnu-icedtea-6-Fix-build.patch (text/x-patch, inline)]
From 6767793eccffea3bfddca5c4a0c0cff21abb965b Mon Sep 17 00:00:00 2001
From: Guillaume Le Vaillant <glv <at> posteo.net>
Date: Mon, 13 Sep 2021 14:37:40 +0200
Subject: [PATCH] WIP: gnu: icedtea-6: Fix build.

* gnu/packages/java.scm (icedtea-6)[arguments]: Add 'fix-openjdk' phase.
---
 gnu/packages/java.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 51fc5c60a1..374a9d9cba 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Vincent Legoll <vincent.legoll <at> gmail.com>
 ;;; Copyright © 2021 Mike Gerwitz <mtg <at> gnu.org>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -907,6 +908,19 @@ machine.")))
                             "patches/hotspot/hs23/drop_unlicensed_test.patch")
                (("#!/bin/sh") (string-append "#!" (which "sh"))))
              #t))
+         (add-after 'unpack 'fix-openjdk
+           (lambda _
+             (substitute* "openjdk/jdk/make/common/Defs-linux.gmk"
+               (("CFLAGS_COMMON  = -fno-strict-aliasing" all)
+                (string-append all " -fcommon")))
+             (substitute* "openjdk/hotspot/src/share/vm/code/relocInfo.hpp"
+               (("inline friend relocInfo prefix_relocInfo\\(int datalen = 0\\);")
+                "inline friend relocInfo prefix_relocInfo(int datalen);"))
+             (substitute*
+                 '("openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
+                   "openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
+               (("#include <sys/sysctl.h>")
+                "#include <linux/sysctl.h>"))))
          (add-after 'unpack 'patch-paths
            (lambda* (#:key inputs #:allow-other-keys)
              ;; buildtree.make generates shell scripts, so we need to replace
-- 
2.33.0

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

Information forwarded to bug-guix <at> gnu.org:
bug#50567; Package guix. (Tue, 14 Sep 2021 08:45:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 50567 <at> debbugs.gnu.org, Julien Lepiller <julien <at> lepiller.eu>
Subject: Re: bug#50567: [core-updates-frozen] icedtea-6 fails to build.
Date: Tue, 14 Sep 2021 10:44:18 +0200
Hi Guillaume,

Guillaume Le Vaillant <glv <at> posteo.net> skribis:

> I'm trying to get icedtea-6 to build on the core-updates-frozen branch.
> I fixed a few C/C++ related issues,

Thanks for fixing those!  After <https://issues.guix.gnu.org/49990#10>
Julien mentioned on IRC that using an older GCC allowed us to work
around those C++ issues, but your approach looks nicer to me.

> but then I get this error:
>
> Preload failed: checksum of class list was incorrect.
> make: *** [Makefile:2746: stamps/add-archive-ecj.stamp] Error 1

Woow, never seen that.  Julien, Ricardo, does that ring a bell?

Java is the main stumbling block on core-updates-frozen; making
progress!

Thanks,
Ludo’.




Reply sent to Guillaume Le Vaillant <glv <at> posteo.net>:
You have taken responsibility. (Tue, 14 Sep 2021 16:30:02 GMT) Full text and rfc822 format available.

Notification sent to Guillaume Le Vaillant <glv <at> posteo.net>:
bug acknowledged by developer. (Tue, 14 Sep 2021 16:30:03 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 50567-done <at> debbugs.gnu.org, Julien Lepiller <julien <at> lepiller.eu>
Subject: Re: bug#50567: [core-updates-frozen] icedtea-6 fails to build.
Date: Tue, 14 Sep 2021 16:25:26 +0000
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> skribis:

> Hi Guillaume,
>
> Guillaume Le Vaillant <glv <at> posteo.net> skribis:
>
>> I'm trying to get icedtea-6 to build on the core-updates-frozen branch.
>> I fixed a few C/C++ related issues,
>
> Thanks for fixing those!  After <https://issues.guix.gnu.org/49990#10>
> Julien mentioned on IRC that using an older GCC allowed us to work
> around those C++ issues, but your approach looks nicer to me.
>
>> but then I get this error:
>>
>> Preload failed: checksum of class list was incorrect.
>> make: *** [Makefile:2746: stamps/add-archive-ecj.stamp] Error 1
>
> Woow, never seen that.  Julien, Ricardo, does that ring a bell?
>
> Java is the main stumbling block on core-updates-frozen; making
> progress!
>
> Thanks,
> Ludo’.

It looks like the checksum failure is caused by the miscompilation of
a multiplication in the function computing the checksum.
I added a workaround to the other fixes in
f8cff361245cc0c546211ff51100cbaf869d15eb, which makes the build succeed.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#50567; Package guix. (Wed, 15 Sep 2021 18:18:02 GMT) Full text and rfc822 format available.

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

From: Julien Lepiller <julien <at> lepiller.eu>
To: bug-guix <at> gnu.org, Guillaume Le Vaillant <glv <at> posteo.net>,
 50567 <at> debbugs.gnu.org
Subject: Re: bug#50567: [core-updates-frozen] icedtea-6 fails to build.
Date: Mon, 13 Sep 2021 10:32:43 -0400
[Message part 1 (text/plain, inline)]
I had the same issue on my previous attempt. It seems that using gcc-7 as an input fixes the issue (although when I tried, I had other fixes like yours too). Our gcc on core-updates seems to be too aggressive with this old code base.

Le 13 septembre 2021 09:01:55 GMT-04:00, Guillaume Le Vaillant <glv <at> posteo.net> a écrit :
>I'm trying to get icedtea-6 to build on the core-updates-frozen branch.
>I fixed a few C/C++ related issues, but then I get this error:
>
>--8<---------------cut here---------------start------------->8---
>Preload failed: checksum of class list was incorrect.
>make: *** [Makefile:2746: stamps/add-archive-ecj.stamp] Error 1
>--8<---------------cut here---------------end--------------->8---
>
>Does someone know how to solve that?
>
>Here's the patch I'm using to get to this point:
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#50567; Package guix. (Wed, 15 Sep 2021 18:18:02 GMT) Full text and rfc822 format available.

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

From: Julien Lepiller <julien <at> lepiller.eu>
To: Ludovic Courtès <ludo <at> gnu.org>,
 Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 50567 <at> debbugs.gnu.org
Subject: Re: bug#50567: [core-updates-frozen] icedtea-6 fails to build.
Date: Tue, 14 Sep 2021 07:37:53 -0400
[Message part 1 (text/plain, inline)]
Again this is exactly where I was blocked. There is a checksum being generated in classlist files from java code during the build. The classlist file is exactly the same as the one in master, so it's correctly generated. Fowever, at some point, the process needs toqload that file, and that ultimately calls some C code (identical to the java code) that re-computes and compares the checksum. After printing some values, it seems that it always computes "0…031" as the hash of any classlist file, despite running the function and taking everything into account. I think this is again an optimization issue, anl it's not clear how to work around that.

Le 14 septembre 2021 04:44:18 GMT-04:00, "Ludovic Courtès" <ludo <at> gnu.org> a écrit :
>Hi Guillaume,
>
>Guillaume Le Vaillant <glv <at> posteo.net> skribis:
>
>> I'm trying to get icedtea-6 to build on the core-updates-frozen branch.
>> I fixed a few C/C++ related issues,
>
>Thanks for fixing those!  After <https://issues.guix.gnu.org/49990#10>
>Julien mentioned on IRC that using an older GCC allowed us to work
>around those C++ issues, but your approach looks nicer to me.
>
>> but then I get this error:
>>
>> Preload failed: checksum of class list was incorrect.
>> make: *** [Makefile:2746: stamps/add-archive-ecj.stamp] Error 1
>
>Woow, never seen that.  Julien, Ricardo, does that ring a bell?
>
>Java is the main stumbling block on core-updates-frozen; making
>progress!
>
>Thanks,
>Ludo’.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#50567; Package guix. (Wed, 15 Sep 2021 18:18:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#50567; Package guix. (Wed, 15 Sep 2021 20:12:01 GMT) Full text and rfc822 format available.

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

From: Julien Lepiller <julien <at> lepiller.eu>
To: bug-guix <at> gnu.org, Ludovic Courtès <ludo <at> gnu.org>,
 Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 50567 <at> debbugs.gnu.org
Subject: Re: bug#50567: [core-updates-frozen] icedtea-6 fails to build.
Date: Wed, 15 Sep 2021 16:11:36 -0400
[Message part 1 (text/plain, inline)]
Sorry for the possible confusion. These replies stacked up in my client and I didn't notice until they were sent just now. Please disregard :)

Le 14 septembre 2021 07:37:53 GMT-04:00, Julien Lepiller <julien <at> lepiller.eu> a écrit :
>Again this is exactly where I was blocked. There is a checksum being generated in classlist files from java code during the build. The classlist file is exactly the same as the one in master, so it's correctly generated. Fowever, at some point, the process needs toqload that file, and that ultimately calls some C code (identical to the java code) that re-computes and compares the checksum. After printing some values, it seems that it always computes "0…031" as the hash of any classlist file, despite running the function and taking everything into account. I think this is again an optimization issue, anl it's not clear how to work around that.
>
>Le 14 septembre 2021 04:44:18 GMT-04:00, "Ludovic Courtès" <ludo <at> gnu.org> a écrit :
>>Hi Guillaume,
>>
>>Guillaume Le Vaillant <glv <at> posteo.net> skribis:
>>
>>> I'm trying to get icedtea-6 to build on the core-updates-frozen branch.
>>> I fixed a few C/C++ related issues,
>>
>>Thanks for fixing those!  After <https://issues.guix.gnu.org/49990#10>
>>Julien mentioned on IRC that using an older GCC allowed us to work
>>around those C++ issues, but your approach looks nicer to me.
>>
>>> but then I get this error:
>>>
>>> Preload failed: checksum of class list was incorrect.
>>> make: *** [Makefile:2746: stamps/add-archive-ecj.stamp] Error 1
>>
>>Woow, never seen that.  Julien, Ricardo, does that ring a bell?
>>
>>Java is the main stumbling block on core-updates-frozen; making
>>progress!
>>
>>Thanks,
>>Ludo’.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#50567; Package guix. (Wed, 15 Sep 2021 20:12:02 GMT) Full text and rfc822 format available.

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

bug unarchived. Request was from Marius Bakke <marius <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 13 Sep 2022 13:28:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#50567; Package guix. (Tue, 13 Sep 2022 13:50:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <marius <at> gnu.org>
To: Julien Lepiller <julien <at> lepiller.eu>, Ludovic Courtès
 <ludo <at> gnu.org>, Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 50567 <at> debbugs.gnu.org
Subject: Re: bug#50567: [core-updates-frozen] icedtea-6 fails to build.
Date: Tue, 13 Sep 2022 15:49:47 +0200
[Message part 1 (text/plain, inline)]
Julien Lepiller <julien <at> lepiller.eu> skriver:

> Again this is exactly where I was blocked. There is a checksum being generated in classlist files from java code during the build. The classlist file is exactly the same as the one in master, so it's correctly generated. Fowever, at some point, the process needs toqload that file, and that ultimately calls some C code (identical to the java code) that re-computes and compares the checksum. After printing some values, it seems that it always computes "0…031" as the hash of any classlist file, despite running the function and taking everything into account. I think this is again an optimization issue, anl it's not clear how to work around that.

For the record, this showed up again after switching to GCC 11.  I ended
up disabling optimizations for dump.cpp in 321e866b1cea4916e3568efb
instead of trying to fool the compiler.

Probably it would be better to figure out exactly which optimization
causes this problem, but that's a journey for a different time.
[signature.asc (application/pgp-signature, inline)]

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

This bug report was last modified 1 year and 196 days ago.

Previous Next


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