Создание CCminer на Ubuntu 17.04

Я недавно начал взрывать некоторый cryptconcurrencys снова, и я хотел попробовать Monero (XMR). Шахтер ЦП xmrig работает отлично однако, у меня есть установка задач шахтер GPU.

Что я уже сделал

Я уже установил графические драйверы для своего GTX 1070 (я использую 375.66),

itssme@muhbuntu:~$ nvidia-smi 
Wed Jul 26 20:48:30 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.66                 Driver Version: 375.66                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1070    Off  | 0000:01:00.0      On |                  N/A |
| 27%   32C    P8     7W / 151W |    653MiB /  8112MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

Я уже установил cuda (склонный - получают установку nvidia-cuda-dev nvidia-cuda-toolkit),

itssme@muhbuntu:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep__4_22:14:01_CDT_2016
Cuda compilation tools, release 8.0, V8.0.44

Клонирование ccminer от GitHub

https://github.com/tpruvot/ccminer.git

Выполнение "./autogen.sh" и "./настраивать"

itssme@muhbuntu:~$ ./autogen.sh 
configure.ac:4: installing './config.sub'
configure.ac:6: installing './missing'
Makefile.am: installing './depcomp'

itssme@muhbuntu:~$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gcc option to support OpenMP... -fopenmp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for sys/sysctl.h... yes
checking whether be32dec is declared... no
checking whether le32dec is declared... no
checking whether be32enc is declared... no
checking whether le32enc is declared... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for getopt_long... yes
checking whether we can compile AVX code... yes
checking whether we can compile XOP code... yes
checking whether we can compile AVX2 code... yes
checking for json_loads in -ljansson... yes
checking for pthread_create in -lpthread... yes
checking for SSL_library_init in -lssl... yes
checking for EVP_DigestFinal_ex in -lcrypto... yes
checking for gawk... (cached) gawk
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.52.1
checking for libcurl >= version 7.15.2... yes
checking whether libcurl is usable... yes
checking for curl_free... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating compat/Makefile
config.status: creating compat/jansson/Makefile
config.status: creating cpuminer-config.h
config.status: executing depfiles commands

Где я перестал работать

Выполнение сделать команда

itssme@muhbuntu:~/Documents/ccminer$ make
make  all-recursive
make[1]: Entering directory '/home/itssme/Documents/ccminer'
Making all in compat
make[2]: Entering directory '/home/itssme/Documents/ccminer/compat'
make[3]: Entering directory '/home/itssme/Documents/ccminer/compat'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/itssme/Documents/ccminer/compat'
make[2]: Leaving directory '/home/itssme/Documents/ccminer/compat'
make[2]: Entering directory '/home/itssme/Documents/ccminer'
gcc -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-crc32.o -MD -MP -MF .deps/ccminer-crc32.Tpo -c -o ccminer-crc32.o `test -f 'crc32.c' || echo './'`crc32.c
mv -f .deps/ccminer-crc32.Tpo .deps/ccminer-crc32.Po
gcc -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-hefty1.o -MD -MP -MF .deps/ccminer-hefty1.Tpo -c -o ccminer-hefty1.o `test -f 'hefty1.c' || echo './'`hefty1.c
mv -f .deps/ccminer-hefty1.Tpo .deps/ccminer-hefty1.Po
g++ -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-ccminer.o -MD -MP -MF .deps/ccminer-ccminer.Tpo -c -o ccminer-ccminer.o `test -f 'ccminer.cpp' || echo './'`ccminer.cpp
mv -f .deps/ccminer-ccminer.Tpo .deps/ccminer-ccminer.Po
g++ -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-util.o -MD -MP -MF .deps/ccminer-util.Tpo -c -o ccminer-util.o `test -f 'util.cpp' || echo './'`util.cpp
mv -f .deps/ccminer-util.Tpo .deps/ccminer-util.Po
gcc -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-log.o -MD -MP -MF .deps/ccminer-log.Tpo -c -o ccminer-log.o `test -f 'log.c' || echo './'`log.c
mv -f .deps/ccminer-log.Tpo .deps/ccminer-log.Po
g++ -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-api.o -MD -MP -MF .deps/ccminer-api.Tpo -c -o ccminer-api.o `test -f 'api.cpp' || echo './'`api.cpp
mv -f .deps/ccminer-api.Tpo .deps/ccminer-api.Po
g++ -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-hashlog.o -MD -MP -MF .deps/ccminer-hashlog.Tpo -c -o ccminer-hashlog.o `test -f 'hashlog.cpp' || echo './'`hashlog.cpp
mv -f .deps/ccminer-hashlog.Tpo .deps/ccminer-hashlog.Po
g++ -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-nvml.o -MD -MP -MF .deps/ccminer-nvml.Tpo -c -o ccminer-nvml.o `test -f 'nvml.cpp' || echo './'`nvml.cpp
mv -f .deps/ccminer-nvml.Tpo .deps/ccminer-nvml.Po
g++ -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-stats.o -MD -MP -MF .deps/ccminer-stats.Tpo -c -o ccminer-stats.o `test -f 'stats.cpp' || echo './'`stats.cpp
mv -f .deps/ccminer-stats.Tpo .deps/ccminer-stats.Po
g++ -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-sysinfos.o -MD -MP -MF .deps/ccminer-sysinfos.Tpo -c -o ccminer-sysinfos.o `test -f 'sysinfos.cpp' || echo './'`sysinfos.cpp
mv -f .deps/ccminer-sysinfos.Tpo .deps/ccminer-sysinfos.Po
g++ -DHAVE_CONFIG_H -I.  -fopenmp  -pthread -fno-strict-aliasing  -I/usr/local/cuda/include  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT ccminer-cuda.o -MD -MP -MF .deps/ccminer-cuda.Tpo -c -o ccminer-cuda.o `test -f 'cuda.cpp' || echo './'`cuda.cpp
mv -f .deps/ccminer-cuda.Tpo .deps/ccminer-cuda.Po
nvcc -gencode=arch=compute_52,code=\"sm_52,compute_52\" -gencode=arch=compute_50,code=\"sm_50,compute_50\" -I/usr/local/cuda/include -I.  --ptxas-options="-v" --maxrregcount=128 -o heavy/heavy.o -c heavy/heavy.cu
ERROR: No supported gcc/g++ host compiler found, but clang-3.8 is available.
       Use 'nvcc -ccbin clang-3.8' to use that instead.
