Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Rejects compilation with simdutf-5.0.0 #103

Closed
imwints opened this issue Mar 22, 2024 · 4 comments
Closed

cmake: Rejects compilation with simdutf-5.0.0 #103

imwints opened this issue Mar 22, 2024 · 4 comments

Comments

@imwints
Copy link

imwints commented Mar 22, 2024

>>> Unpacking source...
>>> Unpacking scnlib-2.0.2.tar.gz to /var/tmp/portage/dev-cpp/scnlib-2.0.2/work
>>> Source unpacked in /var/tmp/portage/dev-cpp/scnlib-2.0.2/work
>>> Preparing source in /var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2 ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2_build"
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *      set(CMAKE_BUILD_TYPE Release CACHE STRING "")
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2 ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2_build"
cmake -C /var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DSCN_BENCHMARKS=OFF -DSCN_BENCHMARKS_BINARYSIZE=OFF -DSCN_BENCHMARKS_BUILDTIME=OFF -DSCN_DOCS=OFF -DSCN_EXAMPLES=OFF -DSCN_TESTS=OFF -DSCN_USE_EXTERNAL_FAST_FLOAT=ON -DSCN_USE_EXTERNAL_SIMDUTF=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2_build/gentoo_toolchain.cmake /var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2
loading initial cache file /var/tmp/portage/dev-cpp/scnlib-2.0.2/work/scnlib-2.0.2_build/gentoo_common_config.cmake
-- The CXX compiler identification is GNU 14.0.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at cmake/dependencies.cmake:64 (find_package):
  Could not find a configuration file for package "simdutf" that is
  compatible with requested version "4.0.0".

  The following configuration files were considered but not accepted:

    /usr/lib64/cmake/simdutf/simdutf-config.cmake, version: 5.0.0
    /lib64/cmake/simdutf/simdutf-config.cmake, version: 5.0.0

Call Stack (most recent call first):
  CMakeLists.txt:35 (include)


-- Configuring incomplete, errors occurred!
@spinicist
Copy link

I have just hit this same problem with the latest scnlib port in vcpkg. I'll downgrade for now.

@chenrui333
Copy link

chenrui333 commented Apr 3, 2024

this is the build patch for building with simdutf 5.0.0, #102

the patch actually needs some update for simdutf 5.2.2, Homebrew/homebrew-core#167800

@imwints
Copy link
Author

imwints commented Apr 4, 2024

I'm not sure if this is the ideal solution, since 5.x didn't introduce any breaking changes it would be weird to just not support it. Version ranges from cmake don't work either since it needs to match major + minor, so 4.0.0 < 5.2.2 would only match 4.0.x and 5.2.x, nothing in between (5.0.x etc). I've not tested it, but I wrote this patch and I've locally tested replacing

find_package(simdutf 5.2.0 CONFIG)
# with
find_package(simdutf 5 CONFIG)

which correctly finds simdutf-5.2.2.

@eliaskosunen
Copy link
Owner

The CI is acting up, but I believe this should be good since 97baaf2 and 5c4b91e. I'll cut a release with this, soon, unless there are issues with this.

Thanks for bringing this up -- managing dependencies with CMake is really something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants