Skip to content

missing links to gcc and g++

Description:

After updating the cuda package (12.4.1-4 -> 12.5.0-1), I was not able to configure my CUDA-projects with CMake anymore.

CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:814 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler: /opt/cuda/bin/nvcc

  Build flags:

  Id flags: --keep;--keep-dir;tmp -v



  The output was:

  1

  /opt/cuda/bin/gcc: No such file or directory

  nvcc fatal : Failed to preprocess host compiler properties.





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:87 (enable_language)


-- Configuring incomplete, errors occurred!

The problem is that the files /opt/cuda/bin/gcc and /opt/cuda/bin/g++ do not exist anymore. I could fix it by linking gcc-13 and g++-13 manually:

ln -s /usr/bin/gcc-13 /opt/cuda/bin/gcc
ln -s /usr/bin/g++-13 /opt/cuda/bin/g++

The old package cuda 12.4.1-4 does have these links.

Edited by Pascal
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information