Our pipeline random failed a few minutes into the build when
building chardet, defusedxml, boolean-py or markupsafe python3
packages. The errors all relates to setuptools but can look a
little different. It was traced down to a race condition in
system-python3/lib64 link handling, so extend existing
handling in ptxd_make_world_install_pack function.

Short errors:

ModuleNotFoundError: No module named 'distutils'
ModuleNotFoundError: No Module named 'setuptools.errors'
FileNotFoundError: ...site-packages/setuptools/logging.py

Long error:

finished target host-system-python3-defusedxml.install.post
----------------------------------------------
target: host-system-python3-markupsafe.install
----------------------------------------------
Traceback (most recent call last):
  File 
"/builds/emperor/ptxdist/platform-emperor/build-host/system-MarkupSafe-3.0.3/setup.py",
 line 5, in <module>
    from setuptools import Extension
  File 
"/builds/emperor/ptxdist/platform-emperor/sysroot-host/usr/lib/system-python3/lib64/python3.14/site-packages/setuptools/__init__.py",
 line 26, in <module>
    from .dist import Distribution
  File 
"/builds/emperor/ptxdist/platform-emperor/sysroot-host/usr/lib/system-python3/lib64/python3.14/site-packages/setuptools/dist.py",
 line 20, in <module>
    from . import (
    ...<4 lines>...
    )
  File 
"/builds/emperor/ptxdist/platform-emperor/sysroot-host/usr/lib/system-python3/lib64/python3.14/site-packages/setuptools/_entry_points.py",
 line 11, in <module>
    from .errors import OptionError
ModuleNotFoundError: No module named 'setuptools.errors'
make: *** 
[/usr/local/lib/ptxdist-2026.07.0/rules/post/ptxd_make_world_install.make:40: 
/builds/emperor/ptxdist/platform-emperor/state/host-system-python3-markupsafe.install]
 Error 1
make: *** Waiting for unfinished jobs....

Signed-off-by: Bruno Thomsen <[email protected]>
Co-developed-by: Lars Alex Pedersen <[email protected]>
---
 scripts/lib/ptxd_make_world_install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/ptxd_make_world_install.sh 
b/scripts/lib/ptxd_make_world_install.sh
index b661036fd..ab8f442a2 100644
--- a/scripts/lib/ptxd_make_world_install.sh
+++ b/scripts/lib/ptxd_make_world_install.sh
@@ -257,7 +257,7 @@ ptxd_make_world_install_pack() {
 
     # remove usr-merge and lib64 symlinks. They exist in sysroot anyways,
     # so avoid races when they are overwritten
-    for link in bin sbin lib lib64 usr/lib64; do
+    for link in bin sbin lib lib64 usr/lib64 usr/lib/system-python3/lib64; do
        link="${pkg_pkg_dir}/${link}"
        if [ -h "${link}" ]; then
            rm "${link}"

base-commit: ad8c2c3283df6fc624b7dfeb83a0449e2f4b92ed
-- 
2.55.0


Reply via email to