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

Include CUDA_CFLAGS to include cuda include dir in nvcc #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Grinnz
Copy link

@Grinnz Grinnz commented May 1, 2014

This change allows ccminer to compile on my system, to fix the same error as for cudaminer here: cbuchner1/CudaMiner#136

@oleid
Copy link

oleid commented May 20, 2014

Along the same line:

CFLAGS are used when compining with nvcc. This breaks the build for me, as nvcc doesn't support "-march=native", which I pass to gcc. Please change this in Makefile.am accordingly.

@firemad
Copy link

firemad commented Jun 7, 2014

Hi,

I had the same problem with CentOS 6.5 but I corrected my problem with this fix below without changing any files.

Also before compiling I added to my $PATH environment the cuda folder and I also run this command:
ldconfig /usr/local/cuda-6.0/lib64

I compiled ccminer with this command:

./autogen.sh
./configure "CFLAGS=-03" "CXXFLAGS=-03" --with-cuda=/usr/local/cuda-6.0
make

I think it's the --with-cuda that you missed for your cuda path problem and I saw it in the Readme file or in the Install file and I can't remember where. Anyways, without the --with-cuda I can't compile.

The syntax ldconfig /usr/local/cuda-6.0/lib64 is needed everytime you run ccminer or ccminer can't run and I created a batch file for it.

I added ccminer to my $PATH because I hated to type my full path to execute ccminer but it's a preference.

Just a side note: change the cuda path with your path. I compiled the nvidia.com cuda and I didn't use any package in my system for the Nvidia drivers or the cuda toolkit.

Maybe I missed something for the ./configure that can correct the ldconfig that is needed for ccminer but I don't know the answer.

@Grinnz
Copy link
Author

Grinnz commented Jun 7, 2014

I am using the --with-cuda flag already. That does not include the cuda "include" directory which is what the CUDA_CFLAGS variable is needed for in the nvcc line during compilation. Without that include, it fails to compile. (On Fedora 20)

The lib directory can be set for ccminer also by setting the environment variable LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH (or wherever yours is installed) as recommended by the cuda toolkit documentation, along with adding /usr/local/cuda/bin to PATH.

roche-emmanuel pushed a commit to roche-emmanuel/ccminer that referenced this pull request Jan 20, 2017
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

Successfully merging this pull request may close these issues.

3 participants