You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hand-written configure script for flint has a clause like this:
if [ -d "${GMP_DIR}/lib" ]; then
GMP_LIB_DIR="${GMP_DIR}/lib"
GMP_INC_DIR="${GMP_DIR}/include"
elif [ -d "${GMP_DIR}/lib64" ]; then
GMP_LIB_DIR="${GMP_DIR}/lib64"
GMP_INC_DIR="${GMP_DIR}/include"
elif [ -d "${GMP_DIR}/.libs" ]; then
GMP_LIB_DIR="${GMP_DIR}/.libs"
GMP_INC_DIR="${GMP_DIR}"
else
echo "Invalid GMP directory"
exit 1
fi
By default, if --with-gmp is not given, it just arbitrarily defaults to GMP_DIR=/usr/local. This means that if none of the directories /usr/local/lib, /usr/local/lib64, or /usr/local/.libs exist (note: this has nothing directly to do with detecting GMP), the script will exit with an error code.
It does something similar with MPFR and NTL.
I don't have a strong opinion on how to deal with this. We could either patch it out. Or we could point it to a directory that does exist (e.g. $SAGE_LOCAL/lib, even if GMP is not actually installed there). Or write some more sophisticated detection code for GMP, though I feel that such efforts are often overkill: The way autoconf works w.r.t. system packages is if the headers and libraries are in the default paths searched by the compiler/linker then it shouldn't be necessary to provide additional flags.
In other words, flint's configure, without an explicit --with-gmp, shouldn't and needn't do anything to try to provide an otherwise bogus path for GMP...
The hand-written configure script for flint has a clause like this:
By default, if
--with-gmp
is not given, it just arbitrarily defaults toGMP_DIR=/usr/local
. This means that if none of the directories/usr/local/lib
,/usr/local/lib64
, or/usr/local/.libs
exist (note: this has nothing directly to do with detecting GMP), the script will exit with an error code.It does something similar with MPFR and NTL.
I don't have a strong opinion on how to deal with this. We could either patch it out. Or we could point it to a directory that does exist (e.g.
$SAGE_LOCAL/lib
, even if GMP is not actually installed there). Or write some more sophisticated detection code for GMP, though I feel that such efforts are often overkill: The way autoconf works w.r.t. system packages is if the headers and libraries are in the default paths searched by the compiler/linker then it shouldn't be necessary to provide additional flags.In other words, flint's configure, without an explicit
--with-gmp
, shouldn't and needn't do anything to try to provide an otherwise bogus path for GMP...CC: @dimpase @slel @wbhart @zerline
Component: build: configure
Keywords: flint
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/28409
The text was updated successfully, but these errors were encountered: