microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.41k stars 6.2k forks source link

[FFTW3] VCPKG installs 3.3.9 but claims 3.3.10 #39717

Closed kwsp closed 2 weeks ago

kwsp commented 2 weeks ago

Describe the bug VCPKG thinks it built and installed FFTW3 3.3.10, while the built FFTW3 library itself says it's version 3.3.9.

Environment

To Reproduce Steps to reproduce the behavior:

  1. Clone this MRE https://github.com/kwsp/repro_fftw_version on a M1 mac.
  2. Use the CMake Preset "Clang Release" in VS Code with the VCPKG extension to configure the build. Alternatively, run it manually: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -S. -Bbuild/clang-release -G Ninja

Expected behavior A clear and concise description of what you expected to happen.

When configuring with the VCPKG toolchain CMake prints this message implying FFTW3@3.3.10 will be built.

-- Running vcpkg install
Detecting compiler hash for triplet arm64-osx...
Compiler found: /Library/Developer/CommandLineTools/usr/bin/clang++
The following packages will be built and installed:
    fftw3:arm64-osx@3.3.10#8
  * vcpkg-cmake:arm64-osx@2024-04-23
  * vcpkg-cmake-config:arm64-osx@2024-05-23

Again, searching through the metadata we see VCPKG thinks it installed 3.3.10.

~/code/cpp/repro_fftw_version (main ✔) rg -uuu 3.3.10
build/clang-release/vcpkg-manifest-install.log
4:    fftw3:arm64-osx@3.3.10#8
15:Installing 3/3 fftw3:arm64-osx@3.3.10#8...

build/clang-release/vcpkg_installed/vcpkg/updates/0000000004
2:Version: 3.3.10

build/clang-release/vcpkg_installed/vcpkg/updates/0000000005
2:Version: 3.3.10

build/clang-release/vcpkg_installed/arm64-osx/share/fftw3/vcpkg.spdx.json
6:  "documentNamespace": "https://spdx.org/spdxdocs/fftw3-arm64-osx-3.3.10#8-5d0dde3a-2ad4-4c23-a91f-65e5b50f750f",
7:  "name": "fftw3:arm64-osx@3.3.10#8 a8e16c4c88cfbea2a34591f2bf43ce41810decc0f44013e8a5cac9374952da82",
100:      "versionInfo": "3.3.10#8",
121:      "name": "fftw-3.3.10.tar.gz",
122:      "packageFileName": "fftw-3.3.10.tar.gz",
123:      "downloadLocation": "https://www.fftw.org/fftw-3.3.10.tar.gz",

However, it appears the actual FFTW binary linked is 3.3.9.

~/code/cpp/repro_fftw_version (main ✔) rg -uuu 3.3.9
build/clang-release/vcpkg_installed/arm64-osx/share/fftw3f/FFTW3fConfigVersion.cmake
2:set (PACKAGE_VERSION "3.3.9")

build/clang-release/vcpkg_installed/arm64-osx/share/fftw3l/FFTW3lConfigVersion.cmake
2:set (PACKAGE_VERSION "3.3.9")

build/clang-release/vcpkg_installed/arm64-osx/lib/pkgconfig/fftw3.pc
8:Version: 3.3.9

build/clang-release/vcpkg_installed/arm64-osx/lib/pkgconfig/fftw3l.pc
8:Version: 3.3.9

build/clang-release/vcpkg_installed/arm64-osx/lib/libfftw3f.a: binary file matches (found "\0" byte around offset 84)

build/clang-release/vcpkg_installed/arm64-osx/lib/pkgconfig/fftw3f.pc
8:Version: 3.3.9

build/clang-release/vcpkg_installed/arm64-osx/lib/libfftw3l.a: binary file matches (found "\0" byte around offset 84)

build/clang-release/vcpkg_installed/arm64-osx/lib/libfftw3.a: binary file matches (found "\0" byte around offset 84)

build/clang-release/vcpkg_installed/arm64-osx/debug/lib/pkgconfig/fftw3l.pc
8:Version: 3.3.9

build/clang-release/vcpkg_installed/arm64-osx/share/fftw3/FFTW3ConfigVersion.cmake
2:set (PACKAGE_VERSION "3.3.9")

build/clang-release/vcpkg_installed/arm64-osx/debug/lib/pkgconfig/fftw3.pc
8:Version: 3.3.9

build/clang-release/vcpkg_installed/arm64-osx/debug/lib/libfftw3f.a: binary file matches (found "\0" byte around offset 84)

build/clang-release/vcpkg_installed/arm64-osx/debug/lib/pkgconfig/fftw3f.pc
8:Version: 3.3.9

build/clang-release/vcpkg_installed/arm64-osx/debug/lib/libfftw3.a: binary file matches (found "\0" byte around offset 84)

build/clang-release/vcpkg_installed/arm64-osx/debug/lib/libfftw3l.a: binary file matches (found "\0" byte around offset 84)

Executing the main binary in the MRE linked above, we get

~/code/cpp/repro_fftw_version/build/clang-release/src (main ✔) main
Hello world
fftw-3.3.9

Failure logs -(please attached failure logs)

Additional context Add any other context about the problem here.

StarGate-One commented 2 weeks ago

Looks like upstream forgot to update the version string to 3.3.10 on line 282 of the CMakeLists.txt before creating the archive file fftw-3.3.10.tar.gz: ...\fftw-3.3.10.tar\fftw-3.3.10\CMakeLists.txt 282 set (FFTW_VERSION 3.3.9) 413 set (VERSION ${FFTW_VERSION}) In essence fftw3 thinks it is version 3.3.9 but the source is really 3.3.10...

The has been updated to reflect 3.3.10, https://github.com/FFTW/fftw3/blob/187045ea647ba19c55db5f503d11bd811ee6b56e/CMakeLists.txt#L282

kwsp commented 1 week ago

Thank you!