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

Build fails on Arch Linux #110

Open
Swarthe opened this issue Nov 11, 2024 · 8 comments
Open

Build fails on Arch Linux #110

Swarthe opened this issue Nov 11, 2024 · 8 comments

Comments

@Swarthe
Copy link

Swarthe commented Nov 11, 2024

When building with the instructions in #100 (comment), I get the following error.

CMake Error at /usr/share/cmake/Modules/Internal/CMakeCUDAFindToolkit.cmake:104 (message):
  Failed to find nvcc.

  Compiler requires the CUDA toolkit.  Please set the CUDAToolkit_ROOT
  variable.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeDetermineCUDACompiler.cmake:85 (cmake_cuda_find_toolkit)
  CMakeLists.txt:24 (project)

Building branch v4.10.2 or with the instructions in the README also fails. building with cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_CUDA_COMPILER=/opt/cuda/bin/nvcc, I get

[...]

Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  /usr/share/cmake/Modules/CMakeDetermineCUDACompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:24 (project)

I am using the Arch CUDA package.

@Gardene-el
Copy link
Contributor

Have you checked archlinux wiki for cuda?
What is the output of nvidia-smi in your case?

@Swarthe
Copy link
Author

Swarthe commented Nov 23, 2024

Thank you for your reply. I have the read the Arch Wiki article but didn't find a solution. Here is output of nvidia-smi on my system:

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.57.01              Driver Version: 565.57.01      CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 4070 ...    Off |   00000000:01:00.0 Off |                  N/A |
| N/A   40C    P8              1W /   85W |      15MiB /   8188MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      1045      G   /usr/lib/Xorg                                   4MiB |
+-----------------------------------------------------------------------------------------+

@Gardene-el
Copy link
Contributor

It is OK to build ALIEN with the newest environment in ArchLinux, if some error appeared, comment the add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Werror>) in /alien/CMakeLists.txt. In this case, I suggest you using the newest tools and alien project.

Besides, more information could help solving the problem.

Then your error on building is about the cuda compiler path. This should not be an error since it could be identified generally. To find the problem, could you check the path first?

Ensure nvcc is on the right folder:
which nvcc
example:

/opt/cuda/bin/nvcc

Ensure nvcc is installed correctly:
nvcc --version
example:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Oct_29_23:50:19_PDT_2024
Cuda compilation tools, release 12.6, V12.6.85
Build cuda_12.6.r12.6/compiler.35059454_0

Check if nvcc identified by cmake:
grep -i cuda CMakeCache.txt in the build folder
examples:

