#1150703 gegl: FTBFS on ppc64el due to format_sensing test failure with GCC 15

Package:
gegl
Source:
gegl
Description:
Generic Graphics Library Test Program
Submitter:
Viktor Pashaiev
Date:
2026-10-12 17:01:03 UTC
Severity:
normal
Tags:
#1150703#5
Date:
2026-10-12 12:35:50 UTC
From:
To:
Dear Maintainer,

gegl 1:0.4.72-2 fails to build from source on ppc64el when built with GCC 15
due to format_sensing test failure:

  ERROR: ../tests/simple/format-sensing.c:166:test_format_sensing:
  assertion failed: (babl_format_has_alpha (format))
  FAIL: tests/simple/format-sensing 1/1 FAIL 0.05s (exit status: 133 or signal 5 SIGTRAP)

GCC 15 on ppc64el miscompiles the union-based bitwise sign-clearing helper (int_fabsf)
in operations/common/opacity.c, gegl/gegl-math.h, and gegl/buffer/gegl-sampler-cubic.c.
On ppc64el, the mask load is corrupted, causing int_fabsf(value - 1.0f) <= EPSILON
to evaluate to true for value = 0.5f. This bypasses the format conversion in
gegl:opacity and breaks format_sensing.

Replacing the union type-punning hacks with __builtin_fabsf / __builtin_fabs fixes
the issue and compiles directly to the hardware 'fabs' instruction on PowerPC.

Upstream issue: https://gitlab.gnome.org/GNOME/gegl/-/issues/480
Ubuntu tracking bug: https://bugs.launchpad.net/ubuntu/+source/gegl/+bug/2168951

Please find attached the patch.

Regards,
Viktor Pashaiev