KlausT / ccminer-cryptonight

Software for mining various cryptocoins, like Monero (pool mining only)
GNU General Public License v3.0
133 stars 30 forks source link

undefined reference to `cuda_devicereset' #30

Closed mushketyk closed 7 years ago

mushketyk commented 7 years ago

I have the following issue when I build the project on Ubuntu 16.04 and I can't figure out why:

$ make
make  all-recursive
make[1]: Entering directory '/home/mii/ccminer-cryptonight'
...
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -I/usr/local/cuda/include -msse2  -fopenmp -pthread -fno-strict-aliasing  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT crypto/ccminer-c_skein.o -MD -MP -MF crypto/.deps/ccminer-c_skein.Tpo -c -o crypto/ccminer-c_skein.o `test -f 'crypto/c_skein.c' || echo './'`crypto/c_skein.c
mv -f crypto/.deps/ccminer-c_skein.Tpo crypto/.deps/ccminer-c_skein.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -I/usr/local/cuda/include -msse2  -fopenmp -pthread -fno-strict-aliasing  -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME   -g -O2 -MT crypto/ccminer-aesb.o -MD -MP -MF crypto/.deps/ccminer-aesb.Tpo -c -o crypto/ccminer-aesb.o `test -f 'crypto/aesb.c' || echo './'`crypto/aesb.c
mv -f crypto/.deps/ccminer-aesb.Tpo crypto/.deps/ccminer-aesb.Po
gcc -std=gnu99  -g -O2 -pthread -L/usr/local/cuda/lib64  -o ccminer ccminer-cpu-miner.o ccminer-util.o ccminer-sha2.o cryptonight/cryptonight.o cryptonight/cuda_cryptonight_core.o cryptonight/cuda_cryptonight_extra.o ccminer-cryptonight.o crypto/ccminer-oaes_lib.o crypto/ccminer-c_keccak.o crypto/ccminer-c_groestl.o crypto/ccminer-c_blake256.o crypto/ccminer-c_jh.o crypto/ccminer-c_skein.o crypto/ccminer-aesb.o -L/usr/lib/x86_64-linux-gnu -lcurl -ljansson -lpthread  -lcudart -static-libstdc++ -fopenmp -lcrypto -lssl  -lcrypto -lssl 
ccminer-cpu-miner.o: In function `proper_exit':
/home/mii/ccminer-cryptonight/cpu-miner.c:356: undefined reference to `cuda_devicereset'
collect2: error: ld returned 1 exit status
Makefile:526: recipe for target 'ccminer' failed
make[2]: *** [ccminer] Error 1
make[2]: Leaving directory '/home/mii/ccminer-cryptonight'
Makefile:726: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/mii/ccminer-cryptonight'
Makefile:396: recipe for target 'all' failed
make: *** [all] Error 2

Here is a list of cuda libraries in the /usr/lib/x86_64-linux-gnu folder:

$ ls -la /usr/lib/x86_64-linux-gnu | grep cuda
-rw-r--r--   1 root root    322936 sep 19  2015 libcudadevrt.a
lrwxrwxrwx   1 root root        16 mar 30  2016 libcudart.so -> libcudart.so.7.5
lrwxrwxrwx   1 root root        19 mar 30  2016 libcudart.so.7.5 -> libcudart.so.7.5.18
-rw-r--r--   1 root root    383336 mar 19  2015 libcudart.so.7.5.18
-rw-r--r--   1 root root    720192 mar 19  2015 libcudart_static.a
lrwxrwxrwx   1 root root        12 may 31 12:21 libcuda.so -> libcuda.so.1
lrwxrwxrwx   1 root root        17 may 31 12:21 libcuda.so.1 -> libcuda.so.375.66
-rw-r--r--   1 root root   8240968 may  2 00:40 libcuda.so.375.66
lrwxrwxrwx   1 root root        18 may  2 16:50 libicudata.so.55 -> libicudata.so.55.1
-rw-r--r--   1 root root  25913104 may  2 16:50 libicudata.so.55.1

Do you have any ideas?

KlausT commented 7 years ago

No, sorry. I have no idea what's wrong there

brdelphus commented 7 years ago

I'm having the exact same issue under ubuntu 16.4 with cuda 8 with all dev toolkit packages already installed, i was able to compile the other ccminer fork though, and xmrMiner as well.

KlausT commented 7 years ago

please try version 2.03

brdelphus commented 7 years ago

Sir. Well done. You may close this issue.