//CUDA compiler
CMAKE_CUDA_COMPILER:FILEPATH=/opt/cuda/bin/nvcc
//Flags used by the CUDA compiler during all build types.
CMAKE_CUDA_FLAGS:STRING=
//Flags used by the CUDA compiler during DEBUG builds.
CMAKE_CUDA_FLAGS_DEBUG:STRING=-g
//Flags used by the CUDA compiler during MINSIZEREL builds.
CMAKE_CUDA_FLAGS_MINSIZEREL:STRING=-O1 -DNDEBUG
//Flags used by the CUDA compiler during RELEASE builds.
CMAKE_CUDA_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the CUDA compiler during RELWITHDEBINFO builds.
CMAKE_CUDA_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CUDAToolkit_CUPTI_INCLUDE_DIR:PATH=/opt/cuda/targets/x86_64-linux/include/../../../extras/CUPTI/include
CUDAToolkit_rt_LIBRARY:FILEPATH=/usr/lib/librt.a
CUDA_CUDART:FILEPATH=/opt/cuda/lib/libcudart.so
CUDA_OpenCL_LIBRARY:FILEPATH=/opt/intel/oneapi/compiler/2024.1/lib/libOpenCL.so
CUDA_cuFile_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcufile.so
CUDA_cuFile_rdma_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcufile_rdma.so
CUDA_cuFile_rdma_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcufile_rdma_static.a
CUDA_cuFile_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcufile_static.a
CUDA_cublasLt_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcublasLt.so
CUDA_cublasLt_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcublasLt_static.a
CUDA_cublas_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcublas.so
CUDA_cublas_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcublas_static.a
CUDA_cuda_driver_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/stubs/libcuda.so
CUDA_cudart_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcudart.so
CUDA_cudart_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcudart_static.a
CUDA_cudla_LIBRARY:FILEPATH=CUDA_cudla_LIBRARY-NOTFOUND
CUDA_cufft_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcufft.so
CUDA_cufft_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcufft_static.a
CUDA_cufft_static_nocallback_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcufft_static_nocallback.a
CUDA_cufftw_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcufftw.so
CUDA_cufftw_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcufftw_static.a
CUDA_culibos_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libculibos.a
CUDA_cupti_LIBRARY:FILEPATH=/opt/cuda/extras/CUPTI/lib64/libcupti.so
CUDA_cupti_static_LIBRARY:FILEPATH=/opt/cuda/extras/CUPTI/lib64/libcupti_static.a
CUDA_curand_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcurand.so
CUDA_curand_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcurand_static.a
CUDA_cusolver_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcusolver.so
CUDA_cusolver_lapack_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcusolver_lapack_static.a
CUDA_cusolver_metis_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcusolver_metis_static.a
CUDA_cusolver_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcusolver_static.a
CUDA_cusparse_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcusparse.so
CUDA_cusparse_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libcusparse_static.a
CUDA_nppc_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppc.so
CUDA_nppc_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppc_static.a
CUDA_nppial_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppial.so
CUDA_nppial_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppial_static.a
CUDA_nppicc_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppicc.so
CUDA_nppicc_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppicc_static.a
CUDA_nppicom_LIBRARY:FILEPATH=CUDA_nppicom_LIBRARY-NOTFOUND
CUDA_nppicom_static_LIBRARY:FILEPATH=CUDA_nppicom_static_LIBRARY-NOTFOUND
CUDA_nppidei_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppidei.so
CUDA_nppidei_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppidei_static.a
CUDA_nppif_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppif.so
CUDA_nppif_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppif_static.a
CUDA_nppig_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppig.so
CUDA_nppig_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppig_static.a
CUDA_nppim_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppim.so
CUDA_nppim_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppim_static.a
CUDA_nppist_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppist.so
CUDA_nppist_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppist_static.a
CUDA_nppisu_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppisu.so
CUDA_nppisu_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppisu_static.a
CUDA_nppitc_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppitc.so
CUDA_nppitc_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnppitc_static.a
CUDA_npps_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnpps.so
CUDA_npps_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnpps_static.a
CUDA_nvJitLink_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvJitLink.so
CUDA_nvJitLink_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvJitLink_static.a
CUDA_nvToolsExt_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvToolsExt.so
CUDA_nvfatbin_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvfatbin.so
CUDA_nvfatbin_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvfatbin_static.a
CUDA_nvgraph_LIBRARY:FILEPATH=CUDA_nvgraph_LIBRARY-NOTFOUND
CUDA_nvgraph_static_LIBRARY:FILEPATH=CUDA_nvgraph_static_LIBRARY-NOTFOUND
CUDA_nvjpeg_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvjpeg.so
CUDA_nvjpeg_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvjpeg_static.a
CUDA_nvml_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/stubs/libnvidia-ml.so
CUDA_nvml_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/stubs/libnvidia-ml.a
CUDA_nvperf_host_LIBRARY:FILEPATH=/opt/cuda/extras/CUPTI/lib64/libnvperf_host.so
CUDA_nvperf_host_static_LIBRARY:FILEPATH=/opt/cuda/extras/CUPTI/lib64/libnvperf_host_static.a
CUDA_nvperf_target_LIBRARY:FILEPATH=/opt/cuda/extras/CUPTI/lib64/libnvperf_target.so
CUDA_nvptxcompiler_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvptxcompiler_static.a
CUDA_nvrtc_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvrtc.so
CUDA_nvrtc_builtins_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvrtc-builtins.so
CUDA_nvrtc_builtins_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvrtc-builtins_static.a
CUDA_nvrtc_static_LIBRARY:FILEPATH=/opt/cuda/targets/x86_64-linux/lib/libnvrtc_static.a
CUDA_pcsamplingutil_LIBRARY:FILEPATH=/opt/cuda/extras/CUPTI/lib64/libpcsamplingutil.so
//ADVANCED property for variable: CMAKE_CUDA_COMPILER
CMAKE_CUDA_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CUDA_FLAGS
CMAKE_CUDA_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CUDA_FLAGS_DEBUG
CMAKE_CUDA_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CUDA_FLAGS_MINSIZEREL
CMAKE_CUDA_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CUDA_FLAGS_RELEASE
CMAKE_CUDA_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CUDA_FLAGS_RELWITHDEBINFO
CMAKE_CUDA_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDAToolkit_CUPTI_INCLUDE_DIR
CUDAToolkit_CUPTI_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDAToolkit_rt_LIBRARY
CUDAToolkit_rt_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_CUDART
CUDA_CUDART-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_OpenCL_LIBRARY
CUDA_OpenCL_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cuFile_LIBRARY
CUDA_cuFile_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cuFile_rdma_LIBRARY
CUDA_cuFile_rdma_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cuFile_rdma_static_LIBRARY
CUDA_cuFile_rdma_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cuFile_static_LIBRARY
CUDA_cuFile_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cublasLt_LIBRARY
CUDA_cublasLt_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cublasLt_static_LIBRARY
CUDA_cublasLt_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cublas_LIBRARY
CUDA_cublas_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cublas_static_LIBRARY
CUDA_cublas_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cuda_driver_LIBRARY
CUDA_cuda_driver_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cudart_LIBRARY
CUDA_cudart_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cudart_static_LIBRARY
CUDA_cudart_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cudla_LIBRARY
CUDA_cudla_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cufft_LIBRARY
CUDA_cufft_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cufft_static_LIBRARY
CUDA_cufft_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cufft_static_nocallback_LIBRARY
CUDA_cufft_static_nocallback_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cufftw_LIBRARY
CUDA_cufftw_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cufftw_static_LIBRARY
CUDA_cufftw_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_culibos_LIBRARY
CUDA_culibos_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cupti_LIBRARY
CUDA_cupti_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cupti_static_LIBRARY
CUDA_cupti_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_curand_LIBRARY
CUDA_curand_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_curand_static_LIBRARY
CUDA_curand_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cusolver_LIBRARY
CUDA_cusolver_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cusolver_lapack_static_LIBRARY
CUDA_cusolver_lapack_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cusolver_metis_static_LIBRARY
CUDA_cusolver_metis_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cusolver_static_LIBRARY
CUDA_cusolver_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cusparse_LIBRARY
CUDA_cusparse_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cusparse_static_LIBRARY
CUDA_cusparse_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppc_LIBRARY
CUDA_nppc_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppc_static_LIBRARY
CUDA_nppc_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppial_LIBRARY
CUDA_nppial_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppial_static_LIBRARY
CUDA_nppial_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppicc_LIBRARY
CUDA_nppicc_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppicc_static_LIBRARY
CUDA_nppicc_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppicom_LIBRARY
CUDA_nppicom_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppicom_static_LIBRARY
CUDA_nppicom_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppidei_LIBRARY
CUDA_nppidei_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppidei_static_LIBRARY
CUDA_nppidei_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppif_LIBRARY
CUDA_nppif_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppif_static_LIBRARY
CUDA_nppif_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppig_LIBRARY
CUDA_nppig_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppig_static_LIBRARY
CUDA_nppig_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppim_LIBRARY
CUDA_nppim_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppim_static_LIBRARY
CUDA_nppim_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppist_LIBRARY
CUDA_nppist_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppist_static_LIBRARY
CUDA_nppist_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppisu_LIBRARY
CUDA_nppisu_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppisu_static_LIBRARY
CUDA_nppisu_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppitc_LIBRARY
CUDA_nppitc_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppitc_static_LIBRARY
CUDA_nppitc_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_npps_LIBRARY
CUDA_npps_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_npps_static_LIBRARY
CUDA_npps_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvJitLink_LIBRARY
CUDA_nvJitLink_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvJitLink_static_LIBRARY
CUDA_nvJitLink_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvToolsExt_LIBRARY
CUDA_nvToolsExt_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvfatbin_LIBRARY
CUDA_nvfatbin_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvfatbin_static_LIBRARY
CUDA_nvfatbin_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvgraph_LIBRARY
CUDA_nvgraph_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvgraph_static_LIBRARY
CUDA_nvgraph_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvjpeg_LIBRARY
CUDA_nvjpeg_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvjpeg_static_LIBRARY
CUDA_nvjpeg_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvml_LIBRARY
CUDA_nvml_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvml_static_LIBRARY
CUDA_nvml_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvperf_host_LIBRARY
CUDA_nvperf_host_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvperf_host_static_LIBRARY
CUDA_nvperf_host_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvperf_target_LIBRARY
CUDA_nvperf_target_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvptxcompiler_static_LIBRARY
CUDA_nvptxcompiler_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvrtc_LIBRARY
CUDA_nvrtc_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvrtc_builtins_LIBRARY
CUDA_nvrtc_builtins_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvrtc_builtins_static_LIBRARY
CUDA_nvrtc_builtins_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nvrtc_static_LIBRARY
CUDA_nvrtc_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_pcsamplingutil_LIBRARY
CUDA_pcsamplingutil_LIBRARY-ADVANCED:INTERNAL=1
//Details about finding CUDAToolkit
FIND_PACKAGE_MESSAGE_DETAILS_CUDAToolkit:INTERNAL=[/opt/cuda/targets/x86_64-linux/include][/opt/cuda/lib/libcudart.so][/opt/cuda/bin][v12.6.85()]
_CMAKE_CUDA_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE

If the only problem is in CMake, you may try reinstall the CMake (uninstall then install), and manually add the cuda path into your terminal configuration file, like .bashrc file.

@Swarthe
Copy link
Author

Swarthe commented Nov 26, 2024

comment the add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Werror>)

I have also tried this, but the same compile error occurs.

Ensure nvcc is on the right folder

/opt/cuda/bin/nvcc --version returns the following:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Oct_29_23:50:19_PDT_2024
Cuda compilation tools, release 12.6, V12.6.85
Build cuda_12.6.r12.6/compiler.35059454_0

Check if nvcc identified by cmake

Interestingly, grep -i cuda CMakeCache.txt only returns this:

//CUDA compiler
CMAKE_CUDA_COMPILER:STRING=/opt/cuda/bin/nvcc
//ADVANCED property for variable: CMAKE_CUDA_COMPILER
CMAKE_CUDA_COMPILER-ADVANCED:INTERNAL=1

For reference, this is the complete compile error for cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_COMPILER=/opt/cuda/bin/nvcc.

@Gardene-el
Copy link
Contributor

Since the err.txt contains

CMake Deprecation Warning at external/vcpkg/scripts/buildsystems/vcpkg.cmake:40 (cmake_policy):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.
Call Stack (most recent call first):
  build/CMakeFiles/3.31.1/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:24 (project)

this warning, could you update the cmake to the newest version and try again?

@Swarthe
Copy link
Author

Swarthe commented Dec 10, 2024

My installation is on the latest version.

$ cmake --version
cmake version 3.31.2
[...]

This seems to be an issue with the CMakeLists.txt file.

@Gardene-el
Copy link
Contributor

Gardene-el commented Dec 10, 2024

Oh, i've seen the err.txt fully.
The problem here is that your compile tools:

There are reported build issues with (updated: 2024-06-22)
* GCC 12+ (version 11 should work)
* Visual Studio 17.10 (version 17.9 should work)
* CUDA 12.5 (version 12.4 should work)

This is a copy of README.md, may you follow that and adjust the gcc version(try 11, 12 and 13)?

@Swarthe
Copy link
Author

Swarthe commented Dec 10, 2024

This was one of the first things I tried. Compiling with GCC 11 for example results in the same error.

$ CUDACXX=/opt/cuda/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCUDAToolkit_ROOT=/opt/cuda/bin
[...]
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  /usr/share/cmake/Modules/CMakeDetermineCUDACompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:24 (project)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants