Problem compiling FFTW with PGI on Power9 system


I’m having trouble compiling FFTW 3.3.8 using PGI 19.4 on an OpenPOWER 9 system due to an error at compile time:

PGC-F-0249-#error --  Use the "-maltivec" flag to enable PowerPC AltiVec support (/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/include/altivec.h: 34)
PGC/power Linux 19.4-0: compilation aborted

The configuration I am using is:

env CC=pgcc FC=pgfortran F90=pgf90 CFLAGS="-fast -Minfo -fPIC" F77=pgfortran FFLAGS="-fast -Minfo" PTHREAD_CC=$CC ./configure --enable-threaded --enable-shared --enable-vsx --prefix=${HOME}/builds/fftw_pgcc

The PTHREAD_CC bit is a workaround recommended here

Any ideas on what could be going awry? During my configure script, I also see the following warning:

configure: WARNING: altivec.h: present but cannot be compiled
configure: WARNING: altivec.h:     check for missing prerequisite headers?
configure: WARNING: altivec.h: see the Autoconf documentation
configure: WARNING: altivec.h:     section "Present But Cannot Be Compiled"
configure: WARNING: altivec.h: proceeding with the compiler's result
configure: WARNING:     ## ---------------------------- ##
configure: WARNING:     ## Report this to ##
configure: WARNING:     ## ---------------------------- ##

but my Google-fu has not been good enough to figure out what that means.

Hi jat255,

Sorry but we don’t support the altivec intrinsics so you’ll need to remove the “–enable-vsx” option from your configure. Once removed, FFTW should build without issue.