While I was attempting the compilation of one GRMHD code with the ETK which requires FFTW 3.3.7 libraries (those libraries seem not to be straightforwardly backward compatible), I was getting one issue because the FFTW3 thorn was not able to catch my local installed libraries. In particular, on my Ubuntu 16.04 VirtualBox, I have the FFTW 3.3.4 libraries already installed on /usr/ and I also installed the 3.3.7 version (which is the one required by the code) on /usr/local/. If on the .cfg file I don’t indicate FFTW3_DIR, the 3.3.4 version is found automatically (look at the file Cactus/arrangements/ExternalLibraries/FFTW3/src/detect.sh line 23), but if I set FFTW3_DIR = /usr/local (so pointing at the 3.3.7 required version), then the include and lib locations are stripped off by the script Cactus/lib/sbin/strip-incdirs.sh (called at lines 143 and 144 of Cactus/arrangements/ExternalLibraries/FFTW3/src/detect.sh). In particular, in the Cactus/configs/<config>/bindings/Configuration/Capabilities/make.FFTW3.defn the following is reported:
FFTW3_DIR = /usr/local
In this way, the required FFTW3 library version could not be found. A workaround has been to install the required version of FFTW3 in a different location (e.g. /home/) and to point to this location (which is not stripped off by the Cactus/lib/sbin/strip-incdirs.sh script) in the .cfg file and everything works like a charm. The Cactus/configs/<config>/bindings/Configuration/Capabilities/make.FFTW3.defn, thus, reports:
FFTW3_DIR = /home/federico
FFTW3_INC_DIRS = /home/federico/include
FFTW3_LIB_DIRS = /home/federico/lib
which is correct. Maybe, it could be useful to suggest a location for the local installed version of FFTW3 libraries as a comment in the ExternalLibrary/FFTW3/README file.