math/fftw3 vs gfortran

Theo Buehler <[email protected]> Thu, 23 Jul 2026 22:07:06 +0200
Newsgroups gmane.os.openbsd.ports
Message-ID <[email protected]>
In my ongoing bulk, math/fftw3 failed to build because gfortran was
junked during configure:

checking for gfortran... gfortran
...
configure: error: cannot compile a simple Fortran program

According to config.log the error was this:

configure:21131: gfortran -c -g -O2 conftest.f >&5
/usr/ports/pobj/fftw3-3.3.10-double/fftw-3.3.10/configure: gfortran: not found


The below diff switches to the fortran module and builds and passes
regress on amd64 and arm64.  port-lib-depends-check complains, which I
think is normal and unavoidable:

fftw3-common-3.3.10p1(math/fftw3,-common):
Extra:  gfortran.10 quadmath.5

I think fixing it this way means that we need to add

USE_NOBTCFI-aarch64 = Yes# fortran

to quite a few ports, unless someone can confirm that this is no longer
needed with lang/gcc/15 - as the XXX in fortran.port.mk suggests.

So perhaps there is a better way using some autoconf magic that disables
gfortran...

Index: Makefile
===================================================================
RCS file: /cvs/ports/math/fftw3/Makefile,v
diff -u -p -r1.43 Makefile
--- Makefile	11 Aug 2025 09:11:20 -0000	1.43
+++ Makefile	23 Jul 2026 20:06:18 -0000
@@ -10,12 +10,12 @@ FULLPKGPATH-main=	math/fftw3,-main${FLAV
 FULLPKGNAME-common=	fftw3-common-${V}
 SHARED_LIBS=	fftw3	7.1 \
 		fftw3f	7.1 \
-		fftw3_threads	1.2 \
-		fftw3f_threads	1.2
+		fftw3_threads	1.3 \
+		fftw3f_threads	1.3
 CATEGORIES=	math
 
-REVISION-main=		1
-REVISION-common=	0
+REVISION-main=		2
+REVISION-common=	1
 
 HOMEPAGE=	https://www.fftw.org/
 
@@ -32,6 +32,8 @@ MULTI_PACKAGES=	-main -common
 
 FLAVORS=	double float
 FLAVOR?=	double
+
+MODULES +=	fortran
 
 USE_GMAKE=	Yes
 CONFIGURE_STYLE=gnu