pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.79k stars 21.33k forks source link

libopencv_highgui.so: undefined reference to `TIFFSetField@LIBTIFF_4.0' #281

Open huangh12 opened 6 years ago

huangh12 commented 6 years ago

Hello, Thanks for your code. But when I try to run make, i got the error message below, can you please help me out? Thank you again.

gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./examples/segmenter.c -o obj/segmenter.o gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./examples/regressor.c -o obj/regressor.o gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./examples/classifier.c -o obj/classifier.o gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./examples/coco.c -o obj/coco.o gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./examples/yolo.c -o obj/yolo.o gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./examples/detector.c -o obj/detector.o gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./examples/nightmare.c -o obj/nightmare.o gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./examples/attention.c -o obj/attention.o gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./examples/darknet.c -o obj/darknet.o gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU 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/attention.o obj/darknet.o libdarknet.a -o darknet -lm -pthread pkg-config --libs opencv -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand -lstdc++ libdarknet.a /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to TIFFIsTiled@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference toTIFFOpen@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to TIFFReadEncodedStrip@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference toTIFFSetField@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to TIFFWriteScanline@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference toTIFFGetField@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to TIFFScanlineSize@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference toTIFFSetWarningHandler@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to TIFFSetErrorHandler@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference toTIFFReadEncodedTile@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to TIFFReadRGBATile@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference toTIFFClose@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to TIFFRGBAImageOK@LIBTIFF_4.0' /usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference toTIFFReadRGBAStrip@LIBTIFF_4.0' collect2: error: ld returned 1 exit status make: *** [darknet] Error 1

TheMikeyR commented 6 years ago

You could try to compile without opencv else I believe there are something wrong with your opencv installation.

huangh12 commented 6 years ago

Thank you for the immediate feedback. I'll try that.

ShidiDaisy commented 4 years ago

You could try to compile without opencv else I believe there are something wrong with your opencv installation.

Hi, I got the same issue. I can compile without OpenCV. But if I compile with OpenCV, then I got this issue. I'm using OpenCV 3.1.0 that installed by using "conda install -c menpo opencv3". Is cothere anything wrong with this OpenCV, and how can I solve this issue and compile darknet with opencv?

It seems that the is opencv is work fine by itself.

import cv2 cv2.version '3.1.0'

Thanks