FS#67604 - [fftw] CMake FFTW3 config: FFTW3LibraryDepends.cmake not found
Attached to Project:
Arch Linux
Opened by Rishvic Pushpakaran (CodingPotato) - Sunday, 16 August 2020, 14:03 GMT
Last edited by David Runge (dvzrv) - Saturday, 19 February 2022, 20:02 GMT
Opened by Rishvic Pushpakaran (CodingPotato) - Sunday, 16 August 2020, 14:03 GMT
Last edited by David Runge (dvzrv) - Saturday, 19 February 2022, 20:02 GMT
|
Details
Description:
In the included files in the fftw Arch Linux package, there is no `/usr/lib64/cmake/fftw3/FFTW3LibraryDepends.cmake` file present, which is required if one tries to use `find_package(FFTW3)` in CMake. The same file is built when FFTW library is built using CMake. It seems the file is not created when using Autotools to build FFTW library, but the file is necessary when one tries to use the `FFTW3Config.cmake` to find FFTW via CMake for one's own project. Additional info: * library version: fftw-3.3.8-3-x86_64 * error thrown when trying to use `find_package(FFTW)` in `CMakeLists.txt`: ``` -- The C compiler identification is GNU 10.1.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done CMake Error at /usr/lib64/cmake/fftw3/FFTW3Config.cmake:13 (include): include could not find load file: /usr/lib64/cmake/fftw3/FFTW3LibraryDepends.cmake Call Stack (most recent call first): CMakeLists.txt:<line-no> (find_package) -- Configuring incomplete, errors occurred! See also "<path-to-cmake-build>/CMakeFiles/CMakeOutput.log". ``` Steps to reproduce: * Create `CMakeLists.txt` * Add the following line to `CMakeLists.txt`: ``` find_package(FFTW) ``` * Run `cmake .` Note: Attached a sample `FFTW3LibraryDepends.cmake`, created by me by building fftw using CMake (OpenMP, pthread are enabled; single, long-double, quadruple disabled; CPU instruction set optimizations disabled) |
This task depends upon
Please note that /usr/lib64/ is not in use by Arch Linux (the correct location would be /usr/lib).
Additionally: Arch usually does *not* include additional resources if they are not provided by upstream (vanilla approach). E.g. if you think that fftw should include cmake integration out-of-the-box please get in touch with upstream [1] and convince them of your idea.
We currently build fftw using autotools but upstream also provides a CMake integrated build system. I assume that it would pull in some form of integration (but I have not tested that yet). At any rate preserving the pkgconfig integration would be preferred over a cmake only integration. Ideally both build systems would provide both pkgconfig *and* cmake integration.
I can look into switching to cmake if time permits.
Closing I would like to add, that fftw provides pkgconfig integration for fftw3, fftw3f, fftw3l and fftw3q. Cmake is able to make use of that [2].
[1] https://github.com/FFTW/fftw3
[2] https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
MPI support needs to be added and a patch for problems with libquadmath need to be resolved before any additional attempt can be made.
Closing, as this is for upstream to fix. If you are up for helping upstream to improve their cmake setup, you can use the PKGBUILD for the package to derive a version that is built with cmake (it's commented) while making sure that the outcome is equal to that when building with autotools.
It can be solved by just creating a separate build dir and run cmake in it, and then install the cmake files manually in the PKGBUILD (it is not necessary to actually build with cmake to get the files).
FWIW, the upstream issue is here https://github.com/FFTW/fftw3/issues/130