Demo needs OpenCV for webcam images

Hi guys,

I’ve been using darknet yolov3 for a while now on the jetson TX2, and after I wanted to modify some parameters in the demo.c or image.c in the src directory, I tried to “make” darknet again and I can’t do it properly anymore…

When I want to run a main program I get this error:

Demo needs OpenCV for webcam images.

I don’t get why suddenly I have this error.

I also had this error the couple of first time I tried the make commande:

libdarknet.a(image_opencv.o): In function `cvflann::anyimpl::big_any_policy<cv::String>::static_delete(void**)':
image_opencv.cpp.text._ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv]+0x1c): undefined reference to `cv::String::deallocate()'
libdarknet.a(image_opencv.o):image_opencv.cpp.text._ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_]+0x18): more undefined references to `cv::String::deallocate()' follow
collect2: error: ld returned 1 exit status
Makefile:77: recipe for target 'darknet' failed
make: *** [darknet] Error 1

and after a while this error disappear and I just have the following log that raises no particular error:

nvidia@tegra-ubuntu:~/darknet-bio-agressor$ make
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/gemm.c -o obj/gemm.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/utils.c -o obj/utils.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/cuda.c -o obj/cuda.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/deconvolutional_layer.c -o obj/deconvolutional_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/convolutional_layer.c -o obj/convolutional_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/list.c -o obj/list.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/image.c -o obj/image.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/activations.c -o obj/activations.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/im2col.c -o obj/im2col.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/col2im.c -o obj/col2im.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/blas.c -o obj/blas.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/crop_layer.c -o obj/crop_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/dropout_layer.c -o obj/dropout_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/maxpool_layer.c -o obj/maxpool_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/softmax_layer.c -o obj/softmax_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/data.c -o obj/data.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/matrix.c -o obj/matrix.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/network.c -o obj/network.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/connected_layer.c -o obj/connected_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/cost_layer.c -o obj/cost_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/parser.c -o obj/parser.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/option_list.c -o obj/option_list.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/detection_layer.c -o obj/detection_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/route_layer.c -o obj/route_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/upsample_layer.c -o obj/upsample_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/box.c -o obj/box.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/normalization_layer.c -o obj/normalization_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/avgpool_layer.c -o obj/avgpool_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/layer.c -o obj/layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/local_layer.c -o obj/local_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/shortcut_layer.c -o obj/shortcut_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/logistic_layer.c -o obj/logistic_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/activation_layer.c -o obj/activation_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/rnn_layer.c -o obj/rnn_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/gru_layer.c -o obj/gru_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/crnn_layer.c -o obj/crnn_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/demo.c -o obj/demo.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/batchnorm_layer.c -o obj/batchnorm_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/region_layer.c -o obj/region_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/reorg_layer.c -o obj/reorg_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/tree.c -o obj/tree.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/lstm_layer.c -o obj/lstm_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/l2norm_layer.c -o obj/l2norm_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/yolo_layer.c -o obj/yolo_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/iseg_layer.c -o obj/iseg_layer.o
g++ -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/image_opencv.cpp -o obj/image_opencv.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/convolutional_kernels.cu -o obj/convolutional_kernels.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/deconvolutional_kernels.cu -o obj/deconvolutional_kernels.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/activation_kernels.cu -o obj/activation_kernels.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/im2col_kernels.cu -o obj/im2col_kernels.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/col2im_kernels.cu -o obj/col2im_kernels.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/blas_kernels.cu -o obj/blas_kernels.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/crop_layer_kernels.cu -o obj/crop_layer_kernels.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/dropout_layer_kernels.cu -o obj/dropout_layer_kernels.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/maxpool_layer_kernels.cu -o obj/maxpool_layer_kernels.o
nvcc  -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] -gencode arch=compute_62,code=[sm_62,compute_62] -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/avgpool_layer_kernels.cu -o obj/avgpool_layer_kernels.o
gcc -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -shared obj/gemm.o obj/utils.o obj/cuda.o obj/deconvolutional_layer.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/detection_layer.o obj/route_layer.o obj/upsample_layer.o obj/box.o obj/normalization_layer.o obj/avgpool_layer.o obj/layer.o obj/local_layer.o obj/shortcut_layer.o obj/logistic_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/crnn_layer.o obj/demo.o obj/batchnorm_layer.o obj/region_layer.o obj/reorg_layer.o obj/tree.o obj/lstm_layer.o obj/l2norm_layer.o obj/yolo_layer.o obj/iseg_layer.o obj/image_opencv.o obj/convolutional_kernels.o obj/deconvolutional_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/avgpool_layer_kernels.o -o libdarknet.so -lm -pthread  -L/usr/local/cuda-9.0/lib64 -lcuda -lcudart -lcublas -lcurand -lcudnn -lstdc++ 
ar rcs libdarknet.a obj/gemm.o obj/utils.o obj/cuda.o obj/deconvolutional_layer.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/detection_layer.o obj/route_layer.o obj/upsample_layer.o obj/box.o obj/normalization_layer.o obj/avgpool_layer.o obj/layer.o obj/local_layer.o obj/shortcut_layer.o obj/logistic_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/crnn_layer.o obj/demo.o obj/batchnorm_layer.o obj/region_layer.o obj/reorg_layer.o obj/tree.o obj/lstm_layer.o obj/l2norm_layer.o obj/yolo_layer.o obj/iseg_layer.o obj/image_opencv.o obj/convolutional_kernels.o obj/deconvolutional_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/avgpool_layer_kernels.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/captcha.c -o obj/captcha.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/lsd.c -o obj/lsd.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/super.c -o obj/super.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/art.c -o obj/art.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/tag.c -o obj/tag.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/cifar.c -o obj/cifar.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/go.c -o obj/go.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/rnn.c -o obj/rnn.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/segmenter.c -o obj/segmenter.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/regressor.c -o obj/regressor.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/classifier.c -o obj/classifier.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/coco.c -o obj/coco.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/yolo.c -o obj/yolo.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/detector.c -o obj/detector.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/nightmare.c -o obj/nightmare.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/instance-segmenter.c -o obj/instance-segmenter.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/darknet.c -o obj/darknet.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN obj/captcha.o obj/lsd.o obj/super.o obj/art.o obj/tag.o obj/cifar.o obj/go.o obj/rnn.o obj/segmenter.o obj/regressor.o obj/classifier.o obj/coco.o obj/yolo.o obj/detector.o obj/nightmare.o obj/instance-segmenter.o obj/darknet.o libdarknet.a -o darknet -lm -pthread  -L/usr/local/cuda-9.0/lib64 -lcuda -lcudart -lcublas -lcurand -lcudnn -lstdc++  libdarknet.a

gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/gemm.c -o obj/gemm.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/utils.c -o obj/utils.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/cuda.c -o obj/cuda.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/deconvolutional_layer.c -o obj/deconvolutional_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/convolutional_layer.c -o obj/convolutional_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/list.c -o obj/list.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/image.c -o obj/image.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/activations.c -o obj/activations.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/im2col.c -o obj/im2col.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/col2im.c -o obj/col2im.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/blas.c -o obj/blas.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/crop_layer.c -o obj/crop_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/dropout_layer.c -o obj/dropout_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/maxpool_layer.c -o obj/maxpool_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/softmax_layer.c -o obj/softmax_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/data.c -o obj/data.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/matrix.c -o obj/matrix.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/network.c -o obj/network.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/connected_layer.c -o obj/connected_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/cost_layer.c -o obj/cost_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/parser.c -o obj/parser.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/option_list.c -o obj/option_list.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/detection_layer.c -o obj/detection_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/route_layer.c -o obj/route_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/upsample_layer.c -o obj/upsample_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/box.c -o obj/box.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/normalization_layer.c -o obj/normalization_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/avgpool_layer.c -o obj/avgpool_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/layer.c -o obj/layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/local_layer.c -o obj/local_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/shortcut_layer.c -o obj/shortcut_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/logistic_layer.c -o obj/logistic_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/activation_layer.c -o obj/activation_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/rnn_layer.c -o obj/rnn_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/gru_layer.c -o obj/gru_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/crnn_layer.c -o obj/crnn_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/demo.c -o obj/demo.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/batchnorm_layer.c -o obj/batchnorm_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/region_layer.c -o obj/region_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/reorg_layer.c -o obj/reorg_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/tree.c -o obj/tree.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/lstm_layer.c -o obj/lstm_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/l2norm_layer.c -o obj/l2norm_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/yolo_layer.c -o obj/yolo_layer.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/iseg_layer.c -o obj/iseg_layer.o
g++ -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/image_opencv.cpp -o obj/image_opencv.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/convolutional_kernels.cu -o obj/convolutional_kernels.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/deconvolutional_kernels.cu -o obj/deconvolutional_kernels.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/activation_kernels.cu -o obj/activation_kernels.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/im2col_kernels.cu -o obj/im2col_kernels.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/col2im_kernels.cu -o obj/col2im_kernels.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/blas_kernels.cu -o obj/blas_kernels.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/crop_layer_kernels.cu -o obj/crop_layer_kernels.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/dropout_layer_kernels.cu -o obj/dropout_layer_kernels.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/maxpool_layer_kernels.cu -o obj/maxpool_layer_kernels.o
nvcc  -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]  -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  --compiler-options "-Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN" -c ./src/avgpool_layer_kernels.cu -o obj/avgpool_layer_kernels.o
gcc -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -shared obj/gemm.o obj/utils.o obj/cuda.o obj/deconvolutional_layer.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/detection_layer.o obj/route_layer.o obj/upsample_layer.o obj/box.o obj/normalization_layer.o obj/avgpool_layer.o obj/layer.o obj/local_layer.o obj/shortcut_layer.o obj/logistic_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/crnn_layer.o obj/demo.o obj/batchnorm_layer.o obj/region_layer.o obj/reorg_layer.o obj/tree.o obj/lstm_layer.o obj/l2norm_layer.o obj/yolo_layer.o obj/iseg_layer.o obj/image_opencv.o obj/convolutional_kernels.o obj/deconvolutional_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/avgpool_layer_kernels.o -o libdarknet.so -lm -pthread  -L/usr/local/cuda-9.0/lib64 -lcuda -lcudart -lcublas -lcurand -lcudnn -lstdc++ 
ar rcs libdarknet.a obj/gemm.o obj/utils.o obj/cuda.o obj/deconvolutional_layer.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/detection_layer.o obj/route_layer.o obj/upsample_layer.o obj/box.o obj/normalization_layer.o obj/avgpool_layer.o obj/layer.o obj/local_layer.o obj/shortcut_layer.o obj/logistic_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/crnn_layer.o obj/demo.o obj/batchnorm_layer.o obj/region_layer.o obj/reorg_layer.o obj/tree.o obj/lstm_layer.o obj/l2norm_layer.o obj/yolo_layer.o obj/iseg_layer.o obj/image_opencv.o obj/convolutional_kernels.o obj/deconvolutional_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/avgpool_layer_kernels.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/captcha.c -o obj/captcha.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/lsd.c -o obj/lsd.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/super.c -o obj/super.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/art.c -o obj/art.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/tag.c -o obj/tag.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/cifar.c -o obj/cifar.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/go.c -o obj/go.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/rnn.c -o obj/rnn.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/segmenter.c -o obj/segmenter.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/regressor.c -o obj/regressor.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/classifier.c -o obj/classifier.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/coco.c -o obj/coco.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/yolo.c -o obj/yolo.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/detector.c -o obj/detector.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/nightmare.c -o obj/nightmare.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/instance-segmenter.c -o obj/instance-segmenter.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./examples/darknet.c -o obj/darknet.o
gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda-9.0/include/ -DCUDNN  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN obj/captcha.o obj/lsd.o obj/super.o obj/art.o obj/tag.o obj/cifar.o obj/go.o obj/rnn.o obj/segmenter.o obj/regressor.o obj/classifier.o obj/coco.o obj/yolo.o obj/detector.o obj/nightmare.o obj/instance-segmenter.o obj/darknet.o libdarknet.a -o darknet -lm -pthread  -L/usr/local/cuda-9.0/lib64 -lcuda -lcudart -lcublas -lcurand -lcudnn -lstdc++  libdarknet.a

I had a look on internet but the common reason is related to OpenCV 3.4.1 but I’m on 3.4.0 as advised…

Thank you in advance for your help

Hi,

Do you enable OpenCV with this option in the Makefile?
https://github.com/pjreddie/darknet/blob/master/Makefile#L3

OPENCV=1

More, please noticed that the default OpenCV doesn’t enable GStreamer support.
If your application requires GStreamer implementation, please build it from source:
https://github.com/AastaNV/JEP/blob/master/script/install_opencv3.4.0_TX2.sh

Thanks.

Hi AastaLLL,
yes I did enable the OPENCV=1, I’ve always been able to “make” and remake darknet before to change some parameters… and suddenly it’s not possible anymore.

I also included this line in the Makefile: (it supposed to be the gencode for TX2)

-gencode arch=compute_62,code=[sm_62,compute_62]

But doesn’t change anything.

The thing is that I use virtualenv to separate clearly my python environment, if I build opencv from source would it still be accessible ?

Maybe it’s a problem of path to access OpenCV ? How could I check those ?

Thank you

EDIT[1]:
I’ve checked my install of opencv (the procedure I followed is here: https://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/) by running some commands and here are the results:

nvidia@tegra-ubuntu:~$ pkg-config --cflags opencv
-I/usr/local/include/opencv -I/usr/local/include
nvidia@tegra-ubuntu:~$ pkg-config --libs opencv
-L/usr/local/lib -lopencv_cudabgsegm -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_cudawarping -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dpm -lopencv_face -lopencv_photo -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_freetype -lopencv_fuzzy -lopencv_img_hash -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_dnn -lopencv_plot -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ml -lopencv_cudaarithm -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_flann -lopencv_xobjdetect -lopencv_imgcodecs -lopencv_objdetect -lopencv_xphoto -lopencv_imgproc -lopencv_core -lopencv_cudev
nvidia@tegra-ubuntu:~$ ls -l /usr/local/lib/p
pkgconfig/ python2.7/ python3.5/ 
nvidia@tegra-ubuntu:~$ ls -l /usr/local/lib/python3.5/site-packages/
total 4972
drwxr-sr-x 3 root staff    4096 May  9 13:52 cv2
-rw-r--r-- 1 root staff 5086776 Feb 18 11:39 cv2.so

From what I can sense I’d says it’s related to OpenCV compilation, as if it couldn’t compile correctly even though OpenCV is at the right place…is it possible there is a permission problem ?

Hi,

We pre-install an OpenCV-3.3 library in some JetPack version.
Which JetPack version do you use?

If there is a preinstalled OpenCV, you will need to uninstall it first.
Guess that the darnet is linked to the v3.3 package and leads to this issue.

Thanks.

Hi,

I have Jetpack3.3 (R28) installed on the Jetson.

Okay so you mean there is a conflict between the 2 versions of OpenCV right ? How could I check if I actually have 2 versions of OpenCV ?

Because when I followed the procedure there is a step at the beginnning consisting in purging any other openCV version to have a fresh environment…

Can you give me the command to check the versions of OpenCV ?

Thank you

EDIT_1:

I tried this command to check OpenCV version and here is what I get:

nvidia@tegra-ubuntu:~$ pkg-config --modversion opencv
3.4.0

I really think it’s the only version I have on the Jetson.

In the Makefile of darknet, I see those 2 commands that are executed:

ifeq ($(OPENCV), 1) 
COMMON+= -DOPENCV
CFLAGS+= -DOPENCV
LDFLAGS+= `pkg-config --libs opencv` -lstdc++
COMMON+= `pkg-config --cflags opencv`
endif

Is it coming from here ? I don’t see how why the make doesn’t show a real error and still don’t compile using OpenCV.

EDIT_2:
it seems to come from CUDA probably, by making another attempt I get this:

libdarknet.a(cuda.o): In function `check_error':
cuda.c:(.text+0x10): undefined reference to `cudaGetLastError'
cuda.c:(.text+0x2c): undefined reference to `cudaGetErrorString'
cuda.c:(.text+0x68): undefined reference to `cudaGetErrorString'
libdarknet.a(cuda.o): In function `cuda_set_device':
cuda.c:(.text+0xb4): undefined reference to `cudaSetDevice'
libdarknet.a(cuda.o): In function `cuda_get_device':
cuda.c:(.text+0xe8): undefined reference to `cudaGetDevice'
libdarknet.a(cuda.o): In function `blas_handle':
cuda.c:(.text+0x198): undefined reference to `cublasCreate_v2'
libdarknet.a(cuda.o): In function `cuda_make_array':
cuda.c:(.text+0x1f8): undefined reference to `cudaMalloc'
cuda.c:(.text+0x214): undefined reference to `cudaMemcpy'
libdarknet.a(cuda.o): In function `cuda_random':
cuda.c:(.text+0x2c4): undefined reference to `curandCreateGenerator'
cuda.c:(.text+0x2dc): undefined reference to `curandSetPseudoRandomGeneratorSeed'
cuda.c:(.text+0x2fc): undefined reference to `curandGenerateUniform'
cuda.c:(.text+0x300): undefined reference to `cudaPeekAtLastError'
libdarknet.a(cuda.o): In function `cuda_make_int_array':
cuda.c:(.text+0x34c): undefined reference to `cudaMalloc'
cuda.c:(.text+0x368): undefined reference to `cudaMemcpy'
libdarknet.a(cuda.o): In function `cuda_free':
cuda.c:(.text+0x3c0): undefined reference to `cudaFree'
libdarknet.a(cuda.o): In function `cuda_push_array':
cuda.c:(.text+0x3e0): undefined reference to `cudaMemcpy'
libdarknet.a(cuda.o): In function `cuda_pull_array':
cuda.c:(.text+0x40c): undefined reference to `cudaMemcpy'
libdarknet.a(gemm.o): In function `gemm_gpu':
gemm.c:(.text+0x1408): undefined reference to `cublasSgemm_v2'
libdarknet.a(gemm.o): In function `time_gpu':
gemm.c:(.text+0x16c0): undefined reference to `cudaThreadSynchronize'
collect2: error: ld returned 1 exit status
Makefile:84: recipe for target 'darknet' failed
make: *** [darknet] Error 1

