[science team] flint build failure

  • Done
  • quality assurance status badge
Details
2 participants
  • Andreas Enge
  • Greg Hogan
Owner
unassigned
Submitted by
Greg Hogan
Severity
normal
G
G
Greg Hogan wrote on 5 Nov 21:43 +0100
(address . bug-guix@gnu.org)
CA+3U0ZkVMvTXAsJ+JTGizNxCVCNEVNZkaTPgNoThMyXjs+DEWA@mail.gmail.com
flint fails to build for me with the following error unless I include
as an input a newer gcc version.

Greg

Toggle snippet (22 lines)
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],
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
G
G
Greg Hogan wrote on 5 Nov 21:47 +0100
[PATCH science-team] gnu: flint: Update gcc version.
(address . 74216@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
8c553303b938131c57f4eb508de02ff9788b52d9.1730839494.git.code@greghogan.com
* gnu/packages/algebra.scm (flint)[inputs]: Add gcc-14.

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

Toggle diff (17 lines)
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
A
A
Andreas Enge wrote on 12 Nov 15:01 +0100
Re: [science team] flint build failure
(name . Greg Hogan)(address . code@greghogan.com)
ZzNfnK4Y3TiAUAE8@jurong
Hello Greg,

Am Tue, Nov 05, 2024 at 03:43:31PM -0500 schrieb Greg Hogan:
Toggle quote (3 lines)
> 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
G
G
Greg Hogan wrote on 12 Nov 20:19 +0100
(name . Andreas Enge)(address . andreas@enge.fr)
CA+3U0Zky_2VTJBu4KJ3SMy7TZhTVJdjbLpO+WqGEkU6BbRU1LQ@mail.gmail.com
On Tue, Nov 12, 2024 at 9:01?AM Andreas Enge <andreas@enge.fr> wrote:
Toggle quote (11 lines)
>
> 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

Toggle quote (14 lines)
> 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
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 74216@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74216
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch