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 ...