Help needed with building Darknet with OpenCV support

Hello my fellow redditors at r/robotics,

I am trying to build darknet with OpenCV support. However, I am always getting the following error when I try to run make:

gcc -Iinclude/ -Isrc/ -DOPENCV `pkg-config --cflags opencv` -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV 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 `pkg-config --libs opencv` -lstdc++ libdarknet.a //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.5.8' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.5' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.5.8' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.5.8' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.6.20' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.5.8' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.6.0' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.7.3' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.5.8' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.5.8' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.7.0' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.6.2' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.6.0' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libbluray.so.2: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.5.8' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.5' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.5.8' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.4.30' //usr/lib/libgdal.so.20: undefined reference to `[email protected]_2.5.8' //usr/lib/x86_64-linux-gnu/libcroco-0.6.so.3: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libspatialite.so.7: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.7.3' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.6.11' //usr/lib/x86_64-linux-gnu/libavformat.so.57: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.6.0' //usr/lib/x86_64-linux-gnu/libdap.so.25: undefined reference to `[email protected]_2.4.30' //usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined reference to `[email protected]_2.6.0' collect2: error: ld returned 1 exit status Makefile:77: recipe for target 'darknet' failed make: *** [darknet] Error 1 

I have also posted a more detailed question on StackOverflow, if you want to take a look at that one.. I am really looking forward to your help on this.

Thanks in advance!

submitted by /u/sampreets3
[link] [comments]