Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Trouble compiling 3.0 & 3.1 under Debian 8 "jessie"

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/gstreamer-0.10/gst/gstpad.h:1036:61: error: \u2018parent\u2019 was not declared in this scope void gst_pad_load_and_link (xmlNodePtr self, GstObject *parent); ^ In file included from /usr/include/gstreamer-0.10/gst/gst.h:77:0, from /root/src/opencv_compile/opencv-3.1.0/modules/videoio/src/cap_gstreamer.cpp:55: /usr/include/gstreamer-0.10/gst/gstxml.h:58:3: error: \u2018xmlNsPtr\u2019 does not name a type xmlNsPtr ns; ^ /usr/include/gstreamer-0.10/gst/gstxml.h:68:66: error: \u2018xmlNodePtr\u2019 has not been declared void (object_loaded) (GstXML xml, GstObject *object, xmlNodePtr self); ^ /usr/include/gstreamer-0.10/gst/gstxml.h:69:66: error: \u2018xmlNodePtr\u2019 has not been declared void (object_saved) (GstXML xml, GstObject *object, xmlNodePtr self); ^ /usr/include/gstreamer-0.10/gst/gstxml.h:78:1: error: \u2018xmlDocPtr\u2019 does not name a type xmlDocPtr gst_xml_write (GstElement *element); ^ /usr/include/gstreamer-0.10/gst/gstxml.h:85:42: error: \u2018xmlDocPtr\u2019 has not been declared gboolean gst_xml_parse_doc (GstXML *xml, xmlDocPtr doc, const guchar *root); ^ /usr/include/gstreamer-0.10/gst/gstxml.h:93:35: error: \u2018xmlNodePtr\u2019 was not declared in this scope GstElement gst_xml_make_element (xmlNodePtr cur, GstObject parent); ^ /usr/include/gstreamer-0.10/gst/gstxml.h:93:61: error: expected primary-expression before \u2018\u2019 token GstElement* gst_xml_make_element (xmlNodePtr cur, GstObject parent); ^ /usr/include/gstreamer-0.10/gst/gstxml.h:93:62: error: \u2018parent\u2019 was not declared in this scope GstElement gst_xml_make_element (xmlNodePtr cur, GstObject parent); ^ /usr/include/gstreamer-0.10/gst/gstxml.h:93:68: error: expression list treated as compound expression in initializer [-fpermissive] GstElement gst_xml_make_element (xmlNodePtr cur, GstObject parent); ^ modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:169: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gstreamer.cpp.o' failed make[2]: [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gstreamer.cpp.o] Error 1 CMakeFiles/Makefile2:8266: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed make[1]: [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 Makefile:147: recipe for target 'all' failed make: ** [all] Error 2

click to hide/show revision 2
No.2 Revision

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

berak gravatar image

Trouble compiling 3.0 & 3.1 under Debian 8 "jessie"

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) (*object_saved)     (GstObject * object, GstXmlNodePtr parent);
                                                          ^
/usr/include/gstreamer-0.10/gst/gstobject.h:296:18: error: expected identifier before \u2018\u2019 \u2018*\u2019 token
   GstXmlNodePtr (save_thyself) (*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) (*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) (*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) (*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, *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 \u2018*\u2019 token
 void   gst_pad_load_and_link   (xmlNodePtr self, GstObject parent);
*parent);
                                                            ^
/usr/include/gstreamer-0.10/gst/gstpad.h:1036:61: error: \u2018parent\u2019 was not declared in this scope
 void   gst_pad_load_and_link   (xmlNodePtr self, GstObject *parent);
                                                             ^
In file included from /usr/include/gstreamer-0.10/gst/gst.h:77:0,
                 from /root/src/opencv_compile/opencv-3.1.0/modules/videoio/src/cap_gstreamer.cpp:55:
/usr/include/gstreamer-0.10/gst/gstxml.h:58:3: error: \u2018xmlNsPtr\u2019 does not name a type
   xmlNsPtr ns;
   ^
/usr/include/gstreamer-0.10/gst/gstxml.h:68:66: error: \u2018xmlNodePtr\u2019 has not been declared
   void (object_loaded) (*object_loaded)         (GstXML xml, *xml, GstObject *object, xmlNodePtr self);
                                                                  ^
/usr/include/gstreamer-0.10/gst/gstxml.h:69:66: error: \u2018xmlNodePtr\u2019 has not been declared
   void (object_saved) (*object_saved)          (GstXML xml, *xml, GstObject *object, xmlNodePtr self);
                                                                  ^
/usr/include/gstreamer-0.10/gst/gstxml.h:78:1: error: \u2018xmlDocPtr\u2019 does not name a type
 xmlDocPtr gst_xml_write  (GstElement *element);
 ^
/usr/include/gstreamer-0.10/gst/gstxml.h:85:42: error: \u2018xmlDocPtr\u2019 has not been declared
 gboolean gst_xml_parse_doc (GstXML *xml, xmlDocPtr doc, const guchar *root);
                                          ^
/usr/include/gstreamer-0.10/gst/gstxml.h:93:35: error: \u2018xmlNodePtr\u2019 was not declared in this scope
 GstElement gst_xml_make_element (xmlNodePtr cur, GstObject parent);
                                   ^
/usr/include/gstreamer-0.10/gst/gstxml.h:93:61: error: expected primary-expression before \u2018\u2019 token
 GstElement* gst_xml_make_element (xmlNodePtr cur, GstObject parent);
*parent);
                                   ^
/usr/include/gstreamer-0.10/gst/gstxml.h:93:61: error: expected primary-expression before \u2018*\u2019 token
 GstElement* gst_xml_make_element (xmlNodePtr cur, GstObject *parent);
                                                             ^
/usr/include/gstreamer-0.10/gst/gstxml.h:93:62: error: \u2018parent\u2019 was not declared in this scope
 GstElement GstElement* gst_xml_make_element (xmlNodePtr cur, GstObject parent);
*parent);
                                                              ^
/usr/include/gstreamer-0.10/gst/gstxml.h:93:68: error: expression list treated as compound expression in initializer [-fpermissive]
 GstElement GstElement* gst_xml_make_element (xmlNodePtr cur, GstObject parent);
*parent);
                                                                    ^
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:169: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gstreamer.cpp.o' failed
make[2]:  *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gstreamer.cpp.o] Error 1
CMakeFiles/Makefile2:8266: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]:  *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:147: recipe for target 'all' failed
make: ** *** [all] Error 2

2