[cmake-developers] [CMake 0016096]: FindCUDA requires dynamic runtime even if building statically
Mantis Bug Tracker
mantis at public.kitware.com
Fri May 6 15:03:03 EDT 2016
The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=16096
======================================================================
Reported By: Ryan Desmond
Assigned To:
======================================================================
Project: CMake
Issue ID: 16096
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-05-06 15:03 EDT
Last Modified: 2016-05-06 15:03 EDT
======================================================================
Summary: FindCUDA requires dynamic runtime even if building
statically
Description:
In
https://gitlab.kitware.com/cmake/cmake/commit/7fea2b77df2d70283f4918a8ff52836dbc68db6b,
support was added to use the static CUDA libraries. The script still checks for
and requires that the dynamic libraries are installed in order to build
successfully, though they are not needed for a static build.
Steps to Reproduce:
- Setup a machine on which to use build CUDA, which has the static libraries
available
- Remove or delete cudart.so
- Create a cmake script with `find_package(CUDA REQUIRED)`
- When run, the script will fail with:
CMake Error at
/usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148
(message):
Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY) (found version "7.5")
Call Stack (most recent call first):
/usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388
(_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.5/Modules/FindCUDA.cmake:949
(find_package_handle_standard_args)
imagery/CMakeLists.txt:43 (find_package)
Additional Information:
The dynamic library is located at:
725 cuda_find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\"
library")
The static library is located at:
734 cuda_find_library_local_first(CUDA_cudart_static_LIBRARY cudart_static
"static CUDA runtime library")
Later in the script, the variable for the dynamic library is required, even if
the library itself is not required for a successful build.
950 find_package_handle_standard_args(CUDA
951 REQUIRED_VARS
952 CUDA_TOOLKIT_ROOT_DIR
953 CUDA_NVCC_EXECUTABLE
954 CUDA_INCLUDE_DIRS
955 CUDA_CUDART_LIBRARY
956 VERSION_VAR
957 CUDA_VERSION
958 )
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-05-06 15:03 Ryan Desmond New Issue
======================================================================
More information about the cmake-developers
mailing list