tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[PATCH] fix math/arpack-ng with gcc 10
Hi,
math/arpack-ng breaks with gcc 10 (or more precisely, gfortran 10) due
to traditional Fortran style in function calls with scalars as 1D
arrays with 1 element.
Attached patch fixes the build for me by appending the option that
turns the error into a warning. I improvised a version check for
gfortran, as it transpired that peope could mix differing gcc and
gfortran versions. The assumption is that it really is gfortran that is
ever combined with gcc, not any other Fortran compiler …
Alrighty then,
Thomas
--
Dr. Thomas Orgis
HPC @ Universität Hamburg
diff -ruN -x CVS pkgsrc-2020Q3/math/arpack-ng/Makefile pkgsrc/math/arpack-ng/Makefile
--- pkgsrc-2020Q3/math/arpack-ng/Makefile 2020-02-28 22:51:40.000000000 +0100
+++ pkgsrc/math/arpack-ng/Makefile 2020-11-15 10:10:22.158400454 +0100
@@ -12,6 +12,18 @@
USE_LANGUAGES= c fortran
USE_CMAKE= yes
+
+.include "../../mk/bsd.prefs.mk"
+
+# Avoid failure with strict gcc 10.
+.if ${PKGSRC_COMPILER} == "gcc"
+# Check gfortran version, might differ from gcc.
+MY_FC_VERSION!= ${FC} -dumpversion
+.if !empty(MY_FC_VERSION:M[1-9][0-9]*)
+FFLAGS+= -fallow-argument-mismatch
+.endif
+.endif
+
OBJDIR= obj
CONFIGURE_DIRS= ${OBJDIR}
@@ -19,6 +31,8 @@
CMAKE_ARG_PATH= ..
CMAKE_ARGS+= -DBUILD_SHARED_LIBS:BOOL=ON
+# Needs to find its lib to test.
+TEST_ENV+= LD_LIBRARY_PATH=${WRKSRC:Q}/obj/lib
TEST_TARGET= test
pre-configure:
Home |
Main Index |
Thread Index |
Old Index