Skip to content

Proposal: Stop cccl include paths conflicting with cuda-cccl when used with nvcc #30

@bdice

Description

@bdice

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Proposal

Install CCCL headers into a nested ${PREFIX}/include/cccl/ directory to resolve include-order conflicts

Discussed with @vyasr @robertmaynard.

Problem Summary

The current cccl conda package installs its headers directly into ${PREFIX}/include. Meanwhile, the CUDA Toolkit (CTK) ships its own copy of CCCL into, e.g., ${PREFIX}/targets/x86_64-linux/include via cuda-cccl. Since both paths are added as system include directories (-isystem) like...

-isystem /usr/local/cuda/targets/x86_64-linux/include -isystem $PREFIX/include

...the compiler ends up picking the CTK copy first, causing include‐order issues. This manifests in issues like those seen here with RMM (rapidsai/rmm#1930 (comment)), where the goal is to use the conda-provided cccl but the older cuda-cccl copy is found instead.

The current issue is unavoidable without changing compiler flags because nvcc will always have an -isystem for its headers in the targets/... directory. However, we can't change the priority of ${PREFIX} without breaking normal operations in the conda sysroot, so we need to use a different include path.

This issue results in unreliable header selection: Projects depending on the conda‐installed cccl can inadvertently pick up the wrong headers from the CTK.

Also worth noting here is that CCCL is unique among CTK libraries: It’s the only package we install twice (once in ${PREFIX}/include, once in ${PREFIX}/targets/…/include) and is an implicit include of the nvcc compiler. This is a special case and doesn't affect other packages.

Proposed Solution

Change install path in the cccl-feedstock recipe so that headers go under ${PREFIX}/include/cccl/ instead of directly into ${PREFIX}/include.

Rationale: Conda will no longer treat the nested include/cccl as an implicit system include. CMake can add it with -I (user include) rather than -isystem, giving the cccl package higher search priority than the CTK copy in cuda-cccl.

Recipe updates: In meta.yaml, patch the CMake install rules and/or build.sh install steps to create the cccl/ subdirectory and install headers there.

We should confirm with CCCL maintainers that this directory layout is acceptable, and if changes should be upstreamed in some way.

Backward‐Compatibility / Migration

CMake consumers of CCCL should not require any changes except reconfiguring / doing a clean build.

Consumers should continue to #include <foo.h> by updating include paths to have ${PREFIX}/include/cccl and should not change to #include <cccl/foo.h>.

Installed packages

n/a

Environment info

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions