I am trying to compile YOLO with GPU=1, OPENCV=1, DEBUG=1. The same combination with DEBUG=0 got compiled successfully but when I make with DEBUG=1 its resulting in compilation failure.
>>make
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/gemm.c -o obj/gemm.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/utils.c -o obj/utils.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/cuda.c -o obj/cuda.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/convolutional_layer.c -o obj/convolutional_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/list.c -o obj/list.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/image.c -o obj/image.o
./src/image.c: In function ‘load_image_cv’:
./src/image.c:488:16: warning: implicit declaration of function ‘cvLoadImage’ [-Wimplicit-function-declaration]
if( (src = cvLoadImage(filename, flag)) == 0 )
^
./src/image.c:488:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
if( (src = cvLoadImage(filename, flag)) == 0 )
^
./src/image.c: In function ‘save_image_jpg’:
./src/image.c:530:5: warning: implicit declaration of function ‘cvSaveImage’ [-Wimplicit-function-declaration]
cvSaveImage(buff, disp,0);
^
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/activations.c -o obj/activations.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/im2col.c -o obj/im2col.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/col2im.c -o obj/col2im.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/blas.c -o obj/blas.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/crop_layer.c -o obj/crop_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/dropout_layer.c -o obj/dropout_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/maxpool_layer.c -o obj/maxpool_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/softmax_layer.c -o obj/softmax_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/data.c -o obj/data.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/matrix.c -o obj/matrix.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/network.c -o obj/network.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/connected_layer.c -o obj/connected_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/cost_layer.c -o obj/cost_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/parser.c -o obj/parser.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/option_list.c -o obj/option_list.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/darknet.c -o obj/darknet.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/detection_layer.c -o obj/detection_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/captcha.c -o obj/captcha.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/route_layer.c -o obj/route_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/writing.c -o obj/writing.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/box.c -o obj/box.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/nightmare.c -o obj/nightmare.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/normalization_layer.c -o obj/normalization_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/avgpool_layer.c -o obj/avgpool_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/coco.c -o obj/coco.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/dice.c -o obj/dice.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/yolo.c -o obj/yolo.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/detector.c -o obj/detector.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/layer.c -o obj/layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/compare.c -o obj/compare.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/classifier.c -o obj/classifier.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/local_layer.c -o obj/local_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/swag.c -o obj/swag.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/shortcut_layer.c -o obj/shortcut_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/activation_layer.c -o obj/activation_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/rnn_layer.c -o obj/rnn_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/gru_layer.c -o obj/gru_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/rnn.c -o obj/rnn.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/rnn_vid.c -o obj/rnn_vid.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/crnn_layer.c -o obj/crnn_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/demo.c -o obj/demo.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/tag.c -o obj/tag.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/cifar.c -o obj/cifar.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/go.c -o obj/go.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/batchnorm_layer.c -o obj/batchnorm_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/art.c -o obj/art.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/region_layer.c -o obj/region_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/reorg_layer.c -o obj/reorg_layer.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/super.c -o obj/super.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/voxel.c -o obj/voxel.o
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU -c ./src/tree.c -o obj/tree.o
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/convolutional_kernels.cu -o obj/convolutional_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/activation_kernels.cu -o obj/activation_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/im2col_kernels.cu -o obj/im2col_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/col2im_kernels.cu -o obj/col2im_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/blas_kernels.cu -o obj/blas_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/crop_layer_kernels.cu -o obj/crop_layer_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/dropout_layer_kernels.cu -o obj/dropout_layer_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/maxpool_layer_kernels.cu -o obj/maxpool_layer_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/network_kernels.cu -o obj/network_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_20,code=[sm_20,sm_21] -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ --compiler-options "-Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU" -c ./src/avgpool_layer_kernels.cu -o obj/avgpool_layer_kernels.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
gcc -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -Wall -Wfatal-errors -O0 -g -DOPENCV -DGPU obj/gemm.o obj/utils.o obj/cuda.o obj/convolutional_layer.o obj/list.o obj/image.o obj/activations.o obj/im2col.o obj/col2im.o obj/blas.o obj/crop_layer.o obj/dropout_layer.o obj/maxpool_layer.o obj/softmax_layer.o obj/data.o obj/matrix.o obj/network.o obj/connected_layer.o obj/cost_layer.o obj/parser.o obj/option_list.o obj/darknet.o obj/detection_layer.o obj/captcha.o obj/route_layer.o obj/writing.o obj/box.o obj/nightmare.o obj/normalization_layer.o obj/avgpool_layer.o obj/coco.o obj/dice.o obj/yolo.o obj/detector.o obj/layer.o obj/compare.o obj/classifier.o obj/local_layer.o obj/swag.o obj/shortcut_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/rnn.o obj/rnn_vid.o obj/crnn_layer.o obj/demo.o obj/tag.o obj/cifar.o obj/go.o obj/batchnorm_layer.o obj/art.o obj/region_layer.o obj/reorg_layer.o obj/super.o obj/voxel.o obj/tree.o obj/convolutional_kernels.o obj/activation_kernels.o obj/im2col_kernels.o obj/col2im_kernels.o obj/blas_kernels.o obj/crop_layer_kernels.o obj/dropout_layer_kernels.o obj/maxpool_layer_kernels.o obj/network_kernels.o obj/avgpool_layer_kernels.o -o darknet -lm -pthread `pkg-config --libs opencv` -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand -lstdc++
obj/image.o: In function `cvPointFrom32f':
/usr/local/include/opencv2/core/types_c.h:929: undefined reference to `cvRound'
/usr/local/include/opencv2/core/types_c.h:930: undefined reference to `cvRound'
obj/image.o: In function `cvReadInt':
/usr/local/include/opencv2/core/core_c.h:2350: undefined reference to `cvRound'
obj/image.o: In function `cvEllipseBox':
/usr/local/include/opencv2/imgproc/imgproc_c.h:1041: undefined reference to `cvRound'
/usr/local/include/opencv2/imgproc/imgproc_c.h:1042: undefined reference to `cvRound'
obj/darknet.o:/usr/local/include/opencv2/core/types_c.h:929: more undefined references to `cvRound' follow
collect2: error: ld returned 1 exit status
Makefile:63: recipe for target 'darknet' failed
make: *** [darknet] Error 1
Somehow I get a strong feel that its the problem with opencv or its compatibility with gdb.
Any Ideas on how to solve this issue?
I reported the problem to opencv regarding this bug and received a strange response!! here is the thread related to this: opencv3 bug related to cvRound
They mentioned that OpenCV support for C doesn't work all the time properly when compiled with gcc.
So, I modified the opencv code temporarily in order for the debugger to work:
Changes I have done are:
replaced cvRound with ceil by including math.h in the files opencv2/core/types_c.h
opencv2/core/core_c.h
and opencv2/imgproc/imgproc_c.h
in /usr/local/include
with root permissions
Then the YOLO code got compiled successfully with DEBUG=1
Alternately - if you don't want to change openCV code - you can do similar workaround in one of the yolo files. For example: in beginning of detector.c add:
#include "math.h"
int cvRound(double value) {return(ceil(value));}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With