Nvlink error : Undefined reference to '__cudaCDP2GetLastError

Hi Experts,

My project works well on desktop with RTX4060, when I move to Jetson AGX Orin I see this error.

Any comments on this?

Thanks!

[ 33%] Linking CUDA device code CMakeFiles/unittest.dir/cmake_device_link.o
nvlink error   : Undefined reference to '__cudaCDP2GetLastError' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
nvlink error   : Undefined reference to '__cudaCDP2GetErrorString' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
nvlink error   : Undefined reference to '__cudaCDP2GetErrorName' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
nvlink error   : Undefined reference to '__cudaCDP2MemcpyAsync' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
make[2]: *** [src/unittest/CMakeFiles/unittest.dir/build.make:115: src/unittest/CMakeFiles/unittest.dir/cmake_device_link.o] Error 255
make[1]: *** [CMakeFiles/Makefile2:1480: src/unittest/CMakeFiles/unittest.dir/all] Error 2
[ 33%] Linking CXX static library libtask_manager.a
[ 33%] Built target task_manager
[ 34%] Linking CUDA device code CMakeFiles/musicSim.dir/cmake_device_link.o
nvlink error   : Undefined reference to '__cudaCDP2GetLastError' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
nvlink error   : Undefined reference to '__cudaCDP2GetErrorString' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
nvlink error   : Undefined reference to '__cudaCDP2GetErrorName' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
nvlink error   : Undefined reference to '__cudaCDP2MemcpyAsync' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
make[2]: *** [src/unittest/CMakeFiles/musicSim.dir/build.make:132: src/unittest/CMakeFiles/musicSim.dir/cmake_device_link.o] Error 255
make[1]: *** [CMakeFiles/Makefile2:1508: src/unittest/CMakeFiles/musicSim.dir/all] Error 2
[ 35%] Linking CUDA device code CMakeFiles/test_eigen.dir/cmake_device_link.o
nvlink error   : Undefined reference to '__cudaCDP2GetLastError' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
nvlink error   : Undefined reference to '__cudaCDP2GetErrorString' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
nvlink error   : Undefined reference to '__cudaCDP2GetErrorName' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
nvlink error   : Undefined reference to '__cudaCDP2MemcpyAsync' in '../main/cuda_lib/libcuda_lib.a:cuDOA.cu.o'
make[2]: *** [src/unittest/CMakeFiles/test_eigen.dir/build.make:132: src/unittest/CMakeFiles/test_eigen.dir/cmake_device_link.o] Error 255
make[1]: *** [CMakeFiles/Makefile2:1536: src/unittest/CMakeFiles/test_eigen.dir/all] Error 2
make: *** [Makefile:121: all] Error 2

This is my dockerfile

cmake_minimum_required(VERSION 3.10)
set(CMAKE_CUDA_COMPILER /usr/local/cuda/bin/nvcc)

project(cudadev LANGUAGES C CXX CUDA)
enable_testing()

set(CMAKE_BUILD_TYPE Debug)
enable_testing()
cmake_policy(SET CMP0104 OLD)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(CPack)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})

find_package(CUDA 12.3 REQUIRED)

# Set CUDA compiler flags
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -std=c++17 --extended-lambda -Xcudafe --diag_suppress=997 -rdc=true -g -G")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Add the -G flag for debug builds
set(CUDA_NVCC_FLAGS "-g -G")

# For dynamic parallelism
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)

link_libraries(${CUDA_LIBRARIES} ${CUDA_curand_LIBRARY} ${CUDA_cusolver_LIBRARY} ${CUDA_cublas_LIBRARY} ${CUDA_cufft_LIBRARY})

CMake is not a NVIDIA product. If you want help, my suggestion would be to provide the actual failing compile command, which can be gotten from CMake verbose output.

I would also recommend that you provide the file in question, or a suitable variant, that is failing.

Since the issue may be jetson-specific, you may also get better help asking on a Jetson forum.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.