Open aleqx opened 3 years ago
I have one compiled on Debian testing cuda 11. If you want you can try it out. libxmrig-cuda.so.zip
@DeeDeeRanged thanks for the kind offer, but I was making the point that these should be published with each release automatically for all to benefit (auto builders can do that).
I have one compiled on Debian testing cuda 11. If you want you can try it out. libxmrig-cuda.so.zip
Can you please share those commands step by step?
Sorry for the late reply.
On Debian testing/bullseye for GTX1050 or higher (NO legacy drivers): All official debian testing/bullseye repo's with main contrib non-free enabled.
I am in the proces making a script for myself which checks/installs the required packages and compiles the lot, but I want to make sure it's working correctly and compiles libxmrig-cuda.so reproducible.
Hope the above helps.
@DeeDeeRanged thanks for the kind offer, but I was making the point that these should be published with each release automatically for all to benefit (auto builders can do that).
You would need a variety of nvidia cards as cuda ranges from cuda 8 to cuda 11. Haven't seen any cuda 12 yet on linux.
It's a bit more involved since for the library to work there would have to be versions built for every Ubuntu and every CUDA toolkit which means like 11 * (14, 16, 18, 20, 21) = 55 different builds. As opposed to one build per CUDA toolkit for Windows because Windows DLLs load on whatever Windows version just fine (no glibc or other basic kernels changing).
Better scripts to walk-through the building yourself are probably the real answer.
I figured it was something like that. It's one of the reasons I am trying to make a script that might work on different versions of Debian/Ubuntu. With the walkthrough I've tried to be as clear/sensible as I could be as I don't know the level of skills of ppl.
This command cmake .. -DCUDA_LIB=/usr/lib/x86_64-linux-gnu/stubs/libcuda.so -DCUDA_TOOLKIT_ROOT_DIR=/usr/lib/nvidia-cuda-toolkit
gives this error:
Could NOT find CUDA (missing: CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS
CUDA_CUDART_LIBRARY) (Required is at least version "8.0")
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.16/Modules/FindCUDA.cmake:1104 (find_package_handle_standard_args)
cmake/CUDA-Version.cmake:14 (find_package)
CMakeLists.txt:3 (include)
Which distro and videocard? Are "git build-essential cmake libuv1-dev libssl-dev libhwloc-dev nvidia-driver libcuda1 and nvidia-smi" installed, check if /usr/lib/x86_64-linux-gnu/stubs/libcuda.so and /usr/lib/nvidia-cuda-toolkit are available.
CUDA Toolkit is usually in /usr/local/cuda
or /usr/local/cuda-11.4
(or whichever version) if the symlink wasn't generated.
Do not supply anything but the CUDA_TOOLKIT_ROOT_DIR
, *_LIB
are intended to be set internally not overridden (if the rootdir doesn't work by itself, the toolkit is broken/incomplete).
@Spudz76
CUDA Toolkit is usually in
/usr/local/cuda
or/usr/local/cuda-11.4
(or whichever version) if the symlink wasn't generated.Do not supply anything but the
CUDA_TOOLKIT_ROOT_DIR
,*_LIB
are intended to be set internally not overridden (if the rootdir doesn't work by itself, the toolkit is broken/incomplete).
You are correct abt. only using -DCUDA_TOOLKIT_ROOT_DIR=/usr/lib/nvidia-cuda-toolkit
just did a build and it works on both my Debian systems.
The instructions on https://xmrig.com/docs/miner/build/ubuntu are for Ubuntu with the cuda downloaded/installed from Nvidia directly and derived the build instructions from there to use it with Debian official repositories.
Thanks for the pointer.
To mess things up more, I use the Nvidia packages but have put them on my own repo mirror so it picks them up off the Internet. Similar to if Nvidia themselves bothered to host a live repo...
But the result is functionally the same as using the Nvidia installer minus the "local repo" hack it uses.
And thus I don't really know where the Debian upstream cuda goes, it's old-ish so I've always ignored it. Maybe the search locations need updated so there is less need to specify the ROOT
.
You'll find video drivers and so on depending if your running stable + backports or testing in line with ubuntu and are quite uptodate. Just checked ubuntu is putting the nvidia-toolkit also in the same place as debian. So for debian and ubuntu using the drivers and toolkit from the debian/ubuntu repos works fine. No need to use the ones from nvidia direct.
Would make everyone's life easier, including yourself (less requests for help with building or building errors)