cvjena/darknet

problem compiling

shgidi opened this issue · 6 comments

Hi,
I've cloned the repository to a server on which I have the original darknet, and when i ran 'make', I've got the following error:
gcc -DOPENCV pkg-config --cflags opencv -DGPU -I/home/freytag/lib/cuda6.0/include/ -Wall -Wfatal-errors -Ofast -DOPENCV -DGPU -c ./src/gemm.c -o obj/gemm.o
In file included from ./src/gemm.c:3:0:
./src/cuda.h:10:26: fatal error: cuda_runtime.h: No such file or directory
#include "cuda_runtime.h"

compilation terminated.
Makefile:64: recipe for target 'obj/gemm.o' failed
make: *** [obj/gemm.o] Error 1

Hi,

I had the same error. In my case, the Cuda path was wrong.

At line 37 and 40 in the Makefile, you have by default:

...
COMMON+= -DGPU -I/home/freytag/lib/cuda6.0/include/
...
LDFLAGS+= -L/home/freytag/lib/cuda6.0/lib64 -lcuda -lcudart -lcublas -lcurand
...

Thus you have two solutions, depending on your Cuda path:

  • Uncomment the lines just above to replace the default one,
  • Or I put my own path like this:
...
COMMON+= -DGPU -I/usr/local/cuda-8.0/include/
...
LDFLAGS+= -L/usr/local/cuda-8.0/lib64 -lcuda -lcudart -lcublas -lcurand
...

Hope that helps!

hii moannuo,

         I already have this "CUDA path" with 9.1 version.

and still i m getting error like Mr.shgidi. Can u guide me through this problem?

hi ,
I had the same error. In my case, the Cuda path was wrong.
i am use windows 10,helps me thank you!
this my path set
ifeq ($(GPU), 1)
COMMON+= -DGPU -I/cygdrive/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v9.0/include/
LDFLAGS+= -L/cygdrive/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v9.0/lib/x64/
endif

hi ,
I had the same error. In my case, the Cuda path was wrong.
i am use windows 10,helps me thank you!
this my path set
ifeq ($(GPU), 1)
COMMON+= -DGPU -I/cygdrive/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v9.0/include/
LDFLAGS+= -L/cygdrive/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v9.0/lib/x64/
endif

in my case, it is not working. I have the same path but in darknet.h file cuda_runtime.h cannot be imported.

hi ,
I had the same error. In my case, the Cuda path was wrong.
i am use windows 10,helps me thank you!
this my path set
ifeq ($(GPU), 1)
COMMON+= -DGPU -I/cygdrive/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v9.0/include/
LDFLAGS+= -L/cygdrive/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v9.0/lib/x64/
endif

u re god man

it doesn't work i tried this , any idea ?