i'm running on fully patched slackware 14.2 64bit.
the ffmpeg slackbuild is complaining that pkg-config can't find opencv
Code:
patching file configure
patching file libavcodec/libopenjpegdec.c
patching file libavcodec/libopenjpegenc.c
patching file libavcodec/libfdk-aacenc.c
ERROR: opencv not found using pkg-config
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
it is actually called opencv4.pc in /usr/lib64/pkgconfig/
but I have tried copying opencv4.pc renaming it opencv.pc, but that didn't work. I also tried replacing " opencv " with " opencv4 " in the ffmpeg configure file prior to running it, but that didn't help apart from it complained it couldn't find opencv4 instead of opencv
running
Code:
pkg-config --exists opencv4&&echo "ok"
produces ok as you would expect, and
Code:
pkg-config --list-all|grep opencv
produces
Code:
opencv4 OpenCV - Open Source Computer Vision Library
so pkgconfig can definitely find opencv4 even if the build script or ffmpeg configure system can't! I had a look at config.log, and tailing the last 17 lines gives
Code:
check_pkg_config opencv opencv/cxcore.h cvCreateImageHeader
pkg-config --exists --print-errors opencv
check_func_headers opencv/cxcore.h cvCreateImageHeader -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -lopencv_gapi -lopencv_stitching -lopencv_videostab -lopencv_structured_light -lopencv_xphoto -lopencv_superres -lopencv_line_descriptor -lopencv_bioinspired -lopencv_rgbd -lopencv_fuzzy -lopencv_hdf -lopencv_cvv -lopencv_xobjdetect -lopencv_phase_unwrapping -lopencv_hfs -lopencv_stereo -lopencv_tracking -lopencv_datasets -lopencv_ml -lopencv_saliency -lopencv_bgsegm -lopencv_aruco -lopencv_ccalib -lopencv_img_hash -lopencv_shape -lopencv_surface_matching -lopencv_reg -lopencv_freetype -lopencv_face -lopencv_photo -lopencv_optflow -lopencv_ximgproc -lopencv_video -lopencv_plot -lopencv_dpm -lopencv_objdetect -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_imgproc -lopencv_flann -lopencv_core
check_ld cc -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -lopencv_gapi -lopencv_stitching -lopencv_videostab -lopencv_structured_light -lopencv_xphoto -lopencv_superres -lopencv_line_descriptor -lopencv_bioinspired -lopencv_rgbd -lopencv_fuzzy -lopencv_hdf -lopencv_cvv -lopencv_xobjdetect -lopencv_phase_unwrapping -lopencv_hfs -lopencv_stereo -lopencv_tracking -lopencv_datasets -lopencv_ml -lopencv_saliency -lopencv_bgsegm -lopencv_aruco -lopencv_ccalib -lopencv_img_hash -lopencv_shape -lopencv_surface_matching -lopencv_reg -lopencv_freetype -lopencv_face -lopencv_photo -lopencv_optflow -lopencv_ximgproc -lopencv_video -lopencv_plot -lopencv_dpm -lopencv_objdetect -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_imgproc -lopencv_flann -lopencv_core
check_cc -I/usr/include/opencv4/opencv -I/usr/include/opencv4
BEGIN /tmp/ffconf.XXzVWgeR.c
1 #include <opencv/cxcore.h>
2 #include <stdint.h>
3 long check_cvCreateImageHeader(void) { return (long) cvCreateImageHeader; }
4 int main(void) { int ret = 0;
5 ret |= ((intptr_t)check_cvCreateImageHeader) & 0xFFFF;
6 return ret; }
END /tmp/ffconf.XXzVWgeR.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -O2 -fPIC -std=c99 -fomit-frame-pointer -fPIC -pthread -I/usr/include/p11-kit-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/bs2b -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -c -o /tmp/ffconf.XXzsAyaV.o /tmp/ffconf.XXzVWgeR.c
/tmp/ffconf.XXzVWgeR.c:1:27: fatal error: opencv/cxcore.h: No such file or directory
compilation terminated.
ERROR: opencv not found using pkg-config
so it is trying to compile a test program, however /usr/include/opencv4/opencv does not exist (it is /usr/inlcude/opencv4/opencv2) and neither does cxcore.h exist - the nearest thing to it is core.hpp
It appears that the test case for opencv is not applicable to opencv (version 4)
has anyone managed to get ffmpeg compiling with opencv ?