Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Grinnz opened this issue May 1, 2014 · 3 comments
Open

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

Grinnz opened this issue May 1, 2014 · 3 comments

Comments

@Grinnz
Copy link

Grinnz commented May 1, 2014

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
Copy link
Author

Grinnz commented May 1, 2014

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
Copy link
Author

Grinnz commented May 1, 2014

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

@kLOsk
Copy link

kLOsk commented Aug 13, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants