Opened 13 months ago

Last modified 13 months ago

#68555 assigned defect

fftw-3 @3.3.10_0+gfortran [*, *-long, *-single]: Build cannot be used to satisfy dependancies for cmake built applications.

Reported by: vk1kcm (Carl Makin) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: fftw-3

Description

The current fftw-3 ports cannot be used to satisfy dependancies for cmake built applications.

The autotools build of fftw-3 installs things in slightly different places than the cmake build and also omits FFTW3LibraryDepends.cmake which is referenced in the FFTW3fConfig.cmake. Note: Autotools is still the default and recommended way to build fftw-3.

See the upstream bug and a helpful comment here; https://github.com/FFTW/fftw3/issues/130#issuecomment-869046195

So there end up being two problems, one is that FFTW3LibraryDepends.cmake is only created if you build fftw-3 with cmake and is listed as a hard dependancy in FFTW3fConfig.cmake, and the other is that the different versions, -single, -long, drop their files into <CMAKE_PREFIX_PATH>/<libdirs>/cmake/fftw3/ but cmake find_package() searches <CMAKE_PREFIX_PATH>/<libdirs>/cmake/fftw3<type>/.

This makes it impossible for the cmake find_package() tool to find right .cmake files so can't build things with cmake that require fftw-3.

I'm not entirely sure what the correct answer is here, especially as it's still an open bug upstream. To get around it for the moment I've manually symlinked /opt/local/lib/cmake/fftwf-3 to /opt/local/lib/cmake/fftw-3 (for -single) and put a version of FFTW3LibraryDepends.cmake (see attached) into /opt/local/lib/cmake/ that I built separately and then modified (easy, 1 line change). This seems to be what other projects have done (ie pfsense, linked in the bug above).

Attachments (1)

FFTW3LibraryDepends.cmake (2.5 KB) - added by vk1kcm (Carl Makin) 13 months ago.
Hand modified cmake depends file

Download all attachments as: .zip

Change History (2)

Changed 13 months ago by vk1kcm (Carl Makin)

Attachment: FFTW3LibraryDepends.cmake added

Hand modified cmake depends file

comment:1 Changed 13 months ago by jmroot (Joshua Root)

Owner: set to MarcusCalhoun-Lopez
Status: newassigned
Note: See TracTickets for help on using tickets.