GNOME Bugzilla – Bug 766475
#warning OMX_SKIP64BIT is not defined - this will be incompatible with the VC GPU code
Last modified: 2016-06-17 21:10:53 UTC
While building gstreamer-master on Rasbian Jesse with gst-omx master I am getting warnings as follows, and some of the elements such as omxmpeg2videodec are silently left unbuilt: Making all in omx make[2]: Entering directory '/home/pi/packages/gstreamer-master/gst-omx/omx' CC libgstomx_la-gstomx.lo In file included from gstomx.h:48:0, from gstomx.c:30: /opt/vc/include/IL/OMX_Core.h:45:4: warning: #warning OMX_SKIP64BIT is not defined - this will be incompatible with the VC GPU code. [-Wcpp] #warning OMX_SKIP64BIT is not defined - this will be incompatible with the VC GPU code. ^ Adding -DOMX_SKIP64BIT to CFLAGS and trying to build again causes other parts of the build to fail as follows: When trying to build gst-omx with OMX_SKIP64BIT manually added via CFLAGS, the build fails as follows: pi@towerofpi7 ~/packages/gstreamer-master/gst-omx $ make make all-recursive make[1]: Entering directory '/home/pi/packages/gstreamer-master/gst-omx' Making all in common make[2]: Entering directory '/home/pi/packages/gstreamer-master/gst-omx/common' Making all in m4 make[3]: Entering directory '/home/pi/packages/gstreamer-master/gst-omx/common/m4' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/pi/packages/gstreamer-master/gst-omx/common/m4' make[3]: Entering directory '/home/pi/packages/gstreamer-master/gst-omx/common' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/pi/packages/gstreamer-master/gst-omx/common' make[2]: Leaving directory '/home/pi/packages/gstreamer-master/gst-omx/common' Making all in omx make[2]: Entering directory '/home/pi/packages/gstreamer-master/gst-omx/omx' CC libgstomx_la-gstomxvideo.lo gstomxvideo.c: In function 'gst_omx_video_find_nearest_frame': gstomxvideo.c:175:7: error: incompatible type for argument 1 of 'gst_util_uint64_scale' gst_util_uint64_scale (buf->omx_buf->nTimeStamp, GST_SECOND, ^ In file included from /usr/local/include/gstreamer-1.0/gst/gst.h:86:0, from gstomxvideo.h:28, from gstomxvideo.c:29: /usr/local/include/gstreamer-1.0/gst/gstutils.h:67:17: note: expected 'guint64' but argument is of type 'OMX_TICKS' guint64 gst_util_uint64_scale (guint64 val, guint64 num, guint64 denom); ^ Makefile:704: recipe for target 'libgstomx_la-gstomxvideo.lo' failed make[2]: *** [libgstomx_la-gstomxvideo.lo] Error 1 make[2]: Leaving directory '/home/pi/packages/gstreamer-master/gst-omx/omx' Makefile:513: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/pi/packages/gstreamer-master/gst-omx' Makefile:444: recipe for target 'all' failed make: *** [all] Error 2 Looks like we have a broken build on gst-omx master.
I can confirm this issue on raspberry pi 3. Is there any version of gst-omx that will build on the RPi3?
This build failure also occurs on the RPi2. I am not sure when this regression was introduced, it is possible it was always broken and the #warning is now highlighting where it is broken.
It's a change in the RPi headers that caused this to appear, and also seems to be completely RPi specific. It was added here: https://github.com/raspberrypi/userland/commit/748b2ba6112435063352d72f48d1d6dcc124bd6f The solution would be to actually #define it when compiling with --with-omx-target=rpi. This would mean also changing all the code that uses the OMX_TICKS and probably other types because: https://github.com/raspberrypi/userland/blob/master/interface/vmcs_host/khronos/IL/OMX_Types.h#L294 Yet another quite intrusive non-standard change to OpenMAX IL. Why even bother using a standard API at all if they change everything that want in incompatible ways...
Created attachment 329934 [details] [review] omx: #define OMX_SKIP64BIT on the RPi as required by their API Also add generic support for OMX_SKIP64BIT to gst-omx, in case other implementations also #define that for whatever reason.
Please test the patch above and let me know if it solves not only the compilation problem for you (it should), but that it also works at runtime.
This patch fixes the compilation--it now compiles with -DOMX_SKIP64BIT in the CFLAGS! However, I can't give it a proper test because whether or not I define OMX_SKIP64BIT, when running a pipeline with omxh264dec in it, I get the following error: 0:00:00.879952953 12318 0x72102430 ERROR omxvideodec gstomxvideodec.c:972:gst_omx_video_dec_reconfigure_output_port:<omxh264dec-omxh264dec0> Failed to negotiate RGBA for EGLImage Not sure if it's related. Let me know if there's any other info I can provide.
That's unrelated, can you file a new bug about that? Together with the exact pipeline you are using an a full debug log with GST_DEBUG=6?
Let's merge this for now then, and if it is not a complete fix someone can reopen it commit a78756c63fac10597e78e93d81767f385b920e81 Author: Sebastian Dröge <sebastian@centricular.com> Date: Fri Jun 17 12:06:48 2016 +0300 omx: #define OMX_SKIP64BIT on the RPi as required by their API Also add generic support for OMX_SKIP64BIT to gst-omx, in case other implementations also #define that for whatever reason. https://bugzilla.gnome.org/show_bug.cgi?id=766475
Thanks. I created bug 767801 about my other problem.