Package Details: xmrig-cuda 6.22.1-3

Git Clone URL: https://aur.archlinux.org/xmrig-cuda.git (read-only, click to copy)
Package Base: xmrig-cuda
Description: NVIDIA CUDA plugin for XMRig miner.
Upstream URL: https://github.com/xmrig/xmrig-cuda
Keywords: cryptocurrency gpu miner monero
Licenses: GPL-3.0-or-later
Submitter: hv15
Maintainer: hv15
Last Packager: hv15
Votes: 6
Popularity: 0.000000
First Submitted: 2019-11-14 12:06 (UTC)
Last Updated: 2025-12-28 09:00 (UTC)

Pinned Comments

hv15 commented on 2022-10-14 16:33 (UTC)

Hi all, I no longer use this package and have no interest in maintaining it. Before disowning it I'd ideally like to make someone a co-maintainer. Please reach out if you're interested. Thanks!

Latest Comments

1 2 3 4 5 Next › Last »

hv15 commented on 2025-12-28 09:02 (UTC)

Hi @BenTheTechGuy, thanks for your fix for CUDA 13! I've partially copied over the diff from your PR, but won't change the CMake sources until this is merged upstream.

BenTheTechGuy commented on 2025-12-28 04:15 (UTC)

Below is a diff that will make this package work on CUDA 13+ and GCC 14+. The contents of cuda-13-support.patch is the changes from PR #211, which you can get in patch file form at https://github.com/xmrig/xmrig-cuda/pull/211.patch.

diff --git a/PKGBUILD b/PKGBUILD
index e68222c..714c466 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,25 +6,24 @@ pkgrel=2
 pkgdesc='NVIDIA CUDA plugin for XMRig miner.'
 arch=('x86_64')
 url='https://github.com/xmrig/xmrig-cuda'
-depends=('xmrig>=6.17.0' 'cuda<12.9')
+depends=('xmrig>=6.17.0' 'cuda>=13')
 optdepends=('monero: wallet')
-makedepends=('cmake' 'openssl' 'cuda<12.9')
+makedepends=('cmake' 'openssl' 'cuda>=13')
 license=('GPL-3.0-or-later')
 source=("${url}/archive/v${pkgver}.tar.gz"
-        'fix-compile.patch')
+        'cuda-13-support.patch')
 sha256sums=('0fb1312f000a172fc84191bc260005a801043c61c450db20c08848bda34ce11d'
-            '0f9b42a4eaa9ced9417443dff1ac95574e807a17a2072b9d7e726fe7977997ee')
+            '3d4a915f94f11eea5aa0c7f919660e745c02ac15726363e06d7835b0d0710593')

 prepare () {
   cd "${pkgname}-${pkgver}"
-
-  patch -p1 < ${srcdir}/fix-compile.patch
+  patch -p1 < ${srcdir}/cuda-13-support.patch
 }

 build() {
   cd "${pkgname}-${pkgver}"
-
-  cmake -DCMAKE_POLICY_DEFAULT_CMP0146=OLD -DCMAKE_CXX_FLAGS="-ffat-lto-objects" -DCMAKE_C_COMPILER=${NVCC_CCBIN/g++/gcc} -DCMAKE_CXX_COMPILER=${NVCC_CCBIN} -S . -B build
+  export CUDA_ROOT=/opt/cuda
+  cmake -DCMAKE_POLICY_DEFAULT_CMP0104=OLD -DCMAKE_CXX_FLAGS="-ffat-lto-objects" -DCMAKE_CUDA_COMPILER=${CUDA_ROOT}/bin/nvcc -S . -B build
   cmake --build build
 }

hv15 commented on 2025-07-02 21:01 (UTC)

Sorry @edombek, unfortunately cuda 12.9 and specifically gcc14 is incompatible with xmrig-cuda. I am running into various compilation issues. I've opened an issue with upstream: https://github.com/xmrig/xmrig-cuda/issues/208.

edombek commented on 2025-06-30 21:57 (UTC)

Why gcc13 not in deps?(

brauliobo commented on 2025-02-06 15:10 (UTC) (edited on 2025-02-06 15:16 (UTC) by brauliobo)

can compile with the latest cuda 12.8:

/opt/cuda/include/crt/math_functions.h:5992:1: error: declaration of ‘double cospi(double)’ has a different exception specifier
 5992 | __func__(double cospi(double a));
      | ^~~~~~~~
/opt/cuda/include/crt/math_functions.h:6010:1: error: declaration of ‘float sinpif(float)’ has a different exception specifier
 6010 | __func__(float sinpif(float a));

it seems a conflict with glibc function types

fernandoac commented on 2024-06-28 20:20 (UTC)

if anyone find issues running xmrig-cuda against cuda 12.5 remove cuda 12.5 and install cuda 12.4. just change the PKGBUILD to match cuda 12.4 or compile xmrig-cuda manually applying the patch and using the same commands on the PKGBUILD

hv15 commented on 2024-05-30 14:34 (UTC)

Hi, I've pushed a fix to PKGBUILD, it build now with CUDA 12.5.0.

Thanks @agowa for your analysis, I took your suggestions and applied them to CMake files directly.

Sorry @sidicer, I didn't see your comment sooner, thanks for looking more deeply at LTO. I've added -ffat-lto-objects to the CMake flags.

agowa commented on 2024-05-30 00:51 (UTC)

Using this gcc package: https://aur.archlinux.org/gcc12.git and this line cmake -DCMAKE_CXX_FLAGS="-ffat-lto-objects" -DCUDA_LIB=/usr/local/cuda/lib64/stubs/libcuda.so -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda -DCMAKE_C_COMPILER=/usr/bin/gcc-13 -DCMAKE_CXX_COMPILER=/usr/bin/g++-13 -S . -B build makes it compile successfully again.

agowa commented on 2024-05-29 20:55 (UTC) (edited on 2024-05-29 21:04 (UTC) by agowa)

/opt/cuda/bin/gcc and /opt/cuda/bin/g++ appear to no longer exist. For me this cmake command worked: cmake -DCMAKE_CXX_FLAGS="-ffat-lto-objects" -DCUDA_LIB=/usr/local/cuda/lib64/stubs/libcuda.so -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -S . -B build

regardless of that the actual build afterward still fails because ArchLinux ships GCC 14.1 and that is apparently incompatible... I get the same error as in this forum post and their resolution is basically "there is none, it's not supported."....

https://forums.developer.nvidia.com/t/cuda-12-4-nvcc-and-gcc-14-1-incompatibility/293295

sidicer commented on 2024-05-05 14:51 (UTC) (edited on 2024-05-05 22:47 (UTC) by sidicer)

@hv15 I was building on a GTX780 for testing purposes which uses 11.4 Cuda version, but I installed the latest 12.* Cuda package on the system.
Will remove everything, install 11.* Cuda and update if that worked

But just a heads up as I do not think that was the issue as after building on RTX3080 with latest CUDA i got the same undefined symbol: blake256_hash error.
Hoping for a random missing library or a package 🤞


UPDATE:

Replacing -fno-lto flag with -ffat-lto-objects links libraries but uses LTO which is required for the blake256_hash to build. Currently on RTX3080 machine I was able to build xmrig-cuda and use it with this.
Apologies @hv15 for not investigating more at first

GTX780 not successful

diff --git a/PKGBUILD b/PKGBUILD
index 9afa5d1..33f5ac4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -24,7 +24,7 @@ prepare () {
 build() {
   cd "${pkgname}-${pkgver}"

-  cmake -DCMAKE_CXX_FLAGS="-fno-lto" -DCMAKE_C_COMPILER=/opt/cuda/bin/gcc -DCMAKE_CXX_COMPILER=/opt/cuda/bin/g++ -S . -B build
+  cmake -DCMAKE_CXX_FLAGS="-ffat-lto-objects" -DCMAKE_C_COMPILER=/opt/cuda/bin/gcc -DCMAKE_CXX_COMPILER=/opt/cuda/bin/g++ -S . -B build
   cmake --build build
 }