0
$\begingroup$

I was following the instructions given on https://pjreddie.com/darknet/install/ But when I go to the directory darknet and try to make, I get the following error:

>>make
gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/deconvolutional_layer.c -o obj/deconvolutional_layer.o
In file included from ./src/cuda.h:4,
                 from ./src/deconvolutional_layer.h:4,
                 from ./src/deconvolutional_layer.c:1:
include/darknet.h:780:11: error: unknown type name 'clock_t'; did you mean 'clockid_t'?
 float sec(clock_t clocks);
           ^~~~~~~
           clockid_t
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:89: obj/deconvolutional_layer.o] Error 1

make version:

>>make --version
GNU Make 4.3
Built for Windows32
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Additional information: I already have anaconda installed with tf-gpu environment created. I also have pytorch, openCV installed in that env. I am willing to learn darknet and use my onboard GPU that I am able to use via the tf-gpu env. I have not manually installed CUDNN or CUDA and I have let anaconda take care of everything and I have tried and tested running my codes on my GPU (GTX 1050 4GB (mobile) ) and it works alright. Hence please provide help so that I can use darknet also on my gpu via the already configured tf-gpu env.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.