Description of problem: Cannot use OpenCV C API in full Version-Release number of selected component (if applicable): 2.4.5-1.fc19 How reproducible: Persistent Steps to Reproduce: 1. create OpenCV "Hello world" 2. Include 'opencv2/video/video.hpp' (there is no C header) 3. Compile Actual results: /usr/include/opencv2/video/background_segm.hpp:47:10: fatal error: 'list' file not found Expected results: Successful compilation Additional info: 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 2.4.6.1 was already prepared and I've just kicked the build. Please test and report in the ticket.
opencv-2.4.6.1-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/opencv-2.4.6.1-1.fc19
opencv-2.4.6.1-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/opencv-2.4.6.1-1.fc18
Package opencv-2.4.6.1-1.fc18: * 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-2.4.6.1-1.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-14185/opencv-2.4.6.1-1.fc18 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 2.4.6.1 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: %files devel %{_includedir}/opencv %{_includedir}/opencv2 ... http://pkgs.fedoraproject.org/cgit/opencv.git/plain/opencv.spec 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-2.4.6.1.tar.xz $ cd opencv-2.4.6.1 $ 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 And: > /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/ /usr/include/opencv2/video/background_segm.hpp /usr/include/opencv2/video/tracking.hpp /usr/include/opencv2/video/video.hpp
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-2.4.6.1.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/ Ticket: http://code.opencv.org/issues/3192
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-2.4.6.1-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-2.4.6.1-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.