summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Congal <yoann.congal@smile.fr>2025-05-06 01:25:57 +0200
committerKhem Raj <raj.khem@gmail.com>2025-05-05 17:42:08 -0700
commit897a6300f56ce38bcead1f1428b4103268156edf (patch)
tree7d19cc58d9aa12ea7eab85acd3488f8f560fe754
parent4d18427d4434e822972a3ba6772d5e1d607dcc17 (diff)
downloadmeta-openembedded-897a6300f56ce38bcead1f1428b4103268156edf.tar.gz
cogl-1.0: fix incompatible-pointer-types build error
Use an intermediary (void *) cast to workaround the incompatible-pointer-types error. This corrects these 4 errors: |../../cogl-1.22.8/cogl-path/cogl-path.c: In function '_cogl_path_build_fill_attribute_buffer': |../../cogl-1.22.8/cogl-path/cogl-path.c:1361:20: error: passing argument 3 of 'gluTessCallback' from incompatible pointer type [-Wincompatible-pointer-types] | 1361 | _cogl_path_tesselator_begin); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | void (*)(GLenum, CoglPathTesselator *) {aka void (*)(unsigned int, struct _CoglPathTesselator *)} |In file included from ../../cogl-1.22.8/cogl-path/cogl-path.c:49: |../../cogl-1.22.8/cogl-path/tesselator/tesselator.h:57:70: note: expected 'void (*)(void)' but argument is of type 'void (*)(GLenum, CoglPathTesselator *)' {aka 'void (*)(unsigned int, struct _CoglPathTesselator *)'} | 57 | void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); | | ~~~~~~~~~~~~^~~~~~~~~~~~ |../../cogl-1.22.8/cogl-path/cogl-path.c:1094:1: note: '_cogl_path_tesselator_begin' declared here | 1094 | _cogl_path_tesselator_begin (GLenum type, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ |../../cogl-1.22.8/cogl-path/cogl-path.c:1363:20: error: passing argument 3 of 'gluTessCallback' from incompatible pointer type [-Wincompatible-pointer-types] | 1363 | _cogl_path_tesselator_vertex); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | void (*)(void *, CoglPathTesselator *) {aka void (*)(void *, struct _CoglPathTesselator *)} |../../cogl-1.22.8/cogl-path/tesselator/tesselator.h:57:70: note: expected 'void (*)(void)' but argument is of type 'void (*)(void *, CoglPathTesselator *)' {aka 'void (*)(void *, struct _CoglPathTesselator *)'} | 57 | void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); | | ~~~~~~~~~~~~^~~~~~~~~~~~ |../../cogl-1.22.8/cogl-path/cogl-path.c:1164:1: note: '_cogl_path_tesselator_vertex' declared here | 1164 | _cogl_path_tesselator_vertex (void *vertex_data, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ |../../cogl-1.22.8/cogl-path/cogl-path.c:1365:20: error: passing argument 3 of 'gluTessCallback' from incompatible pointer type [-Wincompatible-pointer-types] | 1365 | _cogl_path_tesselator_end); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | void (*)(CoglPathTesselator *) {aka void (*)(struct _CoglPathTesselator *)} |../../cogl-1.22.8/cogl-path/tesselator/tesselator.h:57:70: note: expected 'void (*)(void)' but argument is of type 'void (*)(CoglPathTesselator *)' {aka 'void (*)(struct _CoglPathTesselator *)'} | 57 | void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); | | ~~~~~~~~~~~~^~~~~~~~~~~~ |../../cogl-1.22.8/cogl-path/cogl-path.c:1223:1: note: '_cogl_path_tesselator_end' declared here | 1223 | _cogl_path_tesselator_end (CoglPathTesselator *tess) | | ^~~~~~~~~~~~~~~~~~~~~~~~~ |../../cogl-1.22.8/cogl-path/cogl-path.c:1367:20: error: passing argument 3 of 'gluTessCallback' from incompatible pointer type [-Wincompatible-pointer-types] | 1367 | _cogl_path_tesselator_combine); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | void (*)(double *, void **, float *, void **, CoglPathTesselator *) {aka void (*)(double *, void **, float *, void **, struct _CoglPathTesselator *)} |../../cogl-1.22.8/cogl-path/tesselator/tesselator.h:57:70: note: expected 'void (*)(void)' but argument is of type 'void (*)(double *, void **, float *, void **, CoglPathTesselator *)' {aka 'void (*)(double *, void **, float *, void **, struct _CoglPathTesselator *)'} | 57 | void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); | | ~~~~~~~~~~~~^~~~~~~~~~~~ |../../cogl-1.22.8/cogl-path/cogl-path.c:1229:1: note: '_cogl_path_tesselator_combine' declared here | 1229 | _cogl_path_tesselator_combine (double coords[3], | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |make[3]: *** [Makefile:905: libcogl_path_la-cogl-path.lo] Error 1 Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-gnome/recipes-graphics/cogl/cogl-1.0/0001-cogl-path-add-explicit-cast-to-avoid-an-incompatible.patch94
-rw-r--r--meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb5
2 files changed, 98 insertions, 1 deletions
diff --git a/meta-gnome/recipes-graphics/cogl/cogl-1.0/0001-cogl-path-add-explicit-cast-to-avoid-an-incompatible.patch b/meta-gnome/recipes-graphics/cogl/cogl-1.0/0001-cogl-path-add-explicit-cast-to-avoid-an-incompatible.patch
new file mode 100644
index 0000000000..a9f2d654d1
--- /dev/null
+++ b/meta-gnome/recipes-graphics/cogl/cogl-1.0/0001-cogl-path-add-explicit-cast-to-avoid-an-incompatible.patch
@@ -0,0 +1,94 @@
1From 69690b0fdff43cdf6ab1718cd86396de3b27081f Mon Sep 17 00:00:00 2001
2From: Yoann Congal <yoann.congal@smile.fr>
3Date: Tue, 6 May 2025 00:00:38 +0200
4Subject: [PATCH] cogl-path: add explicit cast to avoid an
5 incompatible-pointer-types error
6
7Callbacks declarations are not compatible with gluTessCallback(...,
8_GLUfuncptr CallBackFunc) under gcc15. Use an intermediary (void *) cast
9to workaround the incompatible-pointer-types error.
10
11This is safe to do because inside gluTessCallback(), function pointers
12are cast back to their proper prototypes.
13
14This corrects these 4 errors:
15|../../cogl-1.22.8/cogl-path/cogl-path.c: In function '_cogl_path_build_fill_attribute_buffer':
16|../../cogl-1.22.8/cogl-path/cogl-path.c:1361:20: error: passing argument 3 of 'gluTessCallback' from incompatible pointer type [-Wincompatible-pointer-types]
17| 1361 | _cogl_path_tesselator_begin);
18| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
19| | |
20| | void (*)(GLenum, CoglPathTesselator *) {aka void (*)(unsigned int, struct _CoglPathTesselator *)}
21|In file included from ../../cogl-1.22.8/cogl-path/cogl-path.c:49:
22|../../cogl-1.22.8/cogl-path/tesselator/tesselator.h:57:70: note: expected 'void (*)(void)' but argument is of type 'void (*)(GLenum, CoglPathTesselator *)' {aka 'void (*)(unsigned int, struct _CoglPathTesselator *)'}
23| 57 | void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
24| | ~~~~~~~~~~~~^~~~~~~~~~~~
25|../../cogl-1.22.8/cogl-path/cogl-path.c:1094:1: note: '_cogl_path_tesselator_begin' declared here
26| 1094 | _cogl_path_tesselator_begin (GLenum type,
27| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
28|../../cogl-1.22.8/cogl-path/cogl-path.c:1363:20: error: passing argument 3 of 'gluTessCallback' from incompatible pointer type [-Wincompatible-pointer-types]
29| 1363 | _cogl_path_tesselator_vertex);
30| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
31| | |
32| | void (*)(void *, CoglPathTesselator *) {aka void (*)(void *, struct _CoglPathTesselator *)}
33|../../cogl-1.22.8/cogl-path/tesselator/tesselator.h:57:70: note: expected 'void (*)(void)' but argument is of type 'void (*)(void *, CoglPathTesselator *)' {aka 'void (*)(void *, struct _CoglPathTesselator *)'}
34| 57 | void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
35| | ~~~~~~~~~~~~^~~~~~~~~~~~
36|../../cogl-1.22.8/cogl-path/cogl-path.c:1164:1: note: '_cogl_path_tesselator_vertex' declared here
37| 1164 | _cogl_path_tesselator_vertex (void *vertex_data,
38| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
39|../../cogl-1.22.8/cogl-path/cogl-path.c:1365:20: error: passing argument 3 of 'gluTessCallback' from incompatible pointer type [-Wincompatible-pointer-types]
40| 1365 | _cogl_path_tesselator_end);
41| | ^~~~~~~~~~~~~~~~~~~~~~~~~
42| | |
43| | void (*)(CoglPathTesselator *) {aka void (*)(struct _CoglPathTesselator *)}
44|../../cogl-1.22.8/cogl-path/tesselator/tesselator.h:57:70: note: expected 'void (*)(void)' but argument is of type 'void (*)(CoglPathTesselator *)' {aka 'void (*)(struct _CoglPathTesselator *)'}
45| 57 | void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
46| | ~~~~~~~~~~~~^~~~~~~~~~~~
47|../../cogl-1.22.8/cogl-path/cogl-path.c:1223:1: note: '_cogl_path_tesselator_end' declared here
48| 1223 | _cogl_path_tesselator_end (CoglPathTesselator *tess)
49| | ^~~~~~~~~~~~~~~~~~~~~~~~~
50|../../cogl-1.22.8/cogl-path/cogl-path.c:1367:20: error: passing argument 3 of 'gluTessCallback' from incompatible pointer type [-Wincompatible-pointer-types]
51| 1367 | _cogl_path_tesselator_combine);
52| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53| | |
54| | void (*)(double *, void **, float *, void **, CoglPathTesselator *) {aka void (*)(double *, void **, float *, void **, struct _CoglPathTesselator *)}
55|../../cogl-1.22.8/cogl-path/tesselator/tesselator.h:57:70: note: expected 'void (*)(void)' but argument is of type 'void (*)(double *, void **, float *, void **, CoglPathTesselator *)' {aka 'void (*)(double *, void **, float *, void **, struct _CoglPathTesselator *)'}
56| 57 | void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
57| | ~~~~~~~~~~~~^~~~~~~~~~~~
58|../../cogl-1.22.8/cogl-path/cogl-path.c:1229:1: note: '_cogl_path_tesselator_combine' declared here
59| 1229 | _cogl_path_tesselator_combine (double coords[3],
60| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61|make[3]: *** [Makefile:905: libcogl_path_la-cogl-path.lo] Error 1
62
63Upstream-Status: Inactive-Upstream [lastcommit: 2021-05-02]
64Gitlab instance is redirected to https://gitlab.gnome.org/Archive/cogl
65with a notice: "This is an archived project. Repository and other
66project resources are read-only."
67
68Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
69---
70 cogl-path/cogl-path.c | 8 ++++----
71 1 file changed, 4 insertions(+), 4 deletions(-)
72
73diff --git a/cogl-path/cogl-path.c b/cogl-path/cogl-path.c
74index 2b4b3c6..f87ea4a 100644
75--- a/cogl-path/cogl-path.c
76+++ b/cogl-path/cogl-path.c
77@@ -1358,13 +1358,13 @@ _cogl_path_build_fill_attribute_buffer (CoglPath *path)
78 gluTessNormal (tess.glu_tess, 0.0, 0.0, 1.0);
79
80 gluTessCallback (tess.glu_tess, GLU_TESS_BEGIN_DATA,
81- _cogl_path_tesselator_begin);
82+ (void *) _cogl_path_tesselator_begin);
83 gluTessCallback (tess.glu_tess, GLU_TESS_VERTEX_DATA,
84- _cogl_path_tesselator_vertex);
85+ (void *) _cogl_path_tesselator_vertex);
86 gluTessCallback (tess.glu_tess, GLU_TESS_END_DATA,
87- _cogl_path_tesselator_end);
88+ (void *) _cogl_path_tesselator_end);
89 gluTessCallback (tess.glu_tess, GLU_TESS_COMBINE_DATA,
90- _cogl_path_tesselator_combine);
91+ (void *) _cogl_path_tesselator_combine);
92
93 gluTessBeginPolygon (tess.glu_tess, &tess);
94
diff --git a/meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb b/meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb
index b9446fab38..8e9a74d20d 100644
--- a/meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb
+++ b/meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb
@@ -1,6 +1,9 @@
1require cogl-1.0.inc 1require cogl-1.0.inc
2 2
3SRC_URI += "file://0001-configure.ac-don-t-require-eglmesaext.h.patch" 3SRC_URI += " \
4 file://0001-configure.ac-don-t-require-eglmesaext.h.patch \
5 file://0001-cogl-path-add-explicit-cast-to-avoid-an-incompatible.patch \
6"
4SRC_URI[archive.sha256sum] = "a805b2b019184710ff53d0496f9f0ce6dcca420c141a0f4f6fcc02131581d759" 7SRC_URI[archive.sha256sum] = "a805b2b019184710ff53d0496f9f0ce6dcca420c141a0f4f6fcc02131581d759"
5 8
6LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84" 9LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"