chrxh / alien

ALIEN is a CUDA-powered artificial life simulation program.
https://alien-project.org
BSD 3-Clause "New" or "Revised" License
4.96k stars 158 forks source link

Build fails on Arch Linux #110

Open Swarthe opened 1 week ago

Swarthe commented 1 week ago

When building with the instructions in https://github.com/chrxh/alien/issues/100#issuecomment-2308899636, 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 commented 5 hours ago

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