Pages:
Author

Topic: [XMR] Tutorial: How to compile your mining software on Linux ? (Read 11092 times)

newbie
Activity: 3
Merit: 0
Has anyone managed to compile KlausT's ccminer on Ubuntu?

If so which version of Ubuntu, any tips etc?

I get the following when running make on Ubuntu 14.04.   I believe I have my path set correctly.

Code:
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -msse2  -fopenmp -pthread -fno-strict-aliasing -I./compat/jansson -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-cpu-miner.o -MD -MP -MF .deps/ccminer-cpu-miner.Tpo -c -o ccminer-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c
cpu-miner.c:39:26: fatal error: cuda_runtime.h: No such file or directory
 #include
Same error for me on Ubuntu 16.04 - Cuda-8.0 - gcc-4.7  Huh

SOLVED
I managed by modifying 2 files :

"cpu-miner.c" line 39, change #include by
#include

"cryptonight.h" line 2, change #include by
#include

then,
make
newbie
Activity: 1
Merit: 0
Has anyone managed to compile KlausT's ccminer on Ubuntu?

If so which version of Ubuntu, any tips etc?

I get the following when running make on Ubuntu 14.04.   I believe I have my path set correctly.

Code:
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -msse2  -fopenmp -pthread -fno-strict-aliasing -I./compat/jansson -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-cpu-miner.o -MD -MP -MF .deps/ccminer-cpu-miner.Tpo -c -o ccminer-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c
cpu-miner.c:39:26: fatal error: cuda_runtime.h: No such file or directory
 #include
legendary
Activity: 2156
Merit: 1131
thanks for information !
is there any other alternative for my CPU ?
kidn regards
Few years ago, Wolf0 did compile a non-aes-ni miner, you can find it here :
https://ottrbutt.com/cpuminer-multi/minerd-wolf-07-09-14.exe
Be aware that it must be very slow.
hmm this is a Linux threat Huh oyu gave me .exe ??
 as i sad before iam using Linux ......

There are no binaries for Linux, you must compile it from source.
You can still test the exe on Linux with wineHQ.
Read the thread to find sources and instructions : https://bitcointalksearch.org/topic/wolfs-xmrbcndsh-cpuminer-2x-speed-compared-to-lucasjones-new-06202014-632724

hey, I use putty to login to ubuntu, how to close the putty but the server remains beerjalan for mining ? because if I closed the putty, the mining was stopped also. Thanks
You can use an unix program called screen. Screen enables you to multitask in a terminal window. Once your miner starts press Ctrl+A, then press D so that you can detach from screen. Now you can safely close putty or console and mining will continue. When you want to check again a simple
Code:
screen -r minerd
will open the mining screen.If you want to kill the screen use:
Code:
screen -S minerd -X quit
So to use the screen use: screen -S minerd minerd -a cryptonight -o stratum+tcp://xmr.poolto.be:3002 -u your.address -p x

Also tmux will do the job. All commands here : http://hyperpolyglot.org/multiplexers
newbie
Activity: 43
Merit: 0
hey, I use putty to login to ubuntu, how to close the putty but the server remains beerjalan for mining ?

because if I closed the putty, the mining was stopped also. Thanks

You can use an unix program called screen. Screen enables you to multitask in a terminal window.
Once your miner starts press Ctrl+A, then press D so that you can detach from screen. Now you can safely close putty or console and mining will continue.
When you want to check again a simple
Code:
screen -r minerd
will open the mining screen.
If you want to kill the screen use:
Code:
screen -S minerd -X quit

So to use the screen use:

Code:
screen -S minerd minerd -a cryptonight -o stratum+tcp://xmr.poolto.be:3002 -u your.address -p x

legendary
Activity: 1582
Merit: 1031
thanks for information !
is there any other alternative for my CPU ?
kidn regards

Few years ago, Wolf0 did compile a non-aes-ni miner, you can find it here :
https://ottrbutt.com/cpuminer-multi/minerd-wolf-07-09-14.exe

Be aware that it must be very slow.


hmm this is a Linux threat Huh oyu gave me .exe ??
 as i sad before iam using Linux ......
full member
Activity: 210
Merit: 100
hey, I use putty to login to ubuntu, how to close the putty but the server remains beerjalan for mining ?

because if I closed the putty, the mining was stopped also. Thanks
legendary
Activity: 2156
Merit: 1131
thanks for information !
is there any other alternative for my CPU ?
kidn regards

Few years ago, Wolf0 did compile a non-aes-ni miner, you can find it here :
https://ottrbutt.com/cpuminer-multi/minerd-wolf-07-09-14.exe

Be aware that it must be very slow.
legendary
Activity: 1582
Merit: 1031
Code:
sudo minerd -a cryptonight -o stratum+tcp://xmr.crypto-pool.fr:3333 -u your_wallet_address -p x
[2016-09-28 13:19:21] CPU does not have AES-NI, which is required.
Huh is it not possible with my cpu ??
working on linux mint
kind regards

Only modern CPU
https://en.wikipedia.org/wiki/AES_instruction_set
https://www-ssl.intel.com/content/www/us/en/architecture-and-technology/advanced-encryption-standard--aes-/data-protection-aes-general-technology.html


thanks for information !
is there any other alternativ for my CPU ?


kidn regards
legendary
Activity: 2156
Merit: 1131
Code:
sudo minerd -a cryptonight -o stratum+tcp://xmr.crypto-pool.fr:3333 -u your_wallet_address -p x
[2016-09-28 13:19:21] CPU does not have AES-NI, which is required.
Huh is it not possible with my cpu ??
working on linux mint
kind regards

Only modern CPU
https://en.wikipedia.org/wiki/AES_instruction_set
https://www-ssl.intel.com/content/www/us/en/architecture-and-technology/advanced-encryption-standard--aes-/data-protection-aes-general-technology.html
legendary
Activity: 1582
Merit: 1031
Code:
sudo minerd -a cryptonight -o stratum+tcp://xmr.crypto-pool.fr:3333 -u your_wallet_address -p x
[2016-09-28 13:19:21] CPU does not have AES-NI, which is required.



 Huh is it not possible with my cpu ??
working on linux mint


kind regards
legendary
Activity: 2156
Merit: 1131
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...

Please read and report bugs to the new Nvidia ccminer-cryptonight dev :
https://github.com/KlausT/ccminer-cryptonight/issues
full member
Activity: 210
Merit: 100
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...
hey, please help, after walking, after walking, how to close this, but mining remained still walking.
http://prntscr.com/cn9q07

Thanks
legendary
Activity: 1260
Merit: 1046
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...
full member
Activity: 210
Merit: 100
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 ?
newbie
Activity: 43
Merit: 0
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
full member
Activity: 210
Merit: 100
hey can help me use ubuntu 14, i'm stuck in here. thanks

sudo export CFLAGS="-march=native"
sudo: export: command not found
newbie
Activity: 1
Merit: 0
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
sr. member
Activity: 633
Merit: 267
Really useful tutorial, added link to this thread on my website in this section: http://monerobechmarks.byethost5.com/tools.php
legendary
Activity: 1568
Merit: 1169
Links have been updated.
sr. member
Activity: 437
Merit: 250
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 :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
Pages:
Jump to: