package/cairo: Fix build with newer gcc
PATCH 1/1 package/cairo: Fix build with newer gcc
Fixes:
https://autobuild.buildroot.net/results/0e9/0e962c66e1e96b5899e87c13ace824379adc09f9/
--- .../0001-Wincompatible-pointer-types.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 package/cairo/0001-Wincompatible-pointer-types.patch
package/cairo/0001-Wincompatible-pointer-types.patch new file +38 -0
@@ -0,0 +1,38 @@ +Fix build with newer gcc + +Downloaded from +https://github.com/LibreOffice/core/blob/master/external/cairo/cairo/Wincompatible-pointer-types.patch.0 + +Upstream: https://gitlab.freedesktop.org/cairo/cairo/-/issues/921 + +Signed-off-by: Bernd Kuhls <[email protected]> + +--- a/src/cairo-image-source.c ++++ b/src/cairo-image-source.c +@@ -86,7 +86,7 @@ + if (unlikely (image == NULL)) + return NULL; + +- if (_cairo_atomic_ptr_cmpxchg (&__pixman_transparent_image, ++ if (_cairo_atomic_ptr_cmpxchg ((cairo_atomic_intptr_t *) &__pixman_transparent_image, + NULL, image)) + { + pixman_image_ref (image); +@@ -118,7 +118,7 @@ + if (unlikely (image == NULL)) + return NULL; + +- if (_cairo_atomic_ptr_cmpxchg (&__pixman_black_image, ++ if (_cairo_atomic_ptr_cmpxchg ((cairo_atomic_intptr_t *) &__pixman_black_image, + NULL, image)) + { + pixman_image_ref (image); +@@ -150,7 +150,7 @@ + if (unlikely (image == NULL)) + return NULL; + +- if (_cairo_atomic_ptr_cmpxchg (&__pixman_white_image, ++ if (_cairo_atomic_ptr_cmpxchg ((cairo_atomic_intptr_t *) &__pixman_white_image, + NULL, image)) + { + pixman_image_ref (image);
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Bernd,
Quoted 4 lines · On Tue, 25 Nov 2025 22:07:59 +0100 Bernd Kuhls <[email protected]> wrote:
Fixes:
https://autobuild.buildroot.net/results/0e9/0e962c66e1e96b5899e87c13ace824379adc09f9/Signed-off-by Bernd Kuhls <[email protected]>
In the spirit of recent discussions, could you respin this patch with a more specific description, by doing some actual testing: what was the last GCC version that built cairo successfully, and with which GCC version did it start failing.
Quoted 11 lines
--- .../0001-Wincompatible-pointer-types.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 package/cairo/0001-Wincompatible-pointer-types.patchpackage/cairo/0001-Wincompatible-pointer-types.patch new file +0
-0
package/cairo/0001-Wincompatible-pointer-types.patch line 4
Quoted 4 lines
package/cairo/0001-Wincompatible-pointer-types.patch new file +4
-0@@ -0,0 +1,38 @@ +Fix build with newer gcc + +Downloaded from +https://github.com/LibreOffice/core/blob/master/external/cairo/cairo/Wincompatible-pointer-types.patch.0
This link doesn't work anymore, because you pointed to the master branch, from which this patch has probably been removed.
package/cairo/0001-Wincompatible-pointer-types.patch line 8
Quoted 4 lines
package/cairo/0001-Wincompatible-pointer-types.patch new file +4
-0+ +Upstream: https://gitlab.freedesktop.org/cairo/cairo/-/issues/921 + +Signed-off-by: Bernd Kuhls <[email protected]>
Cairo is using Git as its version control-system, so this patch should be Git-formatted.
I see this hasn't been fixed upstream, while Cairo is widely used and well-maintained. Why only us are hitting the issue? Not Fedora, Arch, etc. who use bleeding-edge GCC compilers? Presumably the upstream Cairo developers are also using an up-to-date distro, so why didn't they fix the issue?
Is the issue perhaps happening only with a certain C library? Or maybe it isn't gcc version related after all, or?
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot