Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 2b5c0ba

Browse files
author
Release Manager
committed
Trac #30757: fedora-33-standard/homebrew-macos flint/arb breakage
`fedora-33-standard`, https://github.com/sagemath/sage/runs/1235092189 1. `configure` finds system `flint` but not system `arb` (headers are installed by the fedora package in `/usr/include/arb/`, but the arb spkg-configure expects them in `/usr/include`). 2. Then compiling arb spkg results in: {{{ [arb-2.16.0.p0] /sage/local/var/tmp/sage/build/arb-2.16.0.p0/src/fmpr.h:25:10: fatal error: flint/config.h: No such file or directory [arb-2.16.0.p0] 25 | #include "flint/config.h" [arb-2.16.0.p0] | ^~~~~~~~~~~~~~~~ [arb-2.16.0.p0] compilation terminated. }}} Indeed, `/usr/include/flint/` is present, but `config.h` is missing. For Sage 9.3, we can do the upgrade to arb 2.18.1 (#28623) and flint 2.6.3 (#29719). But we need a quick fix for Sage 9.2. (`fedora-33` is expected to be released 2020-10-20.) Same error also on `homebrew-macos` with flint installed. URL: https://trac.sagemath.org/30757 Reported by: mkoeppe Ticket author(s): Dima Pasechnik Reviewer(s): Matthias Koeppe
2 parents c5ca85e + 78edcc3 commit 2b5c0ba

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
From d3d9983231e0f034e86a1e75761627eb8213b704 Mon Sep 17 00:00:00 2001
2+
From: fredrik <[email protected]>
3+
Date: Wed, 29 Apr 2020 13:41:36 +0200
4+
Subject: [PATCH] handle flint incompatibilities
5+
6+
---
7+
fmpr.h | 4 ++++
8+
fmpz_extras.h | 4 ++++
9+
2 files changed, 8 insertions(+)
10+
11+
diff --git a/fmpr.h b/fmpr.h
12+
index 2204d72e..c6a8c342 100644
13+
--- a/fmpr.h
14+
+++ b/fmpr.h
15+
@@ -22,7 +22,11 @@
16+
#include "flint/flint.h"
17+
#include "flint/fmpz.h"
18+
#include "flint/fmpq.h"
19+
+#if __FLINT_RELEASE < 20600
20+
#include "flint/config.h"
21+
+#else
22+
+#include "flint/flint-config.h"
23+
+#endif
24+
#include "fmpz_extras.h"
25+
26+
#ifndef flint_abort
27+
diff --git a/fmpz_extras.h b/fmpz_extras.h
28+
index 4fd0538f..486e28c8 100644
29+
--- a/fmpz_extras.h
30+
+++ b/fmpz_extras.h
31+
@@ -43,6 +43,8 @@ fmpz_add_inline(fmpz_t z, const fmpz_t x, const fmpz_t y)
32+
fmpz_add(z, x, y);
33+
}
34+
35+
+#if __FLINT_RELEASE < 20600
36+
+
37+
static __inline__ void
38+
fmpz_add_si(fmpz_t z, const fmpz_t x, slong y)
39+
{
40+
@@ -61,6 +63,8 @@ fmpz_sub_si(fmpz_t z, const fmpz_t x, slong y)
41+
fmpz_add_ui(z, x, -y);
42+
}
43+
44+
+#endif
45+
+
46+
static __inline__ void
47+
fmpz_add_si_inline(fmpz_t z, const fmpz_t x, slong y)
48+
{

0 commit comments

Comments
 (0)