- Python 3.11’s
pyexpat
extension was compiled against Expat ≥ 2.6, where the symbolXML_SetReparseDeferralEnabled
was first introduced. libexpat.github.io - The SLE 15 SP4 build root still ships Expat 2.4.x (see the distro changelog: “Update to 2.4.4 in SLE-15-SP4”). build.opensuse.org
- At build time the loader finds the older
libexpat.so.1
, can’t resolve the new symbol, and the very first Python invocation (python3.11 -m pip wheel …
) aborts:
ImportError: … pyexpat … undefined symbol: XML_SetReparseDeferralEnabled
- Pull a newer Expat into the buildroot
- Make sure the project repo list for
SLE_15_SP4
includes openSUSE:Backports:SLE-15-SP4 (or its:Update
) – that repo already carriesexpat ≥ 2.6
. - Add an explicit dependency so the resolver can choose it:
BuildRequires: libexpat-devel >= 2.6.0
Requires: libexpat1 >= 2.6.0
%if 0%{?suse_version} == 150400
BuildRequires: libexpat-devel >= 2.6.0
Requires: libexpat1 >= 2.6.0
%endif
- Quick one-off test without touching project meta:
osc build --clean \
--alternative-project openSUSE:Backports:SLE-15-SP4 \
standard x86_64
- Test locally with Backports enabled:
osc meta prj home:gbasso:branches:Cloud:Tools -e
Edit meta file. Just add one line to the existing <repository name="SLE_15_SP4">
section:
<repository name="SLE_15_SP4">
<path project="SUSE:SLE-15-SP4:GA" repository="standard"/>
<path project="SUSE:SLE-15-SP4:Update" repository="standard"/>
<!-- Backports overlay (gives us Expat ≥2.6) -->
<path project="openSUSE:Backports:SLE-15-SP4" repository="standard"/>
<arch>x86_64</arch>
<arch>i586</arch>
</repository>
Update working copy -> osc up
Run build -> osc build --clean SLE_15_SP4 x86_64