Makefile:2073: recipe for target 'heavy/heavy.o' failed
make[2]: *** [heavy/heavy.o] Error 1
make[2]: Leaving directory '/home/itssme/Documents/ccminer'
Makefile:1621: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/itssme/Documents/ccminer'
Makefile:564: recipe for target 'all' failed
make: *** [all] Error 2

Проблема

ОШИБКА: Нет поддерживаемый gcc/g ++ найденный компилятор хоста, но лязг 3.8 доступен. Используйте 'nvcc-ccbin, лязгают 3.8' для использования этого вместо этого.

Проблема, кажется, тот gcc 6 поддержки CUDA 8.0 doens't. Таким образом, как я могу использовать лязг вместо этого? (Я уже установил его через Кв.),

1
задан 26 July 2017 в 22:56

4 ответа

Быстрое исправление: откройте make-файл, ищите nvcc (с нано, это - CTRL+W, введите "nvcc"), и замените его "nvcc-ccbin, лязгают 3.8", сохраняет make-файл и делает снова.

1
ответ дан 3 December 2019 в 06:53

Используя лязг 3.8 все еще оставил меня с соединением ошибок. Однако мне удалось заставить ccminer компилировать на Ubuntu 17 путем выполнения следующего:

sudo apt-get install gcc-4.9
./configure.sh

Отредактируйте следующие строки в Make-файле:

CXX = g++-4.9
NVCC = /usr/local/cuda/bin/nvcc -ccbin gcc-4.9
ac_ct_CC = gcc-4.9
ac_ct_CXX = g++-4.9

Затем наконец:

make

Удачи!

2
ответ дан 3 December 2019 в 06:53

Лучший способ выбрать Ваш компилятор путем передачи соответствующих переменных./настраивать:

sudo apt-get install g++-4.9
CC=gcc-4.9 CPP=cpp-4.9 CXX=g++-4.9 ./configure

В настоящее время nvcc, кажется, не нравятся версии GCC, более новые, чем 5.

1
ответ дан 3 December 2019 в 06:53

Редактирование Make-файла и комментарий строк:

#scrypt/salsa_kernel.o: scrypt/salsa_kernel.cu
#       $(NVCC) $(JANSSON_INCLUDES) -I. -I/usr/local/cuda/include -O3 -lineno -Xcompiler -Wall  -D_FORCE_INLINES -gencode=arch=compute_20,code=\"sm_21,compute_20\" -o $@ -c $<

# These kernels are for older devices (SM)

#scrypt/test_kernel.o: scrypt/test_kernel.cu
#       $(NVCC) $(JANSSON_INCLUDES) -I. -I/usr/local/cuda/include -O3 -lineno -Xcompiler -Wall  -D_FORCE_INLINES -gencode=arch=compute_20,code=\"sm_20,compute_20\" -o $@ -c $<

#scrypt/fermi_kernel.o: scrypt/fermi_kernel.cu
#       $(NVCC) $(JANSSON_INCLUDES) -I. -I/usr/local/cuda/include -O3 -lineno -Xcompiler -Wall  -D_FORCE_INLINES -gencode=arch=compute_20,code=\"sm_21,compute_20\" -o $@ -c $<

Затем выполненный:

make

Это работало на меня.

0
ответ дан 3 December 2019 в 06:53

Другие вопросы по тегам:

Похожие вопросы: