Ask Your Question
0

Trouble compiling 3.0 & 3.1 under Debian 8 "jessie"

asked 2016-07-22 09:34:18 -0500

ModernArt gravatar image

updated 2016-07-23 00:34:01 -0500

berak gravatar image

It appears that the failure occurs when attempting to compile the videoio modules. In particular, the gstreamer 0.10 headers fail to be successfully parsed because of object definition errors. The seem to have difficulty with xml2 elements in defining gstreamer objects. Below I have extracted errors from the scene of the crime:

[ 10%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gstreamer.cpp.o
In file included from /usr/include/gstreamer-0.10/gst/gstelement.h:56:0,
                 from /usr/include/gstreamer-0.10/gst/gstbin.h:27,
                 from /usr/include/gstreamer-0.10/gst/gst.h:35,
                 from /root/src/opencv_compile/opencv-3.1.0/modules/videoio/src/cap_gstreamer.cpp:55:
/usr/include/gstreamer-0.10/gst/gstobject.h:290:58: error: \u2018xmlNodePtr\u2019 has not been declared
   void          (*object_saved)     (GstObject * object, GstXmlNodePtr parent);
                                                          ^
/usr/include/gstreamer-0.10/gst/gstobject.h:296:18: error: expected identifier before \u2018*\u2019 token
   GstXmlNodePtr (*save_thyself)     (GstObject * object, GstXmlNodePtr parent);
                  ^
/usr/include/gstreamer-0.10/gst/gstobject.h:296:58: error: \u2018xmlNodePtr\u2019 has not been declared
   GstXmlNodePtr (*save_thyself)     (GstObject * object, GstXmlNodePtr parent);
                                                          ^
/usr/include/gstreamer-0.10/gst/gstobject.h:296:78: error: \u2018xmlNodePtr\u2019 declared as function returning a function
   GstXmlNodePtr (*save_thyself)     (GstObject * object, GstXmlNodePtr parent);
                                                                              ^
/usr/include/gstreamer-0.10/gst/gstobject.h:297:58: error: \u2018xmlNodePtr\u2019 has not been declared
   void          (*restore_thyself)  (GstObject * object, GstXmlNodePtr self);
                                                          ^
/usr/include/gstreamer-0.10/gst/gstobject.h:342:1: error: \u2018xmlNodePtr\u2019 does not name a type
 GstXmlNodePtr   gst_object_save_thyself    (GstObject *object, GstXmlNodePtr parent);
 ^
/usr/include/gstreamer-0.10/gst/gstobject.h:343:64: error: \u2018xmlNodePtr\u2019 has not been declared
 void            gst_object_restore_thyself (GstObject *object, GstXmlNodePtr self);
                                                                ^
/usr/include/gstreamer-0.10/gst/gstobject.h:362:46: error: \u2018xmlNodePtr\u2019 has not been declared
                                              GstXmlNodePtr   self);
                                              ^
In file included from /usr/include/gstreamer-0.10/gst/gstbuffer.h:29:0,
                 from /usr/include/gstreamer-0.10/gst/gstpad.h:30,
                 from /usr/include/gstreamer-0.10/gst/gstelement.h:57,
                 from /usr/include/gstreamer-0.10/gst/gstbin.h:27,
                 from /usr/include/gstreamer-0.10/gst/gst.h:35,
                 from /root/src/opencv_compile/opencv-3.1.0/modules/videoio/src/cap_gstreamer.cpp:55:
/usr/include/gstreamer-0.10/gst/gstcaps.h:289:1: error: \u2018xmlNodePtr\u2019 does not name a type
 xmlNodePtr        gst_caps_save_thyself            (const GstCaps *caps,
 ^
/usr/include/gstreamer-0.10/gst/gstcaps.h:291:53: error: \u2018xmlNodePtr\u2019 was not declared in this scope
 GstCaps *         gst_caps_load_thyself            (xmlNodePtr     parent);
                                                     ^
In file included from /usr/include/gstreamer-0.10/gst/gstelement.h:57:0,
                 from /usr/include/gstreamer-0.10/gst/gstbin.h:27,
                 from /usr/include/gstreamer-0.10/gst/gst.h:35,
                 from /root/src/opencv_compile/opencv-3.1.0/modules/videoio/src/cap_gstreamer.cpp:55:
/usr/include/gstreamer-0.10/gst/gstpad.h:1036:33: error: variable or field \u2018gst_pad_load_and_link\u2019 declared void
 void   gst_pad_load_and_link   (xmlNodePtr self, GstObject *parent);
                                 ^
/usr/include/gstreamer-0.10/gst/gstpad.h:1036:33: error: \u2018xmlNodePtr\u2019 was not declared in this scope
/usr/include/gstreamer-0.10/gst/gstpad.h:1036:60: error: expected primary-expression before \u2018*\u2019 token
 void   gst_pad_load_and_link   (xmlNodePtr self, GstObject *parent);
                                                            ^
/usr/include ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-07-27 10:42:58 -0500

ModernArt gravatar image

Hi again,

I have managed to build OpenCV 3.1 on Debian 8 "jessie". The key appears to have been the use of libjpeg62-turbo-dev instead of ibjpeg8-dev. The maintainers of Debian 8 "jessie" are forcibly migrating users from libjpeg8 and have removed that package from their primary sites in favor of the aforementioned libjpeg62-turbo-dev. Once I removed jpeg62 from my instance and found/installed a jpeg8, the build no longer failed in the videoio module. I found a small error regarding some "#ifdef" compiler directives of little real consequence since they were primarily placed in order to draw additional #include statements to support windows and/or arm processors.

Regards,

Arthur Sera

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-07-22 09:34:18 -0500

Seen: 92 times

Last updated: Jul 27 '16