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

xmrig-cuda build error #180

Open
neerajnangireddy opened this issue Mar 9, 2023 · 6 comments
Open

xmrig-cuda build error #180

neerajnangireddy opened this issue Mar 9, 2023 · 6 comments

Comments

@neerajnangireddy
Copy link

make -j$(nproc)
[ 16%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o
[ 16%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/xmrig-cu_generated_AstroBWT.cu.o
[ 16%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero_he/xmrig-cu_generated_AstroBWT_v2.cu.o
[ 22%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_35'
nvcc fatal : Unsupported gpu architecture 'compute_35'
nvcc fatal : Unsupported gpu architecture 'compute_35'
CMake Error at xmrig-cu_generated_KawPow.cu.o.Release.cmake:220 (message):
Error generating
/home/user/xmrig/build/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/./xmrig-cu_generated_KawPow.cu.o

CMake Error at xmrig-cu_generated_AstroBWT.cu.o.Release.cmake:220 (message):
Error generating
/home/user/xmrig/build/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/./xmrig-cu_generated_AstroBWT.cu.o

CMake Error at xmrig-cu_generated_AstroBWT_v2.cu.o.Release.cmake:220 (message):
Error generating
/home/user/xmrig/build/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero_he/./xmrig-cu_generated_AstroBWT_v2.cu.o

make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:147: CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:140: CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero_he/xmrig-cu_generated_AstroBWT_v2.cu.o] Error 1
make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:133: CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/xmrig-cu_generated_AstroBWT.cu.o] Error 1
nvcc fatal : Unsupported gpu architecture 'compute_35'
CMake Error at xmrig-cu_generated_cuda_extra.cu.o.Release.cmake:220 (message):
Error generating
/home/user/xmrig/build/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_extra.cu.o

make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:84: CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/xmrig-cu.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

my specs:
OS: arch
Kernel: 6.2.2-arch1-1
CUDA Version: 11.4
cmake version: 3.25.3

@Dvd-Znf
Copy link

Dvd-Znf commented Mar 12, 2023

I am experiencing the exact same issue
(Maybe this is related to #174 ?)
You can try updating CUDA to the latest version 12.1 and see if anything changes
Also what version of gcc are you using?

@Dvd-Znf
Copy link

Dvd-Znf commented Mar 12, 2023

Found temporary solution for building xmrig-cuda:
Add the -DCUDA_ARCH=(Your compute capability) when using cmake
You can find out your "compute capability" by looking at the official tables provided by nvidia:
https://developer.nvidia.com/cuda-gpus#compute
For example, for my RTX 3050 i used -DCUDA_ARCH=75

However xmrig will still not work showing the message: "Driver does not support CUDA 12.1 API! Update your nVidia driver!"
Even though i am using the latest available drivers, this seems to be an issue with xmrig support for certain drivers

@materia-nigra
Copy link

materia-nigra commented Mar 26, 2023

The solution above did the trick!
As an aside comment, for those trying to compile on ArchLinux, the process is the same as indicated on https://xmrig.com/docs/miner/build/ubuntu, except for different paths: -DCUDA_LIB=/opt/cuda/lib64/stubs/libcuda.so -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda

@MrFoxPro
Copy link

Another way is to install nvidia-beta (530+) on Arch.

@gary9872
Copy link

gary9872 commented May 7, 2023

gcc 13 did not seem to work.

might need to roll back to 12.

@metal3d
Copy link

metal3d commented Jun 7, 2023

see #138 , I presented a solution using "spack" to build with another gcc version.

#138 (comment)

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

6 participants