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

Make linking of nvtx3-cpp BUILD_LOCAL_INTERFACE #15271

Conversation

KyleFromNVIDIA
Copy link
Contributor

Description

When building as static libraries, CMake tries to export the PRIVATE nvtx3-cpp dependency due to how it handles static library exports. Since nvtx3-cpp is a header-only library, and since cudf's public headers don't depend on it, make it BUILD_LOCAL_INTERFACE to avoid exporting the nvtx3-cpp dependency.

Issue: #15270

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

When building as static libraries, CMake tries to export the PRIVATE
nvtx3-cpp dependency due to how it handles static library exports.
Since nvtx3-cpp is a header-only library, and since cudf's public
headers don't depend on it, make it BUILD_LOCAL_INTERFACE to avoid
exporting the nvtx3-cpp dependency.

Issue: rapidsai#15270
@KyleFromNVIDIA KyleFromNVIDIA added bug Something isn't working 2 - In Progress Currently a work in progress non-breaking Non-breaking change labels Mar 11, 2024
@KyleFromNVIDIA KyleFromNVIDIA requested a review from a team as a code owner March 11, 2024 17:30
@github-actions github-actions bot added libcudf Affects libcudf (C++/CUDA) code. CMake CMake build issue labels Mar 11, 2024
@KyleFromNVIDIA
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit dfaa41c into rapidsai:branch-24.04 Mar 11, 2024
73 checks passed
@bdice
Copy link
Contributor

bdice commented Mar 11, 2024

In addition to the Spark failures, this was also seen in the cuSpatial wheel builds: https://github.com/rapidsai/cuspatial/actions/runs/8228471942/job/22497979348

-- Configuring done (27.4s)
CMake Error: install(EXPORT "cudf-exports" ...) includes target "cudf" which requires target "nvtx3-cpp" that is not in any export set.
CMake Error in build/cp310-cp310-manylinux_2_28_aarch64/_deps/cudf-src/cpp/CMakeLists.txt:
  export called with target "cudf" which requires target "nvtx3-cpp" that is
  not in any export set.


-- Generating done (0.1s)
CMake Generate step failed.  Build files cannot be regenerated correctly.

*** CMake configuration failed
error: subprocess-exited-with-error
  
× Building wheel for cuspatial-cu11 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

@KyleFromNVIDIA
Copy link
Contributor Author

It looks like cuspatial is building cudf through add_subdirectory() (indirectly through CPM.) With this change, that job should be fixed if it runs again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In Progress Currently a work in progress bug Something isn't working CMake CMake build issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants