Bitcoin Forum
November 11, 2024, 12:11:45 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [XMR] Tutorial: How to compile your mining software on Linux ?  (Read 11082 times)
Sylon (OP)
Legendary
*
Offline Offline

Activity: 1568
Merit: 1169



View Profile
September 11, 2016, 06:16:24 PM
Last edit: September 16, 2016, 05:40:37 PM by Sylon
 #1





█████████████
███████████
████████████
███████████
████████████
█████████
██████████
██████████
███████████
█████████████
████████████
█████████████
█████████████
High Efficiency | Ultra Stability
Advanced Payment System | Core Devs Donation
█████████████
███████████
████████████
███████████
████████████
█████████
██████████
██████████
███████████
█████████████
████████████
█████████████
█████████████













Sylon (OP)
Legendary
*
Offline Offline

Activity: 1568
Merit: 1169



View Profile
September 11, 2016, 06:16:36 PM
Last edit: September 16, 2016, 03:09:59 PM by Sylon
 #2







Code:
sudo apt-get install build-essential  automake autoconf git make libcurl4-openssl-dev linux-headers-$(uname -r)
Code:
sudo export CFLAGS="-march=native"



Code:
sudo mkdir /opt/minerd
Code:
cd /opt/minerd



Code:
sudo git clone git clone https://github.com/wolf9466/cpuminer-multi.git



Code:
cd cpuminer-multi
Code:
sudo ./autogen.sh
Code:
sudo ./configure
Code:
sudo make
Code:
sudo make install



Code:
sudo minerd -a cryptonight -o stratum+tcp://xmr.crypto-pool.fr:3333 -u your_wallet_address -p x

Sylon (OP)
Legendary
*
Offline Offline

Activity: 1568
Merit: 1169



View Profile
September 11, 2016, 06:16:44 PM
Last edit: September 16, 2016, 05:39:58 PM by Sylon
 #3








Code:
sudo apt-get install build-essential linux-headers-$(uname -r)



Code:
sudo apt-get install libcurl4-openssl-dev libssl-dev



Code:
sudo apt-get install autoconf









Code:
sudo mkdir /opt/cuda



Code:
cd /opt/cuda






Code:
sudo wget -c http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_32.run



Code:
sudo wget -c http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run





Code:
sudo chmod +x /opt/cuda/cuda_6.5.14_linux_32.run



Code:
sudo chmod +x /opt/cuda/cuda_6.5.14_linux_64.run





Code:
sudo mkdir /opt/cuda/install-scripts






Code:
sudo /opt/cuda/cuda_6.5.14_linux_32.run -extract=/opt/cuda/install-scripts



Code:
sudo /opt/cuda /cuda_6.5.14_linux_64.run -extract=/opt/cuda/install-scripts



Code:
cd /opt/cuda/install-scripts





Code:
sudo ./cuda-linux32-rel-6.5.14-18749181.run



Code:
sudo ./cuda-linux64-rel-6.5.14-18749181.run






Code:
export PATH=$PATH:/usr/local/cuda/bin
Code:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib



Code:
export PATH=$PATH:/usr/local/cuda/bin
Code:
export LD_LIBRARY_PATH=:/usr/local/cuda/lib64





Code:
sudo mkdir /opt/cmminer



Code:
cd /opt/cmminer





Code:
sudo wget -c https://github.com/KlausT/ccminer-cryptonight/archive/master.zip



Code:
sudo unzip ./master.zip
Code:
cd ./ccminer-cryptonight-master/



Code:
sudo ./autogen.sh
Code:
sudo ./configure
Code:
sudo make
Code:
sudo make clean
Code:
sudo make install

ZenFr
Legendary
*
Offline Offline

Activity: 1260
Merit: 1046



View Profile
September 13, 2016, 10:45:01 AM
Last edit: September 13, 2016, 11:25:30 AM by ZenFr
 #4

Thank for this very good work Sylon.

2 questions please :

1) Ubuntu/GCC version :
Do you think this tuto will work with Ubuntu 16.04 (compiler GCC 5.xx) or only with Ubuntu 14.04 and earlier (compiler GCC 4.xx) ?
With some precedent try (not your tuto), I had fails with the message that CCMiner is only compatible with GCC 4.xx.

2) Cuda version :
Why do you use Cuda 6.5 ?
Are you sure that the compilation don't work with Cuda 7.5 ?
And what about Cuda 8.0 : GTX 1xxx series are only supported by Cuda 8.0 ?
QuintLeo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1030


View Profile
September 13, 2016, 12:00:48 PM
 #5

GTX 1070 works with CUDA 7.5 version of Genoil and a CUDA 5.x version of QTMiner

 You have it backwards - you can't run CUDA 8 code on anything LESS than a GTX 1xxx card, but the GTX 1xxx cards CAN run older CUDA code - abet they usually won't be as well optimised for it as for more recent code that takes advantage of their new features.


I'm no longer legendary just in my own mind!
Like something I said? Donations gratefully accepted. LYLnTKvLefz9izJFUvEGQEZzSkz34b3N6U (Litecoin)
1GYbjMTPdCuV7dci3iCUiaRrcNuaiQrVYY (Bitcoin)
ZenFr
Legendary
*
Offline Offline

Activity: 1260
Merit: 1046



View Profile
September 13, 2016, 12:42:54 PM
 #6

GTX 1070 works with CUDA 7.5 version of Genoil and a CUDA 5.x version of QTMiner

 You have it backwards - you can't run CUDA 8 code on anything LESS than a GTX 1xxx card, but the GTX 1xxx cards CAN run older CUDA code - abet they usually won't be as well optimised for it as for more recent code that takes advantage of their new features.


Thanks for these informations.
superresistant
Legendary
*
Offline Offline

Activity: 2156
Merit: 1131



View Profile
September 14, 2016, 03:58:05 PM
 #7

 
Check out this new branch from KlausT : https://github.com/KlausT/ccminer-cryptonight

jahras
Sr. Member
****
Offline Offline

Activity: 437
Merit: 250



View Profile
September 15, 2016, 08:28:29 AM
 #8

GTX 1070 works with CUDA 7.5 version of Genoil and a CUDA 5.x version of QTMiner

 You have it backwards - you can't run CUDA 8 code on anything LESS than a GTX 1xxx card, but the GTX 1xxx cards CAN run older CUDA code - abet they usually won't be as well optimised for it as for more recent code that takes advantage of their new features.


Thanks for these informations.

Thanks for pointing this out. Cuda is backwards compatible so newer versions should work for most of the cards used to mine today.
ZenFr
Legendary
*
Offline Offline

Activity: 1260
Merit: 1046



View Profile
September 16, 2016, 08:48:47 AM
Last edit: September 16, 2016, 10:39:31 AM by ZenFr
 #9

I'd tried the tuto (Ubuntu 16.04, 64 bits, desktop) and I found some small error (probably copy / paste) :

The line "sudo cd /opt/cuda" (don't work) -> "cd /opt/cuda" (work).
The line "sudo /opt/cuda /cuda_6.5.14_linux_64.run -extract=`pwd`/install-scripts" -> "sudo ./cuda_6.5.14_linux_64.run -extract=`pwd`/install-scripts"
The line "sudo cd /opt/cuda/install-scripts" -> "cd /opt/cuda/install-scripts"
The line "export PATH=$PATH:/usr/local/cuda/bin" -> "export PATH=$PATH:/usr/local/cuda-6.5/bin"
The line "export LD_LIBRARY_PATH=:/usr/local/cuda/lib64" -> "export LD_LIBRARY_PATH=:/usr/local/cuda-6.5/lib64"
The line "sudo cd /opt/cmminer" -> "cd /opt/cmminer"
The line "sudo cd ./ccminer-cryptonight-master/" -> "cd ./ccminer-cryptonight-master/"
The line "sudo ./autogen" -> "sudo ./autogen.sh"

In the part of the dependancies in the tuto, libssl-dev is forgoten :
"sudo apt-get install libssl-dev"

At the end, the installation fail in the make command with a error message on the Cuda command missing (but nvcc is installed with a good response to the command nvcc --version : probably the level of compute of the Cuda 6.5 is to low)
superresistant
Legendary
*
Offline Offline

Activity: 2156
Merit: 1131



View Profile
September 16, 2016, 10:53:30 AM
 #10

I'd tried the tuto (Ubuntu 16.04, 64 bits, desktop) and I found some small error (probably copy / paste) :

The line "sudo cd /opt/cuda" (don't work) -> "cd /opt/cuda" (work).
The line "sudo /opt/cuda /cuda_6.5.14_linux_64.run -extract=`pwd`/install-scripts" -> "sudo ./cuda_6.5.14_linux_64.run -extract=`pwd`/install-scripts"
The line "sudo cd /opt/cuda/install-scripts" -> "cd /opt/cuda/install-scripts"
The line "export PATH=$PATH:/usr/local/cuda/bin" -> "export PATH=$PATH:/usr/local/cuda-6.5/bin"
The line "export LD_LIBRARY_PATH=:/usr/local/cuda/lib64" -> "export LD_LIBRARY_PATH=:/usr/local/cuda-6.5/lib64"
The line "sudo cd /opt/cmminer" -> "cd /opt/cmminer"
The line "sudo cd ./ccminer-cryptonight-master/" -> "cd ./ccminer-cryptonight-master/"
The line "sudo ./autogen" -> "sudo ./autogen.sh"

In the part of the dependancies in the tuto, libssl-dev is forgoten :
"sudo apt-get install libssl-dev"

At the end, the installation fail in the make command with a error message on the Cuda command missing (but nvcc is installed with a good response to the command nvcc --version : probably the level of compute of the Cuda 6.5 is to low)

salut, t'as essayé cette branche ?

https://github.com/KlausT/ccminer-cryptonight
jahras
Sr. Member
****
Offline Offline

Activity: 437
Merit: 250



View Profile
September 16, 2016, 11:12:57 AM
 #11

I'd tried the tuto (Ubuntu 16.04, 64 bits, desktop) and I found some small error (probably copy / paste) :

The line "sudo cd /opt/cuda" (don't work) -> "cd /opt/cuda" (work).
The line "sudo /opt/cuda /cuda_6.5.14_linux_64.run -extract=`pwd`/install-scripts" -> "sudo ./cuda_6.5.14_linux_64.run -extract=`pwd`/install-scripts"
The line "sudo cd /opt/cuda/install-scripts" -> "cd /opt/cuda/install-scripts"
The line "export PATH=$PATH:/usr/local/cuda/bin" -> "export PATH=$PATH:/usr/local/cuda-6.5/bin"
The line "export LD_LIBRARY_PATH=:/usr/local/cuda/lib64" -> "export LD_LIBRARY_PATH=:/usr/local/cuda-6.5/lib64"
The line "sudo cd /opt/cmminer" -> "cd /opt/cmminer"
The line "sudo cd ./ccminer-cryptonight-master/" -> "cd ./ccminer-cryptonight-master/"
The line "sudo ./autogen" -> "sudo ./autogen.sh"

In the part of the dependancies in the tuto, libssl-dev is forgoten :
"sudo apt-get install libssl-dev"

At the end, the installation fail in the make command with a error message on the Cuda command missing (but nvcc is installed with a good response to the command nvcc --version : probably the level of compute of the Cuda 6.5 is to low)

The nvcc error is cause by not adding the cuda libraries to you path. Did the above export commands work?
ZenFr
Legendary
*
Offline Offline

Activity: 1260
Merit: 1046



View Profile
September 16, 2016, 12:51:30 PM
 #12

Merci pour vos retours / Thanks for your replies  Smiley.

I advanced for the error message during the make command.

The command who make the error is :
Quote
nvcc -g -O2 -I . -Xptxas "-abi=no -v" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --maxrregcount=80 --ptxas-options=-v -I./compat/jansson -o cryptonight/cryptonight.o -c cryptonight/cryptonight.cu
The terminal ouput is :
Quote
In file included from /usr/local/cuda-6.5/bin/..//include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/usr/local/cuda-6.5/bin/..//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!
One more time, the problem seems to be a problem with the 5.xx GCC version include in Ubuntu 16.04.

I"ll try with a Ubuntu 14.04 version.
jahras
Sr. Member
****
Offline Offline

Activity: 437
Merit: 250



View Profile
September 16, 2016, 01:00:47 PM
 #13

Merci pour vos retours / Thanks for your replies  Smiley.

I advanced for the error message during the make command.

When I run the command in the line where is the error :
The command is
Quote
nvcc -g -O2 -I . -Xptxas "-abi=no -v" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --maxrregcount=80 --ptxas-options=-v -I./compat/jansson -o cryptonight/cryptonight.o -c cryptonight/cryptonight.cu
The terminal ouput is :
Quote
In file included from /usr/local/cuda-6.5/bin/..//include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/usr/local/cuda-6.5/bin/..//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!
One more time, the problem seems to be a problem with the 5.xx GCC version include in Ubuntu 16.04.

I"ll try with a Ubuntu 14.04 version.

try installing  gcc 4.7 and g++ 4.7
Code:
sudo apt-get install gcc-4.7 g++-4.7

Then tell nvcc to use them:



Code:
export CXX=/usr/bin/g++-4.7
export CC=/usr/bin/gcc-4.7
Sylon (OP)
Legendary
*
Offline Offline

Activity: 1568
Merit: 1169



View Profile
September 16, 2016, 03:16:41 PM
 #14

Links have been updated.
herrdrone
Sr. Member
****
Offline Offline

Activity: 633
Merit: 267


View Profile
September 17, 2016, 05:09:38 PM
 #15

Really useful tutorial, added link to this thread on my website in this section: http://monerobechmarks.byethost5.com/tools.php

RAVENCOIN BENCHMARKS-> https://ravencoinhashrate.space/
EgonOlsen
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
September 22, 2016, 06:22:21 AM
 #16

Hi

Thanks for this tutorial!
But i also got  error message during the make command

nvcc -g -O2 -I . -Xptxas "-abi=no -v" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_50,code=\"sm_50\"  -gencode=arch=compute_52,code=\"sm_52, compute_52\" --maxrregcount=80 --ptxas-options=-v -I./compat/jansson -o cryptonight/cryptonight.o -c cryptonight/cryptonight.cu
/bin/bash: nvcc: Befehl nicht gefunden
Makefile:1155: die Regel für Ziel „cryptonight/cryptonight.o“ scheiterte
make[2]: *** [cryptonight/cryptonight.o] Fehler 127
make[2]: Verzeichnis „/opt/cmminer/ccminer-cryptonight-master“ wird verlassen
Makefile:728: die Regel für Ziel „all-recursive“ scheiterte
make[1]: *** [all-recursive] Fehler 1
make[1]: Verzeichnis „/opt/cmminer/ccminer-cryptonight-master“ wird verlassen
Makefile:398: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2


Hope somebody can help me  Smiley
(Worldwide)
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
September 26, 2016, 05:07:55 PM
 #17

hey can help me use ubuntu 14, i'm stuck in here. thanks

sudo export CFLAGS="-march=native"
sudo: export: command not found
vaccin
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile
September 27, 2016, 11:23:50 AM
 #18

hey can help me use ubuntu 14, i'm stuck in here. thanks

sudo export CFLAGS="-march=native"
sudo: export: command not found


Follow this:

Code:
# get git to install it
sudo apt-get install git

# dependencies
sudo apt-get install build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev

# download latest version
git clone https://github.com/wolf9466/cpuminer-multi

cd cpuminer-multi/

# compile
./autogen.sh
CFLAGS="-march=native" ./configure
make

#install
sudo make install
(Worldwide)
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
September 28, 2016, 06:21:30 AM
Last edit: September 28, 2016, 06:47:28 AM by (Worldwide)
 #19

hey can help me use ubuntu 14, i'm stuck in here. thanks

sudo export CFLAGS="-march=native"
sudo: export: command not found


Follow this:

Code:
# get git to install it
sudo apt-get install git

# dependencies
sudo apt-get install build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev

# download latest version
git clone https://github.com/wolf9466/cpuminer-multi

cd cpuminer-multi/

# compile
./autogen.sh
CFLAGS="-march=native" ./configure
make

#install
sudo make install

...retry after 10 seconds
Stratum authentication failed

for ubuntu 16 how bro ?
ZenFr
Legendary
*
Offline Offline

Activity: 1260
Merit: 1046



View Profile
September 28, 2016, 07:17:14 AM
 #20

hey can help me use ubuntu 14, i'm stuck in here. thanks

sudo export CFLAGS="-march=native"
sudo: export: command not found


Follow this:

Code:
# get git to install it
sudo apt-get install git

# dependencies
sudo apt-get install build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev

# download latest version
git clone https://github.com/wolf9466/cpuminer-multi

cd cpuminer-multi/

# compile
./autogen.sh
CFLAGS="-march=native" ./configure
make

#install
sudo make install

This is for Wol0 CPUMiner, not GPU miner.

There are 2 more issues to solve with nvidia GPU Mine under Ubuntu 16.04 (GCC and compute level).
And a other problem is that this miner is 2 years old...
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!