On Fri, 14 Feb 2020 14:08:08 -0500
George Koehler wrote:

> cwen, you said that a bug [1] in graphics/babl broke the build of
> graphics/gimp/stable on powerpc. 

A few weeks ago on powerpc, i built babl with debug enabled, then
tried to build the gimp. The resulting backtrace was exactly the same
as [1]. That's how i've found that opened upstream issue actually.

> Here's a diff that fixes some calls
> to a va_args(3) function.  It fixes the test in the bug.  I don't know
> whether it unbreaks gimp; I didn't build gimp, because my macppc would
> need to build devel/boost, and I don't want to build boost.  In a
> moment, I will try to update the bug [1].

I'm running a gimp build on powerpc with your diff, but since my chroot
is empty, someone also interested in trying it may beat me.

> This diff fixes the chromaticities test on powerpc, so "make test"
> passes 24 of 25 tests.  The transparent test times out; my iMac might
> be too slow.
> 
> With this diff on amd64, "make test" passes all 25 tests.
> --George
> 
> [1] https://gitlab.gnome.org/GNOME/babl/issues/24
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/babl/Makefile,v
> retrieving revision 1.53
> diff -u -p -r1.53 Makefile
> --- Makefile  25 Jan 2020 06:49:49 -0000      1.53
> +++ Makefile  14 Feb 2020 18:39:37 -0000
> @@ -3,6 +3,7 @@
>  COMMENT=             dynamic pixel format conversion library
>  
>  V=                   0.1.74
> +REVISION=            0
>  DISTNAME=            babl-${V}
>  EXTRACT_SUFX=                .tar.xz
>  
> Index: patches/patch-babl_babl-fish-path_c
> ===================================================================
> RCS file: patches/patch-babl_babl-fish-path_c
> diff -N patches/patch-babl_babl-fish-path_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-babl_babl-fish-path_c       14 Feb 2020 18:39:37
> -0000 @@ -0,0 +1,41 @@
> +$OpenBSD$
> +
> +Pass a function pointer, not a union of function pointers, when
> +calling babl_conversion_new().  This is necessary on powerpc, where
> +the calling convention was passing the union as a pointer to a
> +temporary copy of the union.  The compiler doesn't check the type,
> +because babl_conversion_new() has a va_arg(3) prototype.
> +
> +This fixes the chromaticities test on powerpc,
> +https://gitlab.gnome.org/GNOME/babl/issues/24
> +
> +Index: babl/babl-fish-path.c
> +--- babl/babl-fish-path.c.orig
> ++++ babl/babl-fish-path.c
> +@@ -404,7 +404,7 @@ alias_conversion (Babl *babl,
> +                     (void*)conv->source, (void*)space),
> +               babl_remodel_with_space (
> +                     (void*)conv->destination, (void*)space),
> +-              "linear", conv->function,
> ++              "linear", conv->function.linear,
> +               NULL);
> +         break;
> +       case BABL_CONVERSION_PLANAR:
> +@@ -413,7 +413,7 @@ alias_conversion (Babl *babl,
> +                     (void*)conv->source, (void*)space),
> +               babl_remodel_with_space (
> +                     (void*)conv->destination, (void*)space),
> +-              "planar", conv->function,
> ++              "planar", conv->function.planar,
> +               NULL);
> +         break;
> +       case BABL_CONVERSION_PLANE:
> +@@ -422,7 +422,7 @@ alias_conversion (Babl *babl,
> +                     (void*)conv->source, (void*)space),
> +               babl_remodel_with_space (
> +                     (void*)conv->destination, (void*)space),
> +-              "plane", conv->function,
> ++              "plane", conv->function.plane,
> +               NULL);
> +         break;
> +       default:
> 

Reply via email to