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] Failing to run cmake configure in a Conda environment with -DBUILD_SHARED_LIBS=OFF #9718

Closed
kkraus14 opened this issue Nov 17, 2021 · 6 comments
Labels
bug Something isn't working CMake CMake build issue

Comments

@kkraus14
Copy link
Collaborator

kkraus14 commented Nov 17, 2021

Describe the bug

I'm trying to build libcudf in my local conda development environment with -DBUILD_SHARED_LIBS=OFF and it fails from not having conda_env in any export set.

Log:

(dev) keith@Keith-PC:~/git/cudf/cpp/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_SHARED_LIBS=OFF --log-level=VERBOSE
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- The CUDA compiler identification is NVIDIA 11.5.119
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/keith/miniconda3/envs/dev/bin/x86_64-conda-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/keith/miniconda3/envs/dev/bin/x86_64-conda-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda-11.5/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- CUDF: Build with NVTX support: ON
-- CUDF: Configure CMake to build tests: OFF
-- CUDF: Configure CMake to build (google & nvbench) benchmarks: OFF
-- CUDF: Build cuDF shared libraries: OFF
-- CUDF: Use a file cache for JIT compiled kernels: ON
-- CUDF: Build and statically link Arrow libraries: OFF
-- CUDF: Build and enable S3 filesystem support for Arrow: ON
-- CUDF: Build with per-thread default stream: OFF
-- CUDF: Disable warnings generated from deprecated declarations: OFF
-- CUDF: Enable the -lineinfo option for nvcc (useful for cuda-memcheck / profiler: OFF
-- CUDF: Statically link the CUDA runtime: OFF
-- CUDF: RMM_LOGGING_LEVEL = 'INFO'.
-- Conda environment detected, CMAKE_PREFIX_PATH set to: /home/keith/miniconda3/envs/dev
-- Found CUDAToolkit: /usr/local/cuda-11.5/include (found version "11.5.119")
-- Found ZLIB: /home/keith/miniconda3/envs/dev/lib/libz.so (found version "1.2.11")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Downloading CPM.cmake to /home/keith/git/cudf/cpp/build/cmake/CPM_634800c61928d330a6e9559171509a5c3dd479d5.cmake
-- CPM: adding package [email protected] (cudf_0.19)
-- CPM: adding package [email protected] (c435afaf4ba8a8d12f379d688effcb185886cec1)
Release build.
-- Finding CUB
Build nvCOMP version 2.1.0
-- CPM: adding package [email protected] (1.15.0)
-- Thrust: TargetInfo: Thrust::Thrust: (1.15.0.0)
-- Thrust: TargetInfo: Thrust::Thrust > ALIASED_TARGET: _Thrust_Thrust
-- Thrust: TargetInfo: Thrust::Thrust > INTERFACE_INCLUDE_DIRECTORIES: /home/keith/git/cudf/cpp/build/_deps/thrust-src
-- Found Thrust: /home/keith/git/cudf/cpp/build/_deps/thrust-src/thrust/cmake/thrust-config.cmake (found version "1.15.0.0")
-- Thrust: Assembling target cudf::Thrust. Options: FROM_OPTIONS
-- Thrust: Creating system cache options: (advanced=FALSE)
-- Thrust:   - Host Option=THRUST_HOST_SYSTEM Default=CPP Doc='Thrust host system.'
-- Thrust:   - Device Option=THRUST_DEVICE_SYSTEM Default=CUDA Doc='Thrust device system.'
-- Thrust: Current option settings:
-- Thrust:   - THRUST_HOST_SYSTEM=CPP
-- Thrust:   - THRUST_DEVICE_SYSTEM=CUDA
-- Thrust: Generating CPP targets.
-- Thrust: TargetInfo: Thrust::CPP: (Thrust 1.15.0.0)
-- Thrust: TargetInfo: Thrust::CPP > ALIASED_TARGET: _Thrust_CPP
-- Thrust: TargetInfo: Thrust::CPP > INTERFACE_LINK_LIBRARIES: Thrust::Thrust
-- Thrust: TargetInfo: Thrust::CPP::Host:
-- Thrust: TargetInfo: Thrust::CPP::Host > ALIASED_TARGET: _Thrust_CPP_Host
-- Thrust: TargetInfo: Thrust::CPP::Host > INTERFACE_COMPILE_DEFINITIONS: THRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_CPP
-- Thrust: TargetInfo: Thrust::CPP::Host > INTERFACE_LINK_LIBRARIES: Thrust::CPP
-- Thrust: TargetInfo: Thrust::CPP::Host > INTERFACE_THRUST_HOST: CPP
-- Thrust: TargetInfo: Thrust::CPP::Device:
-- Thrust: TargetInfo: Thrust::CPP::Device > ALIASED_TARGET: _Thrust_CPP_Device
-- Thrust: TargetInfo: Thrust::CPP::Device > INTERFACE_COMPILE_DEFINITIONS: THRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CPP
-- Thrust: TargetInfo: Thrust::CPP::Device > INTERFACE_LINK_LIBRARIES: Thrust::CPP
-- Thrust: TargetInfo: Thrust::CPP::Device > INTERFACE_THRUST_DEVICE: CPP
-- Thrust: Searching for CUB REQUIRED
-- Found CUB: /home/keith/git/cudf/cpp/build/_deps/thrust-src/dependencies/cub/cub/cmake/cub-config.cmake (found version "1.15.0.0")
-- Thrust: Setting CUB target to CUB::CUB
-- Thrust: TargetInfo: CUB::CUB: (1.15.0.0)
-- Thrust: TargetInfo: CUB::CUB > ALIASED_TARGET: _CUB_CUB
-- Thrust: TargetInfo: CUB::CUB > INTERFACE_INCLUDE_DIRECTORIES: /home/keith/git/cudf/cpp/build/_deps/thrust-src/dependencies/cub
-- Thrust: TargetInfo: Thrust::CUDA: (CUB 1.15.0.0)
-- Thrust: TargetInfo: Thrust::CUDA > ALIASED_TARGET: _Thrust_CUDA
-- Thrust: TargetInfo: Thrust::CUDA > INTERFACE_LINK_LIBRARIES: Thrust::Thrust;CUB::CUB
-- Thrust: TargetInfo: Thrust::CUDA::Device:
-- Thrust: TargetInfo: Thrust::CUDA::Device > ALIASED_TARGET: _Thrust_CUDA_Device
-- Thrust: TargetInfo: Thrust::CUDA::Device > INTERFACE_COMPILE_DEFINITIONS: THRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA
-- Thrust: TargetInfo: Thrust::CUDA::Device > INTERFACE_LINK_LIBRARIES: Thrust::CUDA
-- Thrust: TargetInfo: Thrust::CUDA::Device > INTERFACE_THRUST_DEVICE: CUDA
-- Thrust: TargetInfo: cudf::Thrust: (Thrust 1.15.0.0)
-- Thrust: TargetInfo: cudf::Thrust > IMPORTED: TRUE
-- Thrust: TargetInfo: cudf::Thrust > INTERFACE_LINK_LIBRARIES: Thrust::CPP::Host;Thrust::CUDA::Device
-- CPM: adding package [email protected] (branch-22.02)
-- RMM: RMM_LOGGING_LEVEL = 'INFO'
-- CPM: rmm: using local package [email protected]
-- Thrust: Assembling target rmm::Thrust. Options: FROM_OPTIONS
-- Thrust: Creating system cache options: (advanced=FALSE)
-- Thrust:   - Host Option=THRUST_HOST_SYSTEM Default=CPP Doc='Thrust host system.'
-- Thrust:   - Device Option=THRUST_DEVICE_SYSTEM Default=CUDA Doc='Thrust device system.'
-- Thrust: Current option settings:
-- Thrust:   - THRUST_HOST_SYSTEM=CPP
-- Thrust:   - THRUST_DEVICE_SYSTEM=CUDA
-- Thrust: TargetInfo: rmm::Thrust: (Thrust 1.15.0.0)
-- Thrust: TargetInfo: rmm::Thrust > IMPORTED: TRUE
-- Thrust: TargetInfo: rmm::Thrust > INTERFACE_LINK_LIBRARIES: Thrust::CPP::Host;Thrust::CUDA::Device
-- CPM: using local package [email protected]
-- CPM: adding package [email protected] (v0.5)
-- CPM: adding package [email protected] (1.6.0)
-- CPM: adding package [email protected] (193de1aa74f5721717f991ca757dc610c852bb17)
-- Thrust: Assembling target cuco::Thrust. Options: FROM_OPTIONS
-- Thrust: Creating system cache options: (advanced=FALSE)
-- Thrust:   - Host Option=THRUST_HOST_SYSTEM Default=CPP Doc='Thrust host system.'
-- Thrust:   - Device Option=THRUST_DEVICE_SYSTEM Default=CUDA Doc='Thrust device system.'
-- Thrust: Current option settings:
-- Thrust:   - THRUST_HOST_SYSTEM=CPP
-- Thrust:   - THRUST_DEVICE_SYSTEM=CUDA
-- Thrust: TargetInfo: cuco::Thrust: (Thrust 1.15.0.0)
-- Thrust: TargetInfo: cuco::Thrust > IMPORTED: TRUE
-- Thrust: TargetInfo: cuco::Thrust > INTERFACE_LINK_LIBRARIES: Thrust::CPP::Host;Thrust::CUDA::Device
CMake Warning at build/cmake/CPM_634800c61928d330a6e9559171509a5c3dd479d5.cmake:273 (message):
  CPM: cuco: requires a newer version of libcudacxx (1.7.0) than currently
  included (1.6.0).
Call Stack (most recent call first):
  build/_deps/rapids-cmake-src/rapids-cmake/cpm/find.cmake:156 (cpm_check_if_package_already_added)
  build/_deps/rapids-cmake-src/rapids-cmake/cpm/libcudacxx.cmake:68 (rapids_cpm_find)
  build/_deps/cuco-src/cmake/thirdparty/get_libcudacxx.cmake:30 (rapids_cpm_libcudacxx)
  build/_deps/cuco-src/cmake/thirdparty/get_libcudacxx.cmake:35 (find_and_configure_libcudacxx)
  build/_deps/cuco-src/CMakeLists.txt:63 (include)


-- CPM: using local package [email protected]
-- Could NOT find cuFile (missing: cuFile_LIBRARY cuFileRDMA_LIBRARY cuFile_INCLUDE_DIR)
-- Configuring done
CMake Error: install(EXPORT "cudf-exports" ...) includes target "cudf" which requires target "conda_env" that is not in any export set.
CMake Error in CMakeLists.txt:
  export called with target "cudf" which requires target "conda_env" that is
  not in any export set.


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

I'm using the Conda host compilers without the conda nvcc shim package with cmake 3.21.3.

@kkraus14 kkraus14 added bug Something isn't working CMake CMake build issue conda labels Nov 17, 2021
@github-actions
Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

@kkraus14
Copy link
Collaborator Author

I can no longer reproduce this so may have been an environment issue at the time. Going to close this and will reopen if I can reproduce.

@kkraus14 kkraus14 reopened this Jan 10, 2022
@kkraus14 kkraus14 changed the title [BUG] Failing to run cmake configure in a Conda environment [BUG] Failing to run cmake configure in a Conda environment with -DBUILD_SHARED_LIBS=OFF Jan 10, 2022
@kkraus14
Copy link
Collaborator Author

Updated original message above, this only reproduces when trying to build a static library by setting -DBUILD_SHARED_LIBS=OFF.

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

@github-actions
Copy link

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

@vyasr
Copy link
Contributor

vyasr commented May 13, 2024

This was fixed in #10704

@vyasr vyasr closed this as completed May 13, 2024
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
Projects
None yet
Development

No branches or pull requests

3 participants