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

MacPorts noreply at macports.org
Thu Oct 26 05:23:39 UTC 2023


#68555: fftw-3  @3.3.10_0+gfortran [*, *-long, *-single]: Build cannot be used to
satisfy dependancies for cmake built applications.
--------------------+--------------------
 Reporter:  vk1kcm  |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:  fftw-3
--------------------+--------------------
 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).

-- 
Ticket URL: <https://trac.macports.org/ticket/68555>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list