cbuchner1 / CudaMiner

a CUDA accelerated litecoin mining application based on pooler's CPU miner
Other
687 stars 304 forks source link

Compiling issue - NVCC does not include CUDA include dir #136

Open Grinnz opened 10 years ago

Grinnz commented 10 years ago

I am getting an error in Fedora 20 x86_64 when I try to compile the latest cudaminer or ccminer releases. It cannot find header files in the cuda includes directory (/usr/local/cuda/include, in my case). I work around it by editing the Makefile created by ./configure and adding $(CUDA_CFLAGS) to every nvcc line near the end of the file; this variable is set to "CUDA_CFLAGS = -I/usr/local/cuda/include" earlier in the Makefile but is never used. I don't know enough about autogen to suggest how to fix this in the makefile generation.

Grinnz commented 10 years ago

For searchability, the error this causes is below:

/usr/local/cuda-5.5/bin/nvcc -g -O2 -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=64 --ptxas-options=-v -I./compat/jansson -o salsa_kernel.o -c salsa_kernel.cu In file included from :0:0: /usr/include/stdc-predef.h:40:1: fatal error: cuda_runtime.h: No such file or directory

endif

^

Grinnz commented 10 years ago

I did the same modification to Makefile.am instead of the generated makefile, and it successfully configured and built.

kLOsk commented 7 years ago

For future reference this can be solved by setting the symbolic link to /usr/local/cuda:

ln -s /usr/local/cuda-8.0 /usr/local/cuda