Building ccminer-cryptonight for Monero mining with NVidia GPU’s on Fedora 25

By | 3 January 2017

I was playing around with Monero crypto-currency mining this weekend and was able to easily get the CPU miner working on my Fedora 25 workstation. I wanted to use my GPU as well since I recently upgraded to an NVidia GTX 1060 and thought it’d be more efficient than CPU only mining. I only found GPU mining software for Windows on the Monero mining page but I did find this blog post after some Google searching. So, I followed the instructions and installed CUDA (I already had the proprietary NVidia drivers installed). I tried to compile the miner but it errored out complaining that “unsupported GNU version! gcc versions later than 5 are not supported!” I figured I was smarter than the system so I opened up the miner.h file and changed the following:
#if ((__GNUC__ > 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
to:
#if ((__GNUC__ > 9) || (__GNUC__ == 8 && __GNUC_MINOR__ >= 3))
It was brute force but it get me a bit further… Problem was, I could now get further into the compile but now there were tons of other errors spewing at me. Figuring there must have been some serious changes from the 4.x to 6.x versions of gcc and g++, I Googled to see if there was a way to force backward compatibility. I found the following flags:
-Xcompiler -std=c++98
I opened up the Makefile and added the above options to the following line:
$(NVCC) -g -O2 -I . -Xptxas "-abi=no -v" $(NVCC_GENCODE) --maxrregcount=80 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
So it ended up looking like:
$(NVCC) -Xcompiler -std=c++98 -g -O2 -I . -Xptxas "-abi=no -v" $(NVCC_GENCODE) --maxrregcount=80 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
I then re-ran make and the software compiled as expected. I tested it out by running:
./ccminer -o stratum+tcp://monerohash.com:3333 -u 42kiF5wF2hFBfUgfGHnkTEFp375wKoXeP6rJG7tf8MnhY5HNiHgAd7GP9GgSfPkqTf25R6qgBskDmHEpN2RRvxhd4BwXma8 -p 1
Its working as expected. Here is some output:
[2017-01-03 16:44:37] Pool set diff to 40541.1
[2017-01-03 16:44:37] Stratum detected new block
[2017-01-03 16:44:38] GPU #0: GeForce GTX 1060 3GB, 395.58 H/s
[2017-01-03 16:44:55] GPU #0: GeForce GTX 1060 3GB, 379.13 H/s
[2017-01-03 16:44:55] accepted: 28/28 (100.00%), 379.13 H/s (yay!!!)
[2017-01-03 16:45:07] Pool set diff to 65541
[2017-01-03 16:45:07] Stratum detected new block
[2017-01-03 16:45:08] GPU #0: GeForce GTX 1060 3GB, 398.29 H/s
[2017-01-03 16:46:09] GPU #0: GeForce GTX 1060 3GB, 396.61 H/s

If this helped you get your GPU miner up and running, feel free to send me some Monero. My wallet address is in the command above! Happy mining. 🙂

One thought on “Building ccminer-cryptonight for Monero mining with NVidia GPU’s on Fedora 25

  1. Gaspartame

    I tried it, but I still got an error, coming from the /usr/local/cuda-6.5/targets/x86_64-linux/include/host_config.h file it seems. There is the error :
    /usr/local/cuda-6.5/bin/../targets/x86_64-linux/include/host_config.h:82:2: error: #error — unsupported GNU version! gcc 4.9 and up are not supported!
    #error — unsupported GNU version! gcc 4.9 and up are not supported!
    ^~~~~

    And the log if it can be useful : http://textup.fr/196752VC
    Have you got an idea of what is going on ?

    Reply

Leave a Reply to Gaspartame Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.