CV-CUDA icon indicating copy to clipboard operation
CV-CUDA copied to clipboard

[BUG] cvcuda CMake package does not find nvcv_types and permits incompatible 0.x versions

Open bhashemian opened this issue 3 months ago • 4 comments

Describe the bug CV-CUDA v0.17.0 ships cvcuda and nvcv_types in the same development package but exports them as separate CMake packages. The generated cvcuda-config.cmake references target nvcv_types without discovering it, so find_package(cvcuda ...) fails unless the consumer finds nvcv_types first.

Both generated package version files use SameMajorVersion. For a 0.x project, this allows a later minor release to satisfy an earlier 0.x request, despite v0.17 documenting C and C++ compatibility-breaking changes.

Steps/Code to reproduce bug Install or stage the v0.17.0 development package, then configure this minimal project:

cmake_minimum_required(VERSION 3.20)
project(cvcuda_consumer LANGUAGES CXX)

find_package(cvcuda 0.17 CONFIG REQUIRED)
cmake -S . -B build

Configuration fails with:

The following imported targets are referenced, but are missing: nvcv_types

The following order succeeds, while the reverse order still fails:

find_package(nvcv_types 0.17 CONFIG REQUIRED)
find_package(cvcuda 0.17 CONFIG REQUIRED)

A version request for 0.16 also accepts the installed v0.17.0 package when both packages are found in that order.

Expected behavior find_package(cvcuda ...) should discover its required nvcv_types package itself, for example through a package-config wrapper using find_dependency. Consumers should not need two calls in a specific order.

Different 0.x minor releases should not be treated as compatible when compatibility is not guaranteed. SameMinorVersion or an equivalent explicit policy would match the documented release behavior.

Environment overview (please complete the following information)

  • Environment location: Bare-metal
  • Method of cuDF install: Not applicable; CV-CUDA v0.17.0 configured from source

Environment details Relevant output from cvcuda/print_env.sh:

CV-CUDA commit: 5ac8708bde57f8cf1c8d19443f6384875e86157c (v0.17.0)
OS: Ubuntu 24.04.4 LTS, aarch64
CMake: 3.28.3
CUDA toolkit: 13.0.88

The failure occurs while loading generated CMake package metadata, before compilation or linking.

Additional context

  • cvcuda exports CUDA::cudart_static;nvcv_types;-lrt as its public link interface.
  • The v0.17 release notes explicitly require some existing C binaries to be rebuilt.
  • Relevant sources:
    • https://github.com/CVCUDA/CV-CUDA/blob/v0.17.0/src/cvcuda/CMakeLists.txt#L110-L179
    • https://github.com/CVCUDA/CV-CUDA/blob/v0.17.0/src/nvcv/src/CMakeLists.txt#L69-L108
    • https://github.com/CVCUDA/CV-CUDA/blob/v0.17.0/docs/sphinx/relnotes/v0.17.0-beta.rst#L105-L119

bhashemian avatar Aug 26 '26 15:08 bhashemian

thank you for your report! Investigating and working on a patch for v0.19.

dlesage-nvidia avatar Sep 05 '26 05:09 dlesage-nvidia

I will take this issue. Please assign it to me.

The problem seems to be that cvcuda-config.cmake does not properly discover nvcv_types. I will first inspect the cvcuda-config.cmake file to ensure it uses find_dependency to locate nvcv_types. If not, I will add it. I will also check the version compatibility logic to ensure it aligns with the documented behavior. A small fix will involve modifying the CMake configuration to automatically handle dependencies and version constraints correctly.

modelpath-dev avatar Sep 11 '26 11:09 modelpath-dev

Thanks for offering your help @modelpath-dev . Unfortunately CV-CUDA is not yet open to external contributions, development is carried out internally at NVIDIA, then released to GitHub on a monthly basis. I can confirm that a patch has been developed and merged internally, slotted for release with v0.19, ETA end of month. I will keep the issue open until that release is available. If anyone needs an earlier patch, I can post the diff as a PR.

dlesage-nvidia avatar Sep 11 '26 18:09 dlesage-nvidia

Thanks for the update. I understand that the patch will be included in the v0.19 release. If you could share the diff as a PR for those who need it earlier, that would be helpful. Let me know if there's anything else I can assist with.

modelpath-dev avatar Sep 12 '26 02:09 modelpath-dev