After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766475 - #warning OMX_SKIP64BIT is not defined - this will be incompatible with the VC GPU code
#warning OMX_SKIP64BIT is not defined - this will be incompatible with the VC...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
git master
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-15 13:33 UTC by minfrin
Modified: 2016-06-17 21:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
omx: #define OMX_SKIP64BIT on the RPi as required by their API (11.99 KB, patch)
2016-06-17 09:07 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description minfrin 2016-05-15 13:33:36 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.
Comment 1 zacattackcit 2016-06-15 11:10:04 UTC
I can confirm this issue on raspberry pi 3.  Is there any version of gst-omx that will build on the RPi3?
Comment 2 minfrin 2016-06-15 11:26:13 UTC
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.
Comment 3 Sebastian Dröge (slomo) 2016-06-17 08:52:48 UTC
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...
Comment 4 Sebastian Dröge (slomo) 2016-06-17 09:07:44 UTC
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.
Comment 5 Sebastian Dröge (slomo) 2016-06-17 09:08:21 UTC
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.
Comment 6 zacattackcit 2016-06-17 20:10:47 UTC
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.
Comment 7 Sebastian Dröge (slomo) 2016-06-17 20:16:10 UTC
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?
Comment 8 Sebastian Dröge (slomo) 2016-06-17 20:17:01 UTC
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
Comment 9 zacattackcit 2016-06-17 21:10:53 UTC
Thanks.  I created bug 767801 about my other problem.