Bug 1533660 - Missing include in header file
Summary: Missing include in header file
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: opencv
Version: 27
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
Assignee: Nicolas Chauvet (kwizart)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-11 22:13 UTC by Steve Grubb
Modified: 2018-03-23 18:22 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-23 18:22:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steve Grubb 2018-01-11 22:13:38 UTC
Description of problem:
There is a problem compiling the camera bindings for Torch on F27 that was not there on F25. I suppose there was a version update between the two. In any event, the file /usr/include/opencv/cv.h is missing an include around line 68,

add:
#include "opencv2/videoio/videoio_c.h"

after which compiling works fine.

Version-Release number of selected component (if applicable):
opencv-devel-3.2.0-13.fc27.x86_64

How reproducible:
Always

Steps to Reproduce:
1. luarocks install camera

Actual results:
Fails to compile due to unknown data structures.

Comment 1 Sergio Basto 2018-01-12 15:41:19 UTC
Hi Steve where do have the torch.spec ? , if you build one rpm , or where are the build instructions , my guess is Torch need update and support opencv3 , "opencv2/videoio/videoio_c.h" is one opencv2 header ... 

Best regards,

Comment 2 Steve Grubb 2018-01-12 15:48:39 UTC
Fedora doesn't have any of the AI frameworks packaged because they all need CUDA support. So, everyone has to build it themselves. If you wanted to build torch, I have instructions here:

http://security-plus-data-science.blogspot.com/2018/01/getting-torch-running-on-f27-with-cuda-9.html

But luarocks are not specific to torch. There are other things that use lua and camera is popular if you are doing any kind of Computer Vision research.

Comment 3 Sergio Basto 2018-01-12 16:23:09 UTC
Hi, Steve many thanks for reply and for the report , if we need CUDA , (I think) the packages are eligible for RPMFusion ... 

I'm investigate it now , opencv3 have indeed /usr/include/opencv2/ [1] 
but I don't know if I will have time . 

[1]
https://koji.fedoraproject.org/koji/rpminfo?rpmID=9186430

Comment 4 Sergio Basto 2018-01-28 05:19:03 UTC
Hi, 
the file is available on i686 package [1] but not on x86_64 weird

[1] 
dnf repoquery --releasever=27 --available opencv-devel-0:3.2.0-13.fc27.i686  -l | grep videoio 

/usr/include/opencv2/videoio
/usr/include/opencv2/videoio.hpp
/usr/include/opencv2/videoio/cap_ios.h
/usr/include/opencv2/videoio/videoio.hpp
/usr/include/opencv2/videoio/videoio_c.h
/usr/lib/libopencv_videoio.so

Comment 5 Sergio Basto 2018-01-28 05:42:43 UTC
and not miss either in rawhide opencv-devel-0:3.3.1-3.fc28.x86_64 [1]

I have 3.3.1 on copr if you want check here [2] and easy to install [3] if do not have many dependencies ...


[1] 
dnf repoquery --disablerepo='*' --enablerepo=rawhide --enablerepo=rpmfusion-free-rawhide --available -q opencv-devel  -l | grep videoio 


[2] 
https://copr.fedorainfracloud.org/coprs/sergiomb/opencv/

[3]
dnf copr enable sergiomb/opencv 
dnf config-manager --set-disable sergiomb-opencv
dnf --enablerepo=sergiomb-opencv update  -b --allowerasing --refresh

Comment 6 Fedora Update System 2018-01-29 00:59:06 UTC
opencv-3.2.0-14.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-49681e7e7a

Comment 7 Steve Grubb 2018-01-29 09:01:11 UTC
Its not exactly the case that the file is missing, its that the main include file is not pulling in an important subsystem include. Modifying opencv/cv.h to add one line is all that it takes to fix it.

--- /usr/include/opencv/cv.h.orig	2018-01-29 10:00:20.678835074 +0100
+++ /usr/include/opencv/cv.h	2018-01-29 10:00:51.673837155 +0100
@@ -65,6 +65,7 @@
 #include "opencv2/photo/photo_c.h"
 #include "opencv2/video/tracking_c.h"
 #include "opencv2/objdetect/objdetect_c.h"
+#include "opencv2/videoio/videoio_c.h"
 
 #if !defined(CV_IMPL)
 #define CV_IMPL extern "C"

Comment 8 Sergio Basto 2018-01-29 16:07:29 UTC
OK, I was fooled by repoquery

Comment 9 Fedora Update System 2018-01-29 19:09:07 UTC
opencv-3.2.0-14.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-49681e7e7a

Comment 10 Sergio Basto 2018-01-29 20:24:35 UTC
Hello , 
I checked and OpenCV 3.3.1 don't have it and master [1] also don't have , so we need report it upstream . 

Meanwhile I going unpush opencv-3.2.0-14.fc27 

[1] 
https://github.com/opencv/opencv/tree/master/include/opencv

Comment 11 Sergio Basto 2018-03-23 18:22:16 UTC
Have been some discussions about headers upstream [1] . I know that is not directly related to this report but the point is maybe your project is using an very old opencv api .

Closing as not a bug , please reopen it, if you have more relevant information .

Thanks,


[1]
https://github.com/opencv/opencv/issues/10963
https://github.com/opencv/opencv/issues/5989
https://github.com/opencv/opencv/issues/8382
https://github.com/opencv/opencv/issues/11036
https://github.com/opencv/opencv/issues/6585
https://github.com/opencv/opencv/issues/6221
https://github.com/opencv/opencv/pull/10883
https://github.com/pjreddie/darknet/issues/278


Note You need to log in before you can comment on or make changes to this bug.