Bug 13796 - Problems compiling package gst-plugins-good
Summary: Problems compiling package gst-plugins-good
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2021.02.1
Hardware: All Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-07 13:12 UTC by Alfredo Pons Menargues
Modified: 2022-07-25 13:01 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Configuration file and logs (26.32 KB, application/x-xz)
2021-05-07 13:12 UTC, Alfredo Pons Menargues
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alfredo Pons Menargues 2021-05-07 13:12:26 UTC
Created attachment 8936 [details]
Configuration file and logs

With my configuration for Raspberry Pi 1, the compilation of gst-plugins-good fails. I attach configuration file and compilation logs (extract).

To reproduce the compilation error, just load my configuration and run: 'make'
Comment 1 Peter Seiderer 2021-05-10 20:00:57 UTC
(In reply to Alfredo Pons Menargues from comment #0)

The failure is:

.../host/arm-linucleus-linux-gnueabihf/sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: error: conflicting declaration ‘typedef void* GLsync’
   40 | typedef gpointer GLsync;
      |                  ^~~~~~

.../host/arm-linucleus-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/qopengles2ext.h:24:26: note: previous declaration as ‘typedef struct __GLsync* GLsync’
   24 | typedef struct __GLsync *GLsync;
      |                          ^~~~~~

File gstgl_compat.h:

 39 #if !GST_GL_HAVE_GLSYNC
 40 typedef gpointer GLsync;
 41 #endif

File qopengles2ext.h:

   1 #ifndef __gles2_gl2ext_h_
   2 #define __gles2_gl2ext_h_ 1
   3
   4 #if 0
   5 #pragma qt_no_master_include
   6 #pragma qt_sync_skip_header_check
   7 #pragma qt_sync_stop_processing
   8 #endif
   9
  10 #ifdef __cplusplus
  11 extern "C" {
  12 #endif
  13
  14 #ifndef __gl3_h_
  15 /* These types are defined with reference to <inttypes.h>
  16  * in the Apple extension spec, but here we use the Khronos
  17  * portable types in khrplatform.h, and assume those types
  18  * are always defined.
  19  * If any other extensions using these types are defined,
  20  * the typedefs must move out of this block and be shared.
  21  */
  22 typedef khronos_int64_t GLint64;
  23 typedef khronos_uint64_t GLuint64;
  24 typedef struct __GLsync *GLsync;
  25 #endif

The problem is that gstreamer sees the original gl2ext.h file from
rpi-userland (rpi-userland-093b30bbc2fd083d68cc3ee07e6e555c6e592d11/interface/khronos/include/GLES2/gl2ext.h)
without the additional GLint64, GLuint64 and GLsync typedef definitions but
checks for existance and if not found enables its own versions in gstgl_compat.h,
incompatible with the later ones used from Qt (qopengles2ext.h).

An RFC patch suggested, see:

https://patchwork.ozlabs.org/project/buildroot/patch/20210510195352.13205-1-ps.report@gmx.net/

Only compile tested (yet)...
Comment 2 romain.naour 2022-07-24 13:25:10 UTC
Hello,

This issue can still be reproduced from Buildroot master branch.

Khronos headers are the same since 10 years:

https://github.com/raspberrypi/userland/tree/master/interface/khronos/include/GLES2

In 2014, mesa3d updated Khronos headers to revision 24614 where GLsync moved
from gl2ext.h to gl2.h.

https://gitlab.freedesktop.org/mesa/mesa/-/commit/117d8ce27b7929c42f46f818ac038580877b3086

https://gitlab.freedesktop.org/mesa/mesa/-/commit/d519ebb34cd21cfc13987f2038d7a2ec353a5cfd

I guess it's not only a GLsync issue but a too old khronos headers.

Best regards,
Romain
Comment 3 Thomas Petazzoni 2022-07-25 13:01:20 UTC
Fixed by https://git.buildroot.org/buildroot/commit/?id=e008c0bb104eb952cab27b3887912529f9e8e10e. Thanks a lot!