The github site for XMRig is kind of "cheap" on detailed descriptions on how to build the source-code for OpenSuSE, but I did actually find out how, eventually.

The trick of making a successfull build is to make sure that you have the latest CUDA developer files/API. In the beginning, I was just following whatever instructions XMRig told me to and that was to use either CUDA 8 or 9. I used 9 since I thought that was the lates...WOW...what an idiot I was. Getting build errors like wrong gcc version, undefined value and so on and so on. So a good hint is to find out all prerequisites for building xmrig-nvidia.

  1. What kernel do you have? (4.12.14) (cat /proc/version)
  2. Which version of the gnu-compiler do you have? (7.3.1) (cat /proc/version)
  3. Which c-library versions do you have? (2.26) (ldd --version)

The reason for this is that the CUDA developer API (that you need) have different prerequisites for the different versions. Like I said: I was looking at an older version, CUDA 9, and it did not like my gcc-version or anything else. CUDA Toolkit 10.0 you can download from here. And the prerequisites for the different Linux-versions are here.

I downloaded a RPM-local version. And did what they told me:

sudo rpm -i cuda-repo-opensuse15-10-0-local-10.0.130-410.48-1.0-1.x86_64.rpm
sudo zypper refresh
sudo zypper install cuda

Do whatever yast (zypper) tells you to.

To build the whole XMRig-nvidia package there are a couple of things more you need in addition to CUDA. 

  • cmake
  • make - utilites
  • libuv1
  • git (to get the xmrig-source from github)
  • microhttpd

I don't remember the correct names of these libraries but by using yast it's not a problem to find them. Install the developer-files(-devel). After installing these things, we're ready to go.

Get the source:

git clone https://github.com/xmrig/xmrig-nvidia.git

Go into the root-directory and do the following:
 mkdir build

cd build
cmake ..
make

...and that's it!

You're good to go!

Enjoy!