Opened 5 years ago

Last modified 5 years ago

#7059 new enhancement

Compile error in ffmpeg git master with opencv 3.4.1

Reported by: bermond Owned by:
Priority: wish Component: avfilter
Version: git-master Keywords: opencv
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


I'm getting the following error at configure time when trying to compile ffmpeg git-master with the newly released opencv 3.4.1:

ERROR: libopencv not found

Relevant ffbuild/config.log section:

In file included from /usr/include/opencv2/core/types_c.h:59:0,
                 from /usr/include/opencv2/core/core_c.h:48,
                 from /tmp/ffconf.Rgo00uNd/test.c:1:
/usr/include/opencv2/core/cvdef.h:485:1: error: unknown type name 'namespace'
 namespace cv {
/usr/include/opencv2/core/cvdef.h:485:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 namespace cv {
ERROR: libopencv not found

It compiles fine when using opencv 3.4.0.

How to reproduce:

$ git clone
$ cd ffmpeg
$ ./configure --enable-libopencv

A relevant issue (#10963) is opened at the official opencv github repository regarding the same error when compiling vlc. Here is a quote of opencv developer Alexander Alekhin when answering this issue: "OpenCV 3.x doesn't not support C compilation mode officially. There are still legacy C API calls (from OpenCV 1.x) but they should be compiled in C++ compilation mode".

System information:
OS: Arch Linux x86_64
Compiler: gcc 7.3.0
FFmpeg: git master
OpenCV: 3.4.1

Change History (2)

comment:1 by bermond, 5 years ago

Version: unspecifiedgit-master

comment:2 by Carl Eugen Hoyos, 5 years ago

Component: undeterminedavfilter
Keywords: opencv added
Priority: normalwish
Type: defectenhancement
Note: See TracTickets for help on using tickets.