GNU bug report logs - #74216
[science team] flint build failure

Previous Next

Package: guix;

Reported by: Greg Hogan <code <at> greghogan.com>

Date: Tue, 5 Nov 2024 20:44:01 UTC

Severity: normal

Done: Greg Hogan <code <at> greghogan.com>

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 74216 in the body.
You can then email your comments to 74216 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#74216; Package guix. (Tue, 05 Nov 2024 20:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Greg Hogan <code <at> greghogan.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 05 Nov 2024 20:44:02 GMT) Full text and rfc822 format available.

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

From: Greg Hogan <code <at> greghogan.com>
To: bug-guix <at> gnu.org
Cc: Andreas Enge <andreas <at> enge.fr>, Sharlatan Hellseher <sharlatanus <at> gmail.com>,
 bavier <at> posteo.net
Subject: [science team] flint build failure
Date: Tue, 5 Nov 2024 15:43:31 -0500
[Message part 1 (text/plain, inline)]
flint fails to build for me with the following error unless I include
as an input a newer gcc version.

Greg

--8<---------------cut here---------------start------------->8---
  CC  fmpz_poly_q/add.c
In file included from src/fft_small/mpn_mul.c:17:
src/fft_small/mpn_mul.c: In function ‘_mpn_from_ffts_8’:
./src/crt_helpers.h:120:3: error: ‘asm’ operand has impossible constraints
  120 |   __asm__ ("addq %23,%q7\nadcq %21,%q6\nadcq %19,%q5\n\tadcq
%17,%q4\n\tadcq %15,%q3\n\tadcq %13,%q2\n\tadcq %11,%q1\n\tadcq
%9,%q0"    \
      |   ^~~~~~~
./src/crt_helpers.h:378:5: note: in expansion of macro
‘add_ssssssssaaaaaaaaaaaaaaaa’
  378 |     add_ssssssssaaaaaaaaaaaaaaaa(z[7],z[6],z[5],z[4],z[3],z[2],z[1],z[0],
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/crt_helpers.h:120:3: error: ‘asm’ operand has impossible constraints
  120 |   __asm__ ("addq %23,%q7\nadcq %21,%q6\nadcq %19,%q5\n\tadcq
%17,%q4\n\tadcq %15,%q3\n\tadcq %13,%q2\n\tadcq %11,%q1\n\tadcq
%9,%q0"    \
      |   ^~~~~~~
./src/crt_helpers.h:378:5: note: in expansion of macro
‘add_ssssssssaaaaaaaaaaaaaaaa’
  378 |     add_ssssssssaaaaaaaaaaaaaaaa(z[7],z[6],z[5],z[4],z[3],z[2],z[1],z[0],
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
--8<---------------cut here---------------end--------------->8---
[diy9z2pwhjn6g5friaxcq32jpdx36b-flint-3.1.2.drv.gz (application/gzip, attachment)]

Information forwarded to andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, bug-guix <at> gnu.org:
bug#74216; Package guix. (Tue, 05 Nov 2024 20:49:01 GMT) Full text and rfc822 format available.

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

From: Greg Hogan <code <at> greghogan.com>
To: 74216 <at> debbugs.gnu.org
Cc: Greg Hogan <code <at> greghogan.com>
Subject: [PATCH science-team] gnu: flint: Update gcc version.
Date: Tue,  5 Nov 2024 20:47:28 +0000
* gnu/packages/algebra.scm (flint)[inputs]: Add gcc-14.

Change-Id: Ie9d20d5d0740770591016922d2d2a3aa54c57069
---
 gnu/packages/algebra.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 2187cd062d..b782605771 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -458,7 +458,7 @@ (define-public flint
        (base32 "0017bjncpx4kdx67qcnm3nahz3gyyi2w3ggkrx586r3llcqs9czx"))))
    (build-system gnu-build-system)
    (inputs
-    (list ntl))
+    (list gcc-14 ntl))
    (propagated-inputs
     (list gmp mpfr)) ; header files included by flint.h or mpfr_mat.h
    (arguments

base-commit: 6e50b0c56a8cc767bd3acb26638f78c450bde718
-- 
2.46.0





Information forwarded to bug-guix <at> gnu.org:
bug#74216; Package guix. (Tue, 12 Nov 2024 14:02:02 GMT) Full text and rfc822 format available.

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

From: Andreas Enge <andreas <at> enge.fr>
To: Greg Hogan <code <at> greghogan.com>
Cc: bavier <at> posteo.net, Sharlatan Hellseher <sharlatanus <at> gmail.com>,
 74216 <at> debbugs.gnu.org
Subject: Re: [science team] flint build failure
Date: Tue, 12 Nov 2024 15:01:00 +0100
Hello Greg,

Am Tue, Nov 05, 2024 at 03:43:31PM -0500 schrieb Greg Hogan:
> flint fails to build for me with the following error unless I include
> as an input a newer gcc version.

out of curiosity, what is your exact build architecture and processor
line? The package builds without problems on my rather old laptop, and
on the Guix build farms.

I have asked someone who knows the flint code well, and they said it
means that gcc has trouble realising how to expand the assembly code
into load and stores and computation on machines with less than 8
registers. Apparently it is a combination of compiler versions and
processor specifics.

Apart from that, I think we can apply your patch without worries, but
I am just curious about what is happening.

What is mildly worrying is that we already use the "--disable-assembly"
configure flag; this could be a bug in the flint configuration.

Andreas





Reply sent to Greg Hogan <code <at> greghogan.com>:
You have taken responsibility. (Tue, 12 Nov 2024 19:21:02 GMT) Full text and rfc822 format available.

Notification sent to Greg Hogan <code <at> greghogan.com>:
bug acknowledged by developer. (Tue, 12 Nov 2024 19:21:02 GMT) Full text and rfc822 format available.

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

From: Greg Hogan <code <at> greghogan.com>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 74216-done <at> debbugs.gnu.org, Sharlatan Hellseher <sharlatanus <at> gmail.com>,
 bavier <at> posteo.net
Subject: Re: [science team] flint build failure
Date: Tue, 12 Nov 2024 14:19:10 -0500
On Tue, Nov 12, 2024 at 9:01 AM Andreas Enge <andreas <at> enge.fr> wrote:
>
> Hello Greg,
>
> Am Tue, Nov 05, 2024 at 03:43:31PM -0500 schrieb Greg Hogan:
> > flint fails to build for me with the following error unless I include
> > as an input a newer gcc version.
>
> out of curiosity, what is your exact build architecture and processor
> line? The package builds without problems on my rather old laptop, and
> on the Guix build farms.

AWS r7a, AMD EPYC (4th Gen) 9R14

> I have asked someone who knows the flint code well, and they said it
> means that gcc has trouble realising how to expand the assembly code
> into load and stores and computation on machines with less than 8
> registers. Apparently it is a combination of compiler versions and
> processor specifics.
>
> Apart from that, I think we can apply your patch without worries, but
> I am just curious about what is happening.
>
> What is mildly worrying is that we already use the "--disable-assembly"
> configure flag; this could be a bug in the flint configuration.
>
> Andreas

Thanks for investigating this issue and pointing me in the right
direction. Turns out the flint package builds successfully when
upgrading GCC from 11.4 to 11.5. It looks like the processor was too
new.

When considering reproducible builds, this is a bug when building on
future, unknown hardware. For a time-bomb we can set back the clock,
and here we would need processor emulation?

Marking as done since the fix is to update a core package.

Greg




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

This bug report was last modified 187 days ago.

Previous Next


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