GNOME Bugzilla – Bug 786972
Can't compile gstomx
Last modified: 2017-08-30 14:09:34 UTC
So i got a fresh raspian installation on my pi3 pi@raspberrypi:~/tools/gst-omx $ uname -a Linux raspberrypi 4.9.45-v7+ #1031 SMP Fri Aug 25 19:02:16 BST 2017 armv7l GNU/Linux Meanwhile you can get gst-omx from the raspian repos but unfortunately it's a rather old version pi@raspberrypi:~ $ dpkg -l | grep gstreamer ii gir1.2-gstreamer-1.0 1.10.4-1 armhf GObject introspection data for the GStreamer library ii gstreamer1.0-alsa:armhf 1.10.4-1 armhf GStreamer plugin for ALSA ii gstreamer1.0-libav:armhf 1.10.4-1 armhf libav plugin for GStreamer ii gstreamer1.0-omx 1.0.0.1-0+rpi12+jessiepmg armhf GStreamer OpenMAX plugins ii gstreamer1.0-plugins-bad:armhf 1.10.4-1 armhf GStreamer plugins from the "bad" set ii gstreamer1.0-plugins-base:armhf 1.10.4-1 armhf GStreamer plugins from the "base" set ii gstreamer1.0-plugins-good:armhf 1.10.4-1 armhf GStreamer plugins from the "good" set ii gstreamer1.0-plugins-ugly:armhf 1.10.4-1 armhf GStreamer plugins from the "ugly" set ii gstreamer1.0-pulseaudio:armhf 1.10.4-1 armhf GStreamer plugin for PulseAudio ii gstreamer1.0-tools 1.10.4-1 armhf Tools for use with GStreamer ii gstreamer1.0-vaapi:armhf 1.10.4-1+b1 armhf VA-API plugins for GStreamer ii gstreamer1.0-x:armhf 1.10.4-1 armhf GStreamer plugins for X11 and Pango ii libgstreamer-plugins-bad1.0-0:armhf 1.10.4-1 armhf GStreamer development files for libraries from the "bad" set ii libgstreamer-plugins-base1.0-0:armhf 1.10.4-1 armhf GStreamer libraries from the "base" set ii libgstreamer-plugins-base1.0-dev 1.10.4-1 armhf GStreamer development files for libraries from the "base" set ii libgstreamer1.0-0:armhf 1.10.4-1 armhf Core GStreamer libraries and elements ii libgstreamer1.0-dev 1.10.4-1 armhf GS When comparing omxplayer and gstreamer with omx support, the omxplayer beats gstreamer without any doubt in question of performance. the pipeline i'm executing for this is: filesink location="myfile.mp4" ! decodebin ! videoconvert ! fbdevsink device="/dev/fb0" i was now trying to install gst-omx 1.10.4 from git after ./autogen.sh --with-omx-target=rpi i run make and i get pi@raspberrypi:~/tools/gst-omx $ make make all-recursive make[1]: Entering directory '/home/pi/tools/gst-omx' Making all in common make[2]: Entering directory '/home/pi/tools/gst-omx/common' Making all in m4 make[3]: Entering directory '/home/pi/tools/gst-omx/common/m4' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/pi/tools/gst-omx/common/m4' make[3]: Entering directory '/home/pi/tools/gst-omx/common' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/pi/tools/gst-omx/common' make[2]: Leaving directory '/home/pi/tools/gst-omx/common' Making all in omx make[2]: Entering directory '/home/pi/tools/gst-omx/omx' CC libgstomx_la-gstomx.lo In file included from gstomx.c:30:0: gstomx.h:57:26: fatal error: OMX_Broadcom.h: No such file or directory #include <OMX_Broadcom.h> ^ compilation terminated. Makefile:695: recipe for target 'libgstomx_la-gstomx.lo' failed make[2]: *** [libgstomx_la-gstomx.lo] Error 1 make[2]: Leaving directory '/home/pi/tools/gst-omx/omx' Makefile:517: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/pi/tools/gst-omx' Makefile:449: recipe for target 'all' failed make: *** [all] Error 2 pi@raspberrypi:~/tools/gst-omx $ sudo find / -name 'OMX_Broadcom.h' /opt/vc/include/interface/vmcs_host/khronos/IL/OMX_Broadcom.h /opt/vc/include/IL/OMX_Broadcom.h pi@raspberrypi:~/tools/gst-omx $ diff -qs /opt/vc/include/interface/vmcs_host/khronos/IL/OMX_Broadcom.h /opt/vc/include/IL/OMX_Broadcom.h Files /opt/vc/include/interface/vmcs_host/khronos/IL/OMX_Broadcom.h and /opt/vc/include/IL/OMX_Broadcom.h are identical Now I add -I/opt/vc/include/IL to libgstomx_la_CFLAGS in gst-omx/omx/Makefile and make yields pi@raspberrypi:~/tools/gst-omx $ make make all-recursive make[1]: Entering directory '/home/pi/tools/gst-omx' Making all in common make[2]: Entering directory '/home/pi/tools/gst-omx/common' Making all in m4 make[3]: Entering directory '/home/pi/tools/gst-omx/common/m4' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/pi/tools/gst-omx/common/m4' make[3]: Entering directory '/home/pi/tools/gst-omx/common' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/pi/tools/gst-omx/common' make[2]: Leaving directory '/home/pi/tools/gst-omx/common' Making all in omx make[2]: Entering directory '/home/pi/tools/gst-omx/omx' CC libgstomx_la-gstomx.lo In file included from gstomx.h:61:0, from gstomx.c:30: /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:44:14: error: nested redefinition of ‘enum OMX_NALUFORMATSTYPE’ typedef enum OMX_NALUFORMATSTYPE { ^~~~~~~~~~~~~~~~~~~ /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:44:14: error: redeclaration of ‘enum OMX_NALUFORMATSTYPE’ In file included from gstomx.h:57:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Broadcom.h:1932:14: note: originally defined here typedef enum OMX_NALUFORMATSTYPE { ^~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:61:0, from gstomx.c:30: /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:45:5: error: redeclaration of enumerator ‘OMX_NaluFormatStartCodes’ OMX_NaluFormatStartCodes = 1, ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:57:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Broadcom.h:1933:5: note: previous definition of ‘OMX_NaluFormatStartCodes’ was here OMX_NaluFormatStartCodes = 1, ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:61:0, from gstomx.c:30: /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:46:5: error: redeclaration of enumerator ‘OMX_NaluFormatOneNaluPerBuffer’ OMX_NaluFormatOneNaluPerBuffer = 2, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:57:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Broadcom.h:1934:5: note: previous definition of ‘OMX_NaluFormatOneNaluPerBuffer’ was here OMX_NaluFormatOneNaluPerBuffer = 2, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:61:0, from gstomx.c:30: /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:47:5: error: redeclaration of enumerator ‘OMX_NaluFormatOneByteInterleaveLength’ OMX_NaluFormatOneByteInterleaveLength = 4, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:57:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Broadcom.h:1935:5: note: previous definition of ‘OMX_NaluFormatOneByteInterleaveLength’ was here OMX_NaluFormatOneByteInterleaveLength = 4, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:61:0, from gstomx.c:30: /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:48:5: error: redeclaration of enumerator ‘OMX_NaluFormatTwoByteInterleaveLength’ OMX_NaluFormatTwoByteInterleaveLength = 8, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:57:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Broadcom.h:1936:5: note: previous definition of ‘OMX_NaluFormatTwoByteInterleaveLength’ was here OMX_NaluFormatTwoByteInterleaveLength = 8, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:61:0, from gstomx.c:30: /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:49:5: error: redeclaration of enumerator ‘OMX_NaluFormatFourByteInterleaveLength’ OMX_NaluFormatFourByteInterleaveLength = 16, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:57:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Broadcom.h:1937:5: note: previous definition of ‘OMX_NaluFormatFourByteInterleaveLength’ was here OMX_NaluFormatFourByteInterleaveLength = 16, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:61:0, from gstomx.c:30: /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:50:5: error: redeclaration of enumerator ‘OMX_NaluFormatCodingMax’ OMX_NaluFormatCodingMax = 0x7FFFFFFF ^~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:57:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Broadcom.h:1938:5: note: previous definition of ‘OMX_NaluFormatCodingMax’ was here OMX_NaluFormatCodingMax = 0x7FFFFFFF ^~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:61:0, from gstomx.c:30: /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:55:16: error: redefinition of ‘struct OMX_NALSTREAMFORMATTYPE’ typedef struct OMX_NALSTREAMFORMATTYPE{ ^~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:57:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Broadcom.h:1942:16: note: originally defined here typedef struct OMX_NALSTREAMFORMATTYPE{ ^~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:61:0, from gstomx.c:30: /home/pi/tools/gst-omx/omx/openmax/OMX_VideoExt.h:60:3: error: conflicting types for ‘OMX_NALSTREAMFORMATTYPE’ } OMX_NALSTREAMFORMATTYPE; ^~~~~~~~~~~~~~~~~~~~~~~ In file included from gstomx.h:57:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Broadcom.h:1947:3: note: previous declaration of ‘OMX_NALSTREAMFORMATTYPE’ was here } OMX_NALSTREAMFORMATTYPE; ^~~~~~~~~~~~~~~~~~~~~~~ Makefile:696: recipe for target 'libgstomx_la-gstomx.lo' failed make[2]: *** [libgstomx_la-gstomx.lo] Error 1 make[2]: Leaving directory '/home/pi/tools/gst-omx/omx' Makefile:517: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/pi/tools/gst-omx' Makefile:449: recipe for target 'all' failed make: *** [all] Error 2 anyone has an idea how to solve that?
Maybe: CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux" ./autogen.sh --with-omx-target=rpi
or https://bugzilla.gnome.org/show_bug.cgi?id=777383#c0
this one LDFLAGS='-L/opt/vc/lib' CPPFLAGS='-I/opt/vc/include -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux' ./autogen.sh --with-omx-target=rpi --enable-gtk-doc=no --disable-examples worked for me. Thanks
Thx for confirming.