Red Hat Bugzilla – Bug 991552
Please update to OpenCV 2.4.6
Last modified: 2013-10-03 21:52:25 EDT
Description of problem:
Cannot use OpenCV C API in full
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create OpenCV "Hello world"
2. Include 'opencv2/video/video.hpp' (there is no C header)
/usr/include/opencv2/video/background_segm.hpp:47:10: fatal error: 'list' file not found
Fixed in OpenCV 2.4.6
For the record, which package failed to build from source ?
It is not about compiling OpenCV from sources. It is about the fact that in OpenCV 2.4.5 Video C API is wrapped into C++ headers. So it is not possible to use OpenCV Video API from C program (it fails with aforementioned error). In OpenCV 2.4.6 they splat C and C++ headers, just like it has already been done for Highgui, Image and Core.
I really need you to anwear my question, not a question that you have invented.
Can you please tell me the exact software in the fedora collection or elsewhere that is actually failing to build with opencv 2.4.5 ? That's required for me to reproduce the problem. Also, would you point me to the upstream fixing commit or bugtracker ?
Created attachment 782331 [details]
A simple C code that invokes OpenCV Video API
the commit is https://github.com/Itseez/opencv/commit/199a35a1051d35a897a42c5812686730a9842830
well, I'm out of time, so I cannot check.
opencv 220.127.116.11 was already prepared and I've just kicked the build.
Please test and report in the ticket.
opencv-18.104.22.168-1.fc19 has been submitted as an update for Fedora 19.
opencv-22.214.171.124-1.fc18 has been submitted as an update for Fedora 18.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing opencv-126.96.36.199-1.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
(In reply to Nicolas Chauvet (kwizart) from comment #6)
> well, I'm out of time, so I cannot check.
> opencv 188.8.131.52 was already prepared and I've just kicked the build.
> Please test and report in the ticket.
tracking_c.h is still missing from /usr/include/opencv2/video
Please look at the aforementioned commit.
There must be another story, because the package includes these two directories completely:
If a header file is missing (and it doesn't appear in the build.log either), find out what's wrong. Btw:
$ tar xfJ opencv-clean-184.108.40.206.tar.xz
$ cd opencv-220.127.116.11
$ find|grep tracking_c
Oh, and although I don't have anything to do with opencv packaging at Fedora, this raised my interest.
The C example source from comment 4 wouldn't even compile:
ocv-contr.c:109:13: error: ‘refresh’ was not declared in this scope
> /usr/include/opencv2/video/background_segm.hpp:47:16: fatal error:
> list: No such file or directory
> #include <list>
No way that could work with a C compiler, because <list> is a C++ Standard Library header that gets included here by opencv internally.
Just for kicks, I can compile the example after switching to g++, <cmath> and commenting out the undeclared variable:
$ g++ ocv-contr.c -o ocv-contr $(pkg-config --cflags --libs opencv) -lX11
Back to the drawing board it seems.
$ rpm -ql opencv-devel|grep video/
Yes indeed tracking_c.h is missing from the sources archive. Reported upstream.
BTW, compiling and installing from git exposes tracking_c.h. Maybe it would be a good idea to clone in the spec file and checkout to the version tag?
Could you add a link to the ticket you've opened?
Pristine opencv-18.104.22.168.tar.gz does not contain tracking_c.h and does not include it anywhere either.
Updating to a git snapshot would involve creating a snapshot tarball and shipping that one: https://fedoraproject.org/wiki/Packaging:SourceURL
In the build system there may not be network access, btw, so packages must not try to download anything.
Q&A URL: http://answers.opencv.org/question/18161/tracking_ch-is-missing-from-2461/
According to the response, it would be NOTABUG here at Fedora. Request to update to 2.4.6 and the compile problem are unrelated.
Agree. The only way to use OpenCV Video API in C is to compile OpenCV from git.
opencv-22.214.171.124-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
opencv-126.96.36.199-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.