FS#75739 - [libxml2] libxml2 2.10.2-1 (testing) has wrong catalog path (regression leading to build failures)

Attached to Project: Arch Linux
Opened by gamezelda (gamezelda) - Monday, 29 August 2022, 23:58 GMT
Last edited by Jan Alexander Steffens (heftig) - Tuesday, 30 August 2022, 17:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Levente Polyak (anthraxx)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



With libxml2 2.10.2-1 currently in testing, I noticed that ibus (1.5.27-1) does not build correctly, with an error in the documentations step:

DOC Building HTML
I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"
compilation error: file /usr/share/gtk-doc/data/gtk-doc.xsl line 11 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl

The package builds correctly with libxml2 2.9.14-1.

It appears that the problem is that libxml 2.10 tries to respect SYSCONFDIR (see https://gitlab.gnome.org/GNOME/libxml2/-/commit/865520f04830531fc0a610129202b645521e435f) but by default it is set to $PREFIX/etc, i.e. to /usr/etc in Arch.
So the path to the XML catalog, which should be /etc/xml/catalog as per docbook-xml & co., is now /usr/etc/xml/catalog:

$ tar --wildcards -xf libxml2-2.9.14-1-x86_64.pkg.tar.zst 'usr/lib/libxml2.so*' -O | strings | grep xml/catalog
$ tar --wildcards -xf libxml2-2.10.2-1-x86_64.pkg.tar.zst 'usr/lib/libxml2.so*' -O | strings | grep xml/catalog

Passing --sysconfdir=/etc to ./configure when building libxml2 fixes the problem.

Additional info:
* package version(s): libxml2 2.10.2-1
* config and/or log files etc.: none / see below
* link to upstream bug report, if any: not upstream

Steps to reproduce:

1. Upgrade to current testing so libxml2 2.10.2-1 is present.
2. Try to build the official ibus package from source with ABS
3. Observe how the "DOC Building HTML" step fails
4. Downgrade either the entire system or libxml2/libxslt from testing to stable.
5. Try to build the official ibus package from source with ABS
6. Observe how the package builds correctly

As a quicker reproducer, you can also install and run "/usr/bin/xsltproc --nonet /usr/share/gtk-doc/data/gtk-doc.xsl". Empty output on success (libxml2 2.9 or libxml2 2.10 with fixed --sysconfdir), error on failure (libxml2 2.10 without --sysconfdir).
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Tuesday, 30 August 2022, 17:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  libxml2 2.10.2-2