[Bug 286439] textproc/libxml2 local port patch causes random x11/mate-terminal build failures

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 29 Apr 2025 09:17:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286439

            Bug ID: 286439
           Summary: textproc/libxml2 local port patch causes random
                    x11/mate-terminal build failures
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: truckman@FreeBSD.org
                CC: desktop@FreeBSD.org, gnome@FreeBSD.org
                CC: desktop@FreeBSD.org, gnome@FreeBSD.org

The x11/mate-terminal port randomly fails to build.  See:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279034

The itstool python script randomly core dumps when processing the Japanese help
files.  The randomness comes from ASLR.  If I disable ASLR:

# sysctl kern.elf64.aslr.enable=0
kern.elf64.aslr.enable: 1 -> 0

then the core dumps always happen.

Somewhat accidentally, I found that removing the libxml2 local patch,
patch-python_libxml.c, the failures go away.

Our commit for this patch:
https://cgit.freebsd.org/ports/commit/textproc/libxml2/files/patch-python_libxml.c?id=25e6f68a6661303c0c4f23a304d3e0f713e89e11
refers to this upstream bug:
https://bugzilla.gnome.org/show_bug.cgi?id=789714
which has a similar proposed fix.  There is some discussion that the bug should
be fixed elsewhere and be made more comprehensive.  Discussion was moved to
upstream bug
https://gitlab.gnome.org/GNOME/libxml2/-/issues/64.

The latter bug was closed with upstream commit:
https://gitlab.gnome.org/GNOME/libxml2/-/commit/76c6da420923f2721a2e16adfcef8707a2454a1b
which was included in upstream release 2.11.0:
https://gitlab.gnome.org/GNOME/libxml2/-/commits/v2.11.0?ref_type=tags

Since the bug is fixed upsream in the version we are building, we should not
need the local patch.

The local patch *should* just be redundant.  I have no idea why it seems to be
harmful.

-- 
You are receiving this mail because:
You are on the CC list for the bug.