xmrig / xmrig-cuda

NVIDIA CUDA plugin for XMRig miner
GNU General Public License v3.0
377 stars 155 forks source link

strange build error on Ubuntu 22.04 #178

Closed dr-ni closed 1 year ago

dr-ni commented 1 year ago

any advice for this?

u@pc:~/xmrig-cuda$ make 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/uwe/xmrig-cuda
[  5%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/xmrig-cu_generated_AstroBWT.cu.o
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
CMake Error at xmrig-cu_generated_AstroBWT.cu.o.Release.cmake:280 (message):
  Error generating file
  /home/uwe/xmrig-cuda/CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/./xmrig-cu_generated_AstroBWT.cu.o

make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:859: CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/xmrig-cu_generated_AstroBWT.cu.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/xmrig-cu.dir/all] Fehler 2
make: *** [Makefile:91: all] Fehler 2
dr-ni commented 1 year ago

found solution in #138

sudo apt install gcc-9 g++-9
cmake -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9 -DCUDA_TOOLKIT_ROOT_DIR="/usr/lib/cuda" .