arpack-ng
arpack-ng copied to clipboard
Configure.ac - Optional Modules
Disclaimer: I'm not certain of the following.
Trying to compile on a eigen3-free computer, I have the error :
./configure: line 25538: syntax error near unexpected token
EIGEN3,' ./configure: line 25538:PKG_CHECK_MODULES(EIGEN3, eigen3 >= 3.3)'
Should le line :
if test x"$enable_icb_exmm" != x"no"; then
https://github.com/opencollab/arpack-ng/blob/0a655d918d558ef97881db2760668b8d1e3b4bc1/configure.ac#L87
be replaced by
AS_IF([test "x$enable_icb_exmm" != "xno"], [
?
Please see https://autotools.io/pkgconfig/pkg_check_modules.html - section 3.4
Could you please try to write a pull request to fix that?
Should le line ... be replaced ...
Sounds right. PR a fix if possible (CI down at the time - hopefully back up soon...)
Hi there, more than a year has passed, and it seems the bug is still there (I still hit it recently on Ubuntu 22.04 with autotools 20220109.1). I see that you are planning a release this week @fghoussen , maybe better include a quick fix of this issue?
Another quick follow up question: why is Eigen even required in the build?
@wztzjhn don't hesitate to submit a PR to fix it :)
@wztzjhn don't hesitate to submit a PR to fix it :)
Sorry not an expert on autotools... I naively tried replacing
if test x"$enable_icb_exmm" != x"no"; then
by
AS_IF([test x"$enable_icb_exmm" != x"no"], [
(and close by ]) at the end correspondingly), following your discussions above. However did not have much luck.
If I just guess by reading
PKG_CHECK_MODULES([EIGEN3], [eigen3 >= 3.3]),
it sounds like EIGEN3 is necessary under this condition?
why is Eigen even required in the build?
Eigen is required only if you ask for --enable-icb-exmm. If not present, no need for Eigen, so you should not hit this PKG_CHECK_MODULES statement.
quick fix of this issue?
I'll have no time for that these days, and, I have no way to reproduce this at my side (OK at my side).
@wztzjhn: after bird-eye-not-tested look, try this and PR if this solve the problem and CI is OK, then, we can merge this before releasing a new version
>> git diff
diff --git a/configure.ac b/configure.ac
index 52e0a87..1c6795e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,7 +86,7 @@ dnl See if compiling matrix market example based on ICB
AC_ARG_ENABLE([icb-exmm],
[AS_HELP_STRING([--enable-icb-exmm],
[matrix market example based on ISO_C_BINDING])],
- [AS_VAR_SET([enable_icb], [$enableval])],
+ [],
[AS_VAR_SET([enable_icb_exmm], [no])])
if test x"$enable_icb_exmm" != x"no"; then
Run make distclean; ./autogen.sh before testing if needed.
I'll have no time for that these days, and, I have no way to reproduce this at my side (OK at my side).
Yes, you probably need to manually uninstall eigen3 to reproduce it... I finally installed libeigen3-dev to avoid (not solve) the problem.
@wztzjhn: after bird-eye-not-tested look, try this and PR if this solve the problem and CI is OK, then, we can merge this before releasing a new version
>> git diff diff --git a/configure.ac b/configure.ac index 52e0a87..1c6795e 100644 --- a/configure.ac +++ b/configure.ac @@ -86,7 +86,7 @@ dnl See if compiling matrix market example based on ICB AC_ARG_ENABLE([icb-exmm], [AS_HELP_STRING([--enable-icb-exmm], [matrix market example based on ISO_C_BINDING])], - [AS_VAR_SET([enable_icb], [$enableval])], + [], [AS_VAR_SET([enable_icb_exmm], [no])]) if test x"$enable_icb_exmm" != x"no"; thenRun
make distclean; ./autogen.shbefore testing if needed.
Tried it but did not work (when eigen3 is not present). For the record, I used the following:
FFLAGS="-m64 -I${MKL_INC_DIR}" FCFLAGS="-m64 -I$MKL_INC_DIR" CFLAGS="-DMKL_ILP64 -m64 -I${MKL_INC_DIR}" CXXFLAGS="-DMKL_ILP64 -m64 -I${MKL_INC_DIR}" LIBS="-L${MKL_LIB_DIR} -Wl,--no-as-needed -lmkl_gf_ilp64 -lmkl_tbb_thread -lmkl_core -lpthread -ltbb -lstdc++ -lm -ldl" LIBSUFFIX="ILP64" INTERFACE64="1" ./configure --with-blas=mkl_gf_ilp64 --with-lapack=mkl_gf_ilp64 --enable-icb --prefix=$HOME/installs
where
export MKL_INC_DIR=${MKLROOT}/include
export MKL_LIB_DIR=${MKLROOT}/lib/intel64
I am also quite busy recently, probably it is fine to leave this minor problem aside for some time...
Tried it but did not work (when eigen3 is not present). For the record, I used the following: FFLAGS="-m64 -I${MKL_INC_DIR}"
Can you try without MKL?
Tried it but did not work (when eigen3 is not present). For the record, I used the following: FFLAGS="-m64 -I${MKL_INC_DIR}"
Can you try without MKL?
After fetching the newest commit, I tried 3 cases and all passed -- it seems I can no longer see this bug:
- With eigen3 installed, and MKL turned off:
LIBSUFFIX="LP64" INTERFACE64="0" ./configure --enable-icb --prefix=$HOME/installs - With eigen3 uninstalled, and MKL turned off:
LIBSUFFIX="LP64" INTERFACE64="0" ./configure --enable-icb --prefix=$HOME/installs - With eigen3 uninstalled, and MKL turned on with ILP64 (the same command as in my previous reply):
FFLAGS="-m64 -I${MKL_INC_DIR}" FCFLAGS="-m64 -I$MKL_INC_DIR" CFLAGS="-DMKL_ILP64 -m64 -I${MKL_INC_DIR}" CXXFLAGS="-DMKL_ILP64 -m64 -I${MKL_INC_DIR}" LIBS="-L${MKL_LIB_DIR} -Wl,--no-as-needed -lmkl_gf_ilp64 -lmkl_tbb_thread -lmkl_core -lpthread -ltbb -lstdc++ -lm -ldl" LIBSUFFIX="ILP64" INTERFACE64="1" ./configure --with-blas=mkl_gf_ilp64 --with-lapack=mkl_gf_ilp64 --enable-icb --prefix=$HOME/installs