GNOME Bugzilla – Bug 776363
gst-omx fails to build with bellagio and generic targets
Last modified: 2018-11-03 13:01:12 UTC
This is on my uninstalled environment but that shouldn't be relevant. I've got Bellagio (0.9.3) installed system-wide and building is failing after configure succeeds with --with-omx-target=bellagio and/or generic. Problem is gstomx.h's unconditional dependency on Bellagio-undefined OMX_VERSION_MAJOR/MINOR macros leading to: [..] gstomxvideodec.c: In function ‘gst_omx_video_dec_open’: gstomx.h:73:36: error: ‘OMX_VERSION_MAJOR’ undeclared (first use in this function) (st)->nVersion.s.nVersionMajor = OMX_VERSION_MAJOR; \ ^ gstomxvideodec.c:178:5: note: in expansion of macro ‘GST_OMX_INIT_STRUCT’ GST_OMX_INIT_STRUCT (¶m); ^~~~~~~~~~~~~~~~~~~ gstomx.h:73:36: note: each undeclared identifier is reported only once for each function it appears in (st)->nVersion.s.nVersionMajor = OMX_VERSION_MAJOR; \ ^ gstomxvideodec.c:178:5: note: in expansion of macro ‘GST_OMX_INIT_STRUCT’ GST_OMX_INIT_STRUCT (¶m); ^~~~~~~~~~~~~~~~~~~ [..] The OMX_Types.h header shipped with my Bellagio install has 1.1.2 as version: OpenMax IL version 1.1.2 Short of conditionally defining the missing macros to something that makes sense, I don't see any other solution up-front but I will take a look latter if no one beats me to it.
The generic target is using the official OpenMAX IL headers from gst-omx/omx/openmax, which are defining those. And it also builds fine for me with the generic target here, so you're probably using the Bellagio headers. Bellagio is rather broken anyway and not working well with gst-omx (and also useless as it's just software codecs anyway), I wouldn't worry about it here. If its headers don't define these, they should rather be fixed instead of working around it in gst-omx.
A quick solution is to uninstall libomxil-bellagio-dev. And only install the packages for components like libomxil-bellagio0-components-mad. The other solution is to always set HAVE_EXTERNAL_OMX to "no" if [omx_header_path is 'none' and target is 'bellagio']. see https://cgit.freedesktop.org/gstreamer/gst-omx/tree/configure.ac#n173 . Indeed libomxil-bellagio-dev installs omx il headers in /usr/include directly so always detected as external. I can do it if it sounds right.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-omx/issues/12.