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

[BUG] cmake fails to configure static libcudf build #15270

Closed
jlowe opened this issue Mar 11, 2024 · 1 comment
Closed

[BUG] cmake fails to configure static libcudf build #15270

jlowe opened this issue Mar 11, 2024 · 1 comment
Assignees
Labels
bug Something isn't working CMake CMake build issue libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS

Comments

@jlowe
Copy link
Member

jlowe commented Mar 11, 2024

Describe the bug
After #15178 cmake will fail to configure libcudf as a static library. Configuration fails with:

CMake Error: install(EXPORT "cudf-exports" ...) includes target "cudf" which requires target "nvtx3-cpp" that is not in any export set.
CMake Error in CMakeLists.txt:
  export called with target "cudf" which requires target "nvtx3-cpp" that is
  not in any export set.

Steps/Code to reproduce bug
Execute the following cmake command from cpp/build:

cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DCMAKE_CUDA_ARCHITECTURES=70 -DCUDA_STATIC_RUNTIME=ON -DCUDF_ENABLE_ARROW_S3=OFF -DCUDF_ENABLE_ARROW_PARQUET=ON -DCUDF_USE_ARROW_STATIC=ON -DCUDF_USE_PER_THREAD_DEFAULT_STREAM=ON

Expected behavior
cmake configures successfully

@jlowe jlowe added bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. CMake CMake build issue Spark Functionality that helps Spark RAPIDS labels Mar 11, 2024
KyleFromNVIDIA added a commit to KyleFromNVIDIA/cudf that referenced this issue Mar 11, 2024
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
rapids-bot bot pushed a commit that referenced this issue Mar 11, 2024
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

Authors:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Nghia Truong (https://github.com/ttnghia)
  - Robert Maynard (https://github.com/robertmaynard)

URL: #15271
@bdice
Copy link
Contributor

bdice commented Mar 11, 2024

Fixed by #15271. I verified that Spark builds in NVIDIA/spark-rapids-jni#1855 are getting further along. I'll be filing a PR to spark-rapids-jni to fix any remaining issues caused by Spark's use of libcudf internal headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CMake CMake build issue libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS
Projects
Archived in project
Development

No branches or pull requests

2 participants