darknet icon indicating copy to clipboard operation
darknet copied to clipboard

problem compiling

Open shgidi opened this issue 7 years ago • 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

shgidi avatar Mar 01 '17 15:03 shgidi

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!

ademenet avatar Mar 02 '17 15:03 ademenet

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?

SahilTamboli23 avatar Apr 18 '18 10:04 SahilTamboli23

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

sky99915 avatar Jan 14 '19 02:01 sky99915

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.

ixtiyoruz avatar Jan 30 '19 10:01 ixtiyoruz

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

bkocadere avatar Mar 28 '19 01:03 bkocadere

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

abdou31 avatar Apr 11 '19 13:04 abdou31