Page 1 of 1

(Solved) Fix opencv compilation in vlc-3.0.0 for archlinux

Posted: 11 Feb 2015 20:27
by nokangaroo
vlc-3.0-opencv.patch:

Code: Select all

diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c index 0ca54a3..ce0d900 100644 --- a/modules/video_filter/opencv_wrapper.c +++ b/modules/video_filter/opencv_wrapper.c @@ -39,8 +39,8 @@ #include <vlc_image.h> #include "filter_picture.h" -#include <cxcore.h> -#include <cv.h> +#include <opencv/cxcore.h> +#include <opencv/cv.h> /***************************************************************************** * Local prototypes
also add

Code: Select all

export OPENCV_CFLAGS='-I /usr/include/opencv' export OPENCV_LIBS=`pkg-config --libs opencv`
to your compiler flags.

Re: (Solved) Fix opencv compilation in vlc-3.0.0 for archlinux

Posted: 12 Feb 2015 11:44
by Jean-Baptiste Kempf
Works fine on my Arch.

Re: (Solved) Fix opencv compilation in vlc-3.0.0 for archlinux

Posted: 12 Feb 2015 23:05
by nokangaroo
Sorry, it does not work for me without the patch; I just tried it again:

video_filter/opencv_wrapper.c:42:20: fatal error: cxcore.h: No such file or directory
#include <cxcore.h>
^
compilation terminated.
Makefile:12228: recipe for target 'video_filter/opencv_wrapper.lo' failed
make[4]: *** [video_filter/opencv_wrapper.lo] Error 1
make[4]: Leaving directory '/home/BUILD/vlc-3.0/modules'
Makefile:15234: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/BUILD/vlc-3.0/modules'
Makefile:6956: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/BUILD/vlc-3.0/modules'
Makefile:2260: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/BUILD/vlc-3.0'
Makefile:2145: recipe for target 'all' failed
make: *** [all] Error 2

Exporting the variables is not enough.
After reapplying the patch the compilation finishes.