-
-
Notifications
You must be signed in to change notification settings - Fork 654
Description
Currently gmp.pc
, which may be provided at least on some platforms, is not used at all -- neither by configure
nor by sage.env.cython_aliases
, sage.misc.cython
.
For example, on homebrew, using it will provide the specific library search directory -L/usr/local/Cellar/gmp/6.2.1/lib
instead of having to rely on /usr/local/
(which is disabled when compiler/linker are invoked with -isysroot
)
Currently, gmp
is detected using AC_CHECK_HEADER
, and the result is communicated to sage-build-env-config
as variables SAGE_GMP_PREFIX
and SAGE_GMP_INCLUDE
; but it is not available in the runtime environment (sage_conf.py
, sage-env-config
).
The failures reported in
- #31335 comment:47
- https://groups.google.com/g/sage-release/c/6WjKQt_e_B8/m/H2I4HZ-YCwAJ (https://groups.google.com/g/sage-release/c/6WjKQt_e_B8/m/Uut_ZRaZCwAJ)
- https://groups.google.com/g/sage-release/c/0q3kywk7RP8/m/uspq0xeuAgAJ
can be fixed by simply changingsage.misc.cython
to pick upgmp.pc
. But to avoid unpleasant surprises, we need to make sure that it is used consistently when present.
(After #32549, the relevant file is build/pkgs/gmp/spkg-configure.m4
.)
The above applies to mpfr
as well. See failure report in https://groups.google.com/g/sage-release/c/8ctwsUGl6LQ/m/Ob38Iyh1AAAJ
Similar situation with readline
(#29000): The spkg-configure script already uses pkg-config - but forgets to tell the build system what it found.
Previous tickets: #27212
Depends on #31344
Depends on #32549
CC: @dimpase @jhpalmieri @zlscherr @orlitzky
Component: build: configure
Keywords: mpfr
Branch/Commit: u/gh-zlscherr/add_gmp_mpfr_cython @ 07e00b6
Issue created by migration from https://trac.sagemath.org/ticket/31348