[OE-core] [PATCH v4 1/2] libsdl2: Fix build failure when using mesa 19.2.1

Alistair Francis alistair.francis at wdc.com
Thu Oct 24 21:26:02 UTC 2019


Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
---
 .../0002-Fixed-build-with-mesa-19.2.1.patch   | 53 +++++++++++++++++++
 .../libsdl2/libsdl2_2.0.10.bb                 |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-build-with-mesa-19.2.1.patch

diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-build-with-mesa-19.2.1.patch b/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-build-with-mesa-19.2.1.patch
new file mode 100644
index 0000000000..874ea401f8
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-build-with-mesa-19.2.1.patch
@@ -0,0 +1,53 @@
+# HG changeset patch
+# User Alistair Francis <alistair.francis at wdc.com>
+# Date 1571948613 25200
+#      Thu Oct 24 13:23:33 2019 -0700
+# Node ID 14a94f6e9e77a5c323741aebade5e484a22236cf
+# Parent  f530cdaaab6261e9942a3ec254273533ed0df08c
+Fixed build with mesa 19.2.1
+
+Fix the following two build failures when building for x86 with mesa 19.2.1
+
+In file included from /include/SDL_opengles.h:33,
+                 from /src/video/SDL_video.c:41:
+/usr/include/GLES/gl.h:63:25: error: conflicting types for 'GLsizeiptr'
+  63 | typedef khronos_ssize_t GLsizeiptr;
+     |                         ^~~~~~~~~~
+In file included from /include/SDL_opengl.h:2105,
+                from /src/video/SDL_video.c:37:
+/include/SDL_opengl_glext.h:472:19: note: previous declaration of 'GLsizeiptr' was here
+ 472 | typedef ptrdiff_t GLsizeiptr;
+     |                   ^~~~~~~~~~
+
+
+In file included from /include/SDL_opengles.h:33,
+                from /src/video/SDL_video.c:41:
+/usr/include/GLES/gl.h:64:26: error: conflicting types for 'GLintptr'
+  64 | typedef khronos_intptr_t GLintptr;
+     |                          ^~~~~~~~
+In file included from /include/SDL_opengl.h:2105,
+                from /src/video/SDL_video.c:37:
+/include/SDL_opengl_glext.h:473:19: note: previous declaration of 'GLintptr' was here
+ 473 | typedef ptrdiff_t GLintptr;
+     |                   ^~~~~~~~
+
+Upstream-Status: Submitted [https://bugzilla.libsdl.org/show_bug.cgi?id=4846]
+Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
+
+diff -r f530cdaaab62 -r 14a94f6e9e77 include/SDL_opengl_glext.h
+--- a/include/SDL_opengl_glext.h	Thu Oct 24 18:07:30 2019 +0200
++++ b/include/SDL_opengl_glext.h	Thu Oct 24 13:23:33 2019 -0700
+@@ -468,13 +468,8 @@
+ #ifndef GL_VERSION_1_5
+ #define GL_VERSION_1_5 1
+ #include <stddef.h>
+-#ifdef __MACOSX__
+ typedef long GLsizeiptr;
+ typedef long GLintptr;
+-#else
+-typedef ptrdiff_t GLsizeiptr;
+-typedef ptrdiff_t GLintptr;
+-#endif
+ #define GL_BUFFER_SIZE                    0x8764
+ #define GL_BUFFER_USAGE                   0x8765
+ #define GL_QUERY_COUNTER_BITS             0x8864
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
index cdc8650e17..e25f29acb0 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
@@ -15,6 +15,7 @@ PROVIDES = "virtual/libsdl2"
 SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
            file://more-gen-depends.patch \
            file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \
+           file://0002-Fixed-build-with-mesa-19.2.1.patch \
 "
 
 S = "${WORKDIR}/SDL2-${PV}"
-- 
2.23.0



More information about the Openembedded-core mailing list