Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/cairo: Fix build with newer gcc
@ 2025-11-25 21:07 Bernd Kuhls
  2026-01-02 22:39 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2025-11-25 21:07 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fixes:
https://autobuild.buildroot.net/results/0e9/0e962c66e1e96b5899e87c13ace824379adc09f9/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 .../0001-Wincompatible-pointer-types.patch    | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/cairo/0001-Wincompatible-pointer-types.patch

diff --git a/package/cairo/0001-Wincompatible-pointer-types.patch b/package/cairo/0001-Wincompatible-pointer-types.patch
new file mode 100644
index 0000000000..79f0347538
--- /dev/null
+++ b/package/cairo/0001-Wincompatible-pointer-types.patch
@@ -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 <bernd@kuhls.net>
+
+--- 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);
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/cairo: Fix build with newer gcc
  2025-11-25 21:07 [Buildroot] [PATCH 1/1] package/cairo: Fix build with newer gcc Bernd Kuhls
@ 2026-01-02 22:39 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-02 22:39 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot, Fabrice Fontaine

Hello Bernd,

On Tue, 25 Nov 2025 22:07:59 +0100
Bernd Kuhls <bernd@kuhls.net> wrote:

> Fixes:
> https://autobuild.buildroot.net/results/0e9/0e962c66e1e96b5899e87c13ace824379adc09f9/
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

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.

> ---
>  .../0001-Wincompatible-pointer-types.patch    | 38 +++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 package/cairo/0001-Wincompatible-pointer-types.patch
> 
> diff --git a/package/cairo/0001-Wincompatible-pointer-types.patch b/package/cairo/0001-Wincompatible-pointer-types.patch
> new file mode 100644
> index 0000000000..79f0347538
> --- /dev/null
> +++ b/package/cairo/0001-Wincompatible-pointer-types.patch
> @@ -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.

> +
> +Upstream: https://gitlab.freedesktop.org/cairo/cairo/-/issues/921
> +
> +Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-02 22:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 21:07 [Buildroot] [PATCH 1/1] package/cairo: Fix build with newer gcc Bernd Kuhls
2026-01-02 22:39 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox