GNOME Bugzilla – Bug 795336
egl: build fails using RPi implementation of EGL
Last modified: 2018-04-23 18:31:26 UTC
When building gst-plugins-base using the RPi's implementation of EGL (normally found in /opt/vc), the following occurs: gsteglimage.c: In function 'gst_egl_image_export_dmabuf': gsteglimage.c:479:7: error: unknown type name 'EGLuint64KHR' EGLuint64KHR * modifiers); ^~~~~~~~~~~~ gsteglimage.c:489:3: error: 'gst_eglExportDMABUFImageQueryMESA' undeclared (first use in this function) gst_eglExportDMABUFImageQueryMESA = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gsteglimage.c:489:3: note: each undeclared identifier is reported only once for each function it appears in gsteglimage.c:512:8: warning: implicit declaration of function 'gst_eglExportDMABUFImageQueryMESA' [-Wimplicit-function-declaration] if (!gst_eglExportDMABUFImageQueryMESA (egl_display, image->image, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gsteglimage.c:512:3: warning: nested extern declaration of 'gst_eglExportDMABUFImageQueryMESA' [-Wnested-externs] if (!gst_eglExportDMABUFImageQueryMESA (egl_display, image->image, (The first error causes the following errors and warnings) This is because EGLuint64KHR is not defined in RPi EGL. Since EGLuint64KHR is a typedef alias for khronos_uint64_t and USE_EGL_RPI is defined when using RPi EGL, we can just typedef it in gst-libs/gst/gl/egl/gstegl.h.
Created attachment 371065 [details] [review] egl: fix build when using RPi EGL
Review of attachment 371065 [details] [review]: ::: gst-libs/gst/gl/egl/gstegl.h @@ +53,3 @@ #endif +#if USE_EGL_RPI use #ifdef otherwise you get a warning on non-RPi platforms
Comment on attachment 371065 [details] [review] egl: fix build when using RPi EGL >+++ b/gst-libs/gst/gl/egl/gstegl.h > >+#if USE_EGL_RPI >+typedef khronos_uint64_t EGLuint64KHR; >+#endif >+ This is an installed header, but USE_EGL_RPI will only be defined if compiling gst-gl itself, so will this not cause problems when compiling external things that use this header?
> This is an installed header, but USE_EGL_RPI will only be defined if > compiling gst-gl itself, so will this not cause problems when compiling > external things that use this header? That is true. What we can do instead is move those lines to gsteglimage.c since the only instance of EGLuint64KHR being used is in that file.
Created attachment 371092 [details] [review] egl: fix build when using RPi EGL
Attachment 371092 [details] pushed as 2f3ff84 - egl: fix build when using RPi EGL