Don’t know why it can’t find properly the library though…

I still haven’t solved it yet, can you guys help me on this ?

Hi,

Could you try to setup the OpenCV environment again?

1. Re-flash your device to have a clean environment
2. Remove default package

sudo sudo apt-get purge *libopencv*

3. Install OpenCV from source
https://github.com/AastaNV/JEP/blob/master/script/install_opencv3.4.0_TX2.sh
4. Re-compile the darknet sample

Thanks.

Hi,
I can’t reflash the entire Jetson I have too much going on it…

Concerning OpenCV I can try to reinstall it but I did it well the first time and as I said my problem is that I’ve been compiling without issues for a while and suddenly I can’t do it anymore…

Are there further check I could run to check CUDA, CUDNN and OpenCV libraries ?

Thank you in advance

Hi guys,

I finally found the problem !

It came from OpenCV libraries, I had several version and there was conflict because certain libraries were linked with version 3.4.0 and other with 4.0 (which I don’t understand where it comes from).

So I deleted the libraries from 4.0 and relinked the libraries to the 3.4.0 equivalent.

Then a “make” and everything works again !

FYI: I used “ls -l libopencv*” to see all the OpenCV libraries, then “rm” to delete those from 4.0 version and finally “ln -sf” to relink the libraries.

Thanks for your help
Cheers