cbuchner1 / ccminer

Christian Buchner's & Christian H.'s CUDA miner project
Other
273 stars 1.7k forks source link

CCMiner not compiling: -lcudart not found #27

Closed csolisr closed 9 years ago

csolisr commented 9 years ago

For some reason, CCMiner is not detecting that CUDA is installed during linking, despite of having used the proper libraries during the whole process. Relevant lines of the compilation error:

g++  -g -O2 -pthread -L/usr/local/cuda/lib64  -o ccminer ccminer-cpu-miner.o ccminer-util.o ccminer-bmw.o ccminer-blake.o ccminer-groestl.o ccminer-jh.o ccminer-keccak.o ccminer-skein.o ccminer-hefty1.o ccminer-scrypt.o ccminer-sha2.o heavy/heavy.o heavy/cuda_blake512.o heavy/cuda_combine.o heavy/cuda_groestl512.o heavy/cuda_hefty1.o heavy/cuda_keccak512.o heavy/cuda_sha256.o ccminer-fuguecoin.o cuda_fugue256.o ccminer-fugue.o ccminer-groestlcoin.o cuda_groestlcoin.o ccminer-myriadgroestl.o cuda_myriadgroestl.o JHA/jackpotcoin.o JHA/cuda_jha_keccak512.o JHA/cuda_jha_compactionTest.o quark/cuda_quark_checkhash.o quark/cuda_jh512.o quark/cuda_quark_blake512.o quark/cuda_quark_groestl512.o quark/cuda_skein512.o quark/cuda_bmw512.o quark/cuda_quark_keccak512.o quark/quarkcoin.o quark/animecoin.o quark/cuda_quark_compactionTest.o cuda_nist5.o ccminer-cubehash.o ccminer-echo.o ccminer-luffa.o ccminer-shavite.o ccminer-simd.o ccminer-hamsi.o ccminer-hamsi_helper.o x13/x13.o x13/cuda_x13_hamsi512.o x13/cuda_x13_fugue512.o x11/x11.o x11/cuda_x11_luffa512.o x11/cuda_x11_cubehash512.o x11/cuda_x11_shavite512.o x11/cuda_x11_simd512.o x11/cuda_x11_echo.o -lcurl -ljansson -lpthread  -lcudart -static-libstdc++ -fopenmp -lcrypto -lssl  -lcrypto -lssl 
/usr/bin/ld: -lcudart not found
collect2: error: ld returned exit status 1
Makefile:612: recipe for target 'ccminer' failed
make[2]: *** [ccminer] Error 1

The CUDA package is version 6.0, installed in /opt/cuda in ArchLinux 64 bits.

csolisr commented 9 years ago

Solved with ln -s /opt/cuda /usr/local

chrysophylax69 commented 9 years ago

i always add the path to the build before the compiling takes place - as i dont want a static link in my ssytem ...

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

with other forks that have the build.sh file - i add that in there first and it compiles smooth ... most of the time ;)

crysx