From f26412a9c3ecc6aa1f18d79b578cc5684c6f837e Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 15 Oct 2026 00:38:49 +0000 Subject: [PATCH 01/21] Add pyside6-essentials 6.11.2 riscv64 build Base of the pyside6 family (shiboken6 -> pyside6-essentials -> pyside6-addons -> pyside6); pyside-setup's build_scripts/config.py only exposes all/shiboken6/shiboken6-generator/pyside6 as --build-type values, so this workflow runs the full --build-type=pyside6 --standalone build and carves wheels out with the repo's own create_wheels.py, publishing only the Essentials wheel. The same build tree also produces PySide6_Addons and the PySide6 meta-wheel for a future port to extend. --- .../workflows/build-pyside6-essentials.yml | 159 ++++++++++++++++++ docs/packages/pyside6-essentials.yaml | 5 + 2 files changed, 164 insertions(+) create mode 100644 .github/workflows/build-pyside6-essentials.yml create mode 100644 docs/packages/pyside6-essentials.yaml diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml new file mode 100644 index 000000000000..c10ebb3bf9c3 --- /dev/null +++ b/.github/workflows/build-pyside6-essentials.yml @@ -0,0 +1,159 @@ +# SPDX-FileCopyrightText: 2026 The RISE Project +# SPDX-License-Identifier: MIT +--- +# Based on: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/create_wheels.py?h=6.11.2 +name: Build pyside6-essentials wheels (riscv64) + +on: + workflow_dispatch: + inputs: + version: + description: 'Version glob to (re)build; empty builds every version of docs/packages/pyside6-essentials.yaml not released yet' + required: false + default: '' + pull_request: + branches: [main] + paths: + - '.github/workflows/build-pyside6-essentials.yml' + - 'docs/packages/pyside6-essentials.yaml' + push: + branches: [main] + paths: + - '.github/workflows/build-pyside6-essentials.yml' + - 'docs/packages/pyside6-essentials.yaml' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read # to fetch code (actions/checkout) + +env: + MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64 + # Rocky 10's riscv64 repos ship no patchelf package (gotcha 95), and pip installing + # the `patchelf` PyPI package builds NixOS/patchelf from source, which runs its own + # `make check` and fails 8/48 tests on riscv64. pyside-setup's build_patchelf() just + # needs the binary on PATH, so fetch NixOS/patchelf's own riscv64 release instead. + PATCHELF_VERSION: '0.17.2' + PATCHELF_SHA256: '4b28f7bc890c42076b2955be2229ac1607aa9a6d4ee40e33d69517ef0c403a56' + +jobs: + setup: + uses: $/.github/workflows/_setup.yml + with: + package: pyside6-essentials + version: ${{ inputs.version }} + + build_wheels: + needs: [setup] + if: needs.setup.outputs.versions != '[]' + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(needs.setup.outputs.versions) }} + name: Build pyside6-essentials ${{ matrix.version }} cp310-abi3-manylinux_riscv64 + runs-on: ubuntu-24.04-riscv + timeout-minutes: 1440 + + env: + PYSIDE_VERSION: ${{ matrix.version }} + + steps: + - name: Checkout pyside-setup ${{ env.PYSIDE_VERSION }} + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: pyside/pyside-setup + ref: ${{ env.PYSIDE_VERSION }} + persist-credentials: false + + - name: Pull manylinux_riscv64 image + run: docker pull "${MANYLINUX_RISCV64_IMAGE}" + + # pyside-setup's build_scripts/config.py only exposes four --build-type values + # (all/shiboken6/shiboken6-generator/pyside6); PySide6_Essentials, PySide6_Addons + # and the PySide6 meta-wheel aren't build targets at all, they're carved out of + # one accumulated build/a/package_for_wheels tree by create_wheels.py. So + # shiboken6-generator and shiboken6 are rebuilt here too (even though only + # Essentials is published by this workflow) to populate that tree; a future + # pyside6-addons/pyside6 port can extend this same build (gotcha 382). + - name: Build shiboken6-generator, shiboken6 and pyside6, then carve out wheels + run: | + docker run --rm -v "$(pwd):/work" -w /work \ + -e PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ \ + -e PATCHELF_VERSION="${PATCHELF_VERSION}" \ + -e PATCHELF_SHA256="${PATCHELF_SHA256}" \ + "${MANYLINUX_RISCV64_IMAGE}" bash -c ' + set -euxo pipefail + dnf -y install clang-devel llvm-devel "qt6-qt*-devel" \ + libxcb-devel libX11-devel libxkbcommon-devel fontconfig-devel + curl -fsSL -o /tmp/patchelf.tar.gz \ + "https://github.com/NixOS/patchelf/releases/download/${PATCHELF_VERSION}/patchelf-${PATCHELF_VERSION}-riscv64.tar.gz" + echo "${PATCHELF_SHA256} /tmp/patchelf.tar.gz" | sha256sum -c - + tar xzf /tmp/patchelf.tar.gz -C /usr/local + rm -f /tmp/patchelf.tar.gz + pybin=/opt/python/cp312-cp312/bin + export PATH="$pybin:$PATH" + "$pybin/pip" install -q \ + "setuptools==78.1.0" "packaging==24.2" "build==1.2.2.post1" \ + "wheel==0.46.3" "distro==1.9.0" "ninja==1.13.2" "pyproject_hooks==1.2.0" + tar xJf /opt/_internal/static-libs-for-embedding-only.tar.xz -C /opt/_internal + "$pybin/python3" setup.py bdist_wheel \ + --build-type=shiboken6-generator \ + --qtpaths=/usr/bin/qtpaths6 \ + --cmake=/usr/bin/cmake \ + --parallel="$(nproc)" \ + --skip-docs \ + --limited-api=yes + "$pybin/pip" install -q --no-deps dist/shiboken6_generator-*.whl + "$pybin/python3" setup.py bdist_wheel \ + --build-type=shiboken6 \ + --qtpaths=/usr/bin/qtpaths6 \ + --cmake=/usr/bin/cmake \ + --parallel="$(nproc)" \ + --skip-docs \ + --limited-api=yes + "$pybin/pip" install -q dist/shiboken6-*.whl + "$pybin/python3" setup.py bdist_wheel \ + --build-type=pyside6 \ + --standalone \ + --qtpaths=/usr/bin/qtpaths6 \ + --cmake=/usr/bin/cmake \ + --parallel="$(nproc)" \ + --skip-docs \ + --limited-api=yes + "$pybin/python3" create_wheels.py --no-examples + "$pybin/pip" install -q auditwheel + "$pybin/python3" -m auditwheel repair --plat manylinux_2_39_riscv64 \ + -w audited dist/pyside6_essentials-*.whl + rm -f dist/*.whl + mv audited/*.whl dist/ + "$pybin/pip" install -q dist/pyside6_essentials-*.whl + "$pybin/python3" -c " + from PySide6 import QtCore, QtGui, QtWidgets, QtNetwork, QtQml, QtQuick, QtSql, QtSvg + print(\"PySide6 Essentials import OK\") + " + ' + + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: pyside6-essentials-${{ env.PYSIDE_VERSION }}-cp310-abi3-manylinux_riscv64 + path: dist/pyside6_essentials-*.whl + if-no-files-found: error + + publish: + name: Publish pyside6-essentials ${{ matrix.version }} + needs: [setup, build_wheels] + if: needs.setup.outputs.versions != '[]' + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(needs.setup.outputs.versions) }} + permissions: + contents: write + pull-requests: write + uses: $/.github/workflows/_publish-wheel.yml + secrets: + app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }} + with: + artifact-pattern: pyside6-essentials-${{ matrix.version }}-*-manylinux_riscv64 diff --git a/docs/packages/pyside6-essentials.yaml b/docs/packages/pyside6-essentials.yaml new file mode 100644 index 000000000000..90d7bfde914d --- /dev/null +++ b/docs/packages/pyside6-essentials.yaml @@ -0,0 +1,5 @@ +package-name: pyside6-essentials +source-code: https://code.qt.io/cgit/pyside/pyside-setup.git/ +license: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +versions: +- version: 6.11.2 From fb355cb92c9c1a91ee8299d26bc98c0d32d02cac Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 23 Oct 2026 23:48:38 +0000 Subject: [PATCH 02/21] pyside6-essentials: point shiboken at clang builtin headers shiboken6's ApiExtractor looks for libclang's builtin headers under $LLVM_INSTALL_DIR/lib/clang//include, falling back to `llvm-config --libdir`. On Rocky 10 that reports /usr/lib64/llvm21/lib64, while clang-libs installs the headers in /usr/lib/clang/21/include, so every Qt module's generator run failed with "stddef.h file not found". Set LLVM_INSTALL_DIR=/usr for the pyside6 build so it finds them. --- .github/workflows/build-pyside6-essentials.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index c10ebb3bf9c3..46cf2bd1fb6a 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -114,6 +114,12 @@ jobs: --skip-docs \ --limited-api=yes "$pybin/pip" install -q dist/shiboken6-*.whl + # shiboken6 (ApiExtractor) adds libclang builtin headers (stddef.h, ...) from + # $LLVM_INSTALL_DIR/lib/clang//include, else from `llvm-config --libdir`. + # Rocky 10 llvm-config reports /usr/lib64/llvm21/lib64, but clang-libs puts + # the headers in /usr/lib/clang/21/include, so every Qt module failed with + # "stddef.h file not found". Point it at /usr so it finds /usr/lib/clang/21. + LLVM_INSTALL_DIR=/usr \ "$pybin/python3" setup.py bdist_wheel \ --build-type=pyside6 \ --standalone \ From d90e4da7c595f0990ce00e3ce3cca66b88183c1d Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Sun, 25 Oct 2026 18:01:09 +0000 Subject: [PATCH 03/21] pyside6-essentials: patch libpyside for Qt 6.10.1's QMetaPropertyBuilder libpyside/dynamicqmetaobject.cpp calls QMetaPropertyBuilder::setVirtual() and setOverride(), which Qt only added in 6.11. The manylinux_riscv64 image's Qt6 AppStream packages are 6.10.1 (noted in this PR's own description as a known 6.10/6.11 API-surface gap), so the pyside6 build failed: dynamicqmetaobject.cpp:352:17: error: 'class QMetaPropertyBuilder' has no member named 'setVirtual'; did you mean 'setFinal'? dynamicqmetaobject.cpp:353:17: error: 'class QMetaPropertyBuilder' has no member named 'setOverride' Guard both calls behind a QT_VERSION check so the module still builds against 6.10.1, same tradeoff as every other 6.11-only surface this build already exposes as 6.10. Apply it via the usual patches/ mechanism, which needs this repo checked out alongside pyside-setup. --- .../workflows/build-pyside6-essentials.yml | 10 +++++ ...-QMetaPropertyBuilder-setVirtual-set.patch | 43 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 patches/pyside6-essentials/6.11.2/0001-libpyside-guard-QMetaPropertyBuilder-setVirtual-set.patch diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 46cf2bd1fb6a..40c234e7ac0b 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -16,11 +16,13 @@ on: paths: - '.github/workflows/build-pyside6-essentials.yml' - 'docs/packages/pyside6-essentials.yaml' + - 'patches/pyside6-essentials/**' push: branches: [main] paths: - '.github/workflows/build-pyside6-essentials.yml' - 'docs/packages/pyside6-essentials.yaml' + - 'patches/pyside6-essentials/**' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -67,6 +69,14 @@ jobs: ref: ${{ env.PYSIDE_VERSION }} persist-credentials: false + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + path: python-wheels + persist-credentials: false + + - name: Apply patches + run: git apply python-wheels/patches/pyside6-essentials/${{ env.PYSIDE_VERSION }}/*.patch + - name: Pull manylinux_riscv64 image run: docker pull "${MANYLINUX_RISCV64_IMAGE}" diff --git a/patches/pyside6-essentials/6.11.2/0001-libpyside-guard-QMetaPropertyBuilder-setVirtual-set.patch b/patches/pyside6-essentials/6.11.2/0001-libpyside-guard-QMetaPropertyBuilder-setVirtual-set.patch new file mode 100644 index 000000000000..c0367a547806 --- /dev/null +++ b/patches/pyside6-essentials/6.11.2/0001-libpyside-guard-QMetaPropertyBuilder-setVirtual-set.patch @@ -0,0 +1,43 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sun, 25 Oct 2026 00:00:00 +0000 +Subject: [PATCH] libpyside: guard QMetaPropertyBuilder::setVirtual/setOverride + for Qt < 6.11 + +Upstream-Status: Inappropriate [our image ships Qt 6.10.1, not the 6.11.x pyside-setup 6.11.2 expects] + +MetaObjectBuilderPrivate::addProperty() calls +QMetaPropertyBuilder::setVirtual()/setOverride(), which Qt added in +6.11 (alongside the PropertyFlag::Virtual/Override property flags). +As documented in this package's PR description, the manylinux_riscv64 +image only has Rocky 10's Qt6 AppStream packages, which are Qt 6.10.1, +so these two calls fail to compile: + + dynamicqmetaobject.cpp:352:17: error: 'class QMetaPropertyBuilder' has + no member named 'setVirtual'; did you mean 'setFinal'? + dynamicqmetaobject.cpp:353:17: error: 'class QMetaPropertyBuilder' has + no member named 'setOverride' + +Guard both calls with a QT_VERSION check so the module still builds +against 6.10.1; QProperty's VIRTUAL/OVERRIDE qualifiers (QML-only, +cf. QTBUG-115656) simply won't be propagated onto the QMetaObject +under the downleveled Qt, same as every other 6.11-only surface this +build already exposes as 6.10 per the PR description. + +diff --git a/sources/pyside6/libpyside/dynamicqmetaobject.cpp b/sources/pyside6/libpyside/dynamicqmetaobject.cpp +index 0000000..0000000 100644 +--- a/sources/pyside6/libpyside/dynamicqmetaobject.cpp ++++ b/sources/pyside6/libpyside/dynamicqmetaobject.cpp +@@ -349,8 +349,10 @@ int MetaObjectBuilderPrivate::addProperty(const QByteArray &propertyName, + newProperty.setUser(flags.testFlag(PySide::Property::PropertyFlag::User)); + newProperty.setConstant(flags.testFlag(PySide::Property::PropertyFlag::Constant)); + newProperty.setFinal(flags.testFlag(PySide::Property::PropertyFlag::Final)); ++#if QT_VERSION >= QT_VERSION_CHECK(6, 11, 0) + newProperty.setVirtual(flags.testFlag(PySide::Property::PropertyFlag::Virtual)); + newProperty.setOverride(flags.testFlag(PySide::Property::PropertyFlag::Override)); ++#endif + + index = newProperty.index() + m_baseObject->propertyCount(); + m_dirty = true; +-- +2.43.0 From d14fa493fc7ff4818e34bf53bd54a79b90f6c8b3 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 5 Nov 2026 07:57:16 -0800 Subject: [PATCH 04/21] pyside6-essentials: Record target Python versions --- docs/packages/pyside6-essentials.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/pyside6-essentials.yaml b/docs/packages/pyside6-essentials.yaml index 90d7bfde914d..e50a556d8450 100644 --- a/docs/packages/pyside6-essentials.yaml +++ b/docs/packages/pyside6-essentials.yaml @@ -3,3 +3,4 @@ source-code: https://code.qt.io/cgit/pyside/pyside-setup.git/ license: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only versions: - version: 6.11.2 + python-versions: ['3.10'] From 800945206c8a6eb5ef00f0d40f788bc22afba5aa Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 5 Nov 2026 08:32:18 -0800 Subject: [PATCH 05/21] pyside6-essentials: Use dynamic Python matrix --- .github/workflows/build-pyside6-essentials.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 40c234e7ac0b..404e627b2a16 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -53,7 +53,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} + include: ${{ fromJSON(needs.setup.outputs.matrix) }} name: Build pyside6-essentials ${{ matrix.version }} cp310-abi3-manylinux_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 1440 From ab360b8825d825fb849c198af678b54c1b6654da Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 6 Nov 2026 09:22:17 -0800 Subject: [PATCH 06/21] pyside6-essentials: Use target file metadata --- docs/packages/pyside6-essentials.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/packages/pyside6-essentials.yaml b/docs/packages/pyside6-essentials.yaml index e50a556d8450..9758b4756f85 100644 --- a/docs/packages/pyside6-essentials.yaml +++ b/docs/packages/pyside6-essentials.yaml @@ -3,4 +3,5 @@ source-code: https://code.qt.io/cgit/pyside/pyside-setup.git/ license: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only versions: - version: 6.11.2 - python-versions: ['3.10'] + files: + - python: 3.10-abi3:manylinux From 86601b94325b75c9c9203053fb020025470052bf Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 6 Nov 2026 09:54:10 -0800 Subject: [PATCH 07/21] pyside6-essentials: Avoid duplicate platform-independent builds --- .github/workflows/build-pyside6-essentials.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 404e627b2a16..40c234e7ac0b 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -53,7 +53,7 @@ jobs: strategy: fail-fast: false matrix: - include: ${{ fromJSON(needs.setup.outputs.matrix) }} + version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build pyside6-essentials ${{ matrix.version }} cp310-abi3-manylinux_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 1440 From 023d61cfddf78959c02c0a5fdc1c17329778fa15 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Sun, 8 Nov 2026 12:24:09 +0000 Subject: [PATCH 08/21] pyside6-essentials: drop Qt 6.11-only wrappers against Qt 6.10 CMake AUTOMOC failed on QtCore because qbasicreadwritelock_wrapper.cpp is listed unconditionally but shiboken only generates it for Qt >= 6.11 (typesystem since="6.11"), and the image ships Qt 6.10.1. Guard that and the other since="6.11" wrappers (QtGui QQuaternion::Axes, QtGraphs QCustomSeries, QtWebView classes) by Qt version. --- ...op-Qt-6.11-only-wrappers-for-Qt-6.10.patch | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 patches/pyside6-essentials/6.11.2/0002-PySide6-drop-Qt-6.11-only-wrappers-for-Qt-6.10.patch diff --git a/patches/pyside6-essentials/6.11.2/0002-PySide6-drop-Qt-6.11-only-wrappers-for-Qt-6.10.patch b/patches/pyside6-essentials/6.11.2/0002-PySide6-drop-Qt-6.11-only-wrappers-for-Qt-6.10.patch new file mode 100644 index 000000000000..1bb8973910d3 --- /dev/null +++ b/patches/pyside6-essentials/6.11.2/0002-PySide6-drop-Qt-6.11-only-wrappers-for-Qt-6.10.patch @@ -0,0 +1,90 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sun, 8 Nov 2026 00:00:00 +0000 +Subject: [PATCH] PySide6: drop Qt 6.11-only wrappers when building against + Qt < 6.11 + +Upstream-Status: Inappropriate [our image ships Qt 6.10.1, not the 6.11.x pyside-setup 6.11.2 expects] + +The typesystems mark QBasicReadWriteLock, QQuaternion::Axes, +QCustomSeries and QWebView/QWebViewLoadingInfo/QWebViewSettings as +since="6.11", so shiboken skips them against Rocky 10's Qt 6.10.1. The +module CMakeLists still list their *_wrapper.cpp unconditionally, and +CMake's AUTOMOC then aborts on the first missing one: + + AutoGen error + The source file "BIN:/PySide6/QtCore/PySide6/QtCore/ + qbasicreadwritelock_wrapper.cpp" does not exist. + +Remove those sources from the module lists when Qt is older than 6.11. +--- +diff --git a/sources/pyside6/PySide6/QtCore/CMakeLists.txt b/sources/pyside6/PySide6/QtCore/CMakeLists.txt +index 997b0fe..8aa4b66 100644 +--- a/sources/pyside6/PySide6/QtCore/CMakeLists.txt ++++ b/sources/pyside6/PySide6/QtCore/CMakeLists.txt +@@ -207,6 +207,12 @@ ${SPECIFIC_OS_FILES} + ${QtCore_GEN_DIR}/qtcore_module_wrapper.cpp + ) + ++# Qt < 6.11 lacks these classes, so shiboken generates no wrapper for them. ++if(Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_LESS 6.11) ++ list(REMOVE_ITEM QtCore_SRC ++ ${QtCore_GEN_DIR}/qbasicreadwritelock_wrapper.cpp) ++endif() ++ + get_property(QtCore_disabled_features TARGET Qt${QT_MAJOR_VERSION}::Core + PROPERTY QT_DISABLED_PUBLIC_FEATURES) + +diff --git a/sources/pyside6/PySide6/QtGraphs/CMakeLists.txt b/sources/pyside6/PySide6/QtGraphs/CMakeLists.txt +index 1846f59..1f04b65 100644 +--- a/sources/pyside6/PySide6/QtGraphs/CMakeLists.txt ++++ b/sources/pyside6/PySide6/QtGraphs/CMakeLists.txt +@@ -62,6 +62,12 @@ ${QtGraphs_GEN_DIR}/qxyseries_wrapper.cpp + ${QtGraphs_GEN_DIR}/qtgraphs_module_wrapper.cpp + ) + ++# Qt < 6.11 lacks these classes, so shiboken generates no wrapper for them. ++if(Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_LESS 6.11) ++ list(REMOVE_ITEM QtGraphs_SRC ++ ${QtGraphs_GEN_DIR}/qcustomseries_wrapper.cpp) ++endif() ++ + set(QtGraphs_include_dirs ${QtGraphs_SOURCE_DIR} + ${QtGraphs_BINARY_DIR} + ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS} +diff --git a/sources/pyside6/PySide6/QtGui/CMakeLists.txt b/sources/pyside6/PySide6/QtGui/CMakeLists.txt +index 778b1d6..6b1c4a7 100644 +--- a/sources/pyside6/PySide6/QtGui/CMakeLists.txt ++++ b/sources/pyside6/PySide6/QtGui/CMakeLists.txt +@@ -291,6 +291,12 @@ ${QtGui_GEN_DIR}/qwindowstatechangeevent_wrapper.cpp + ${QtGui_GEN_DIR}/qtgui_module_wrapper.cpp + ) + ++# Qt < 6.11 lacks these classes, so shiboken generates no wrapper for them. ++if(Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_LESS 6.11) ++ list(REMOVE_ITEM QtGui_SRC ++ ${QtGui_GEN_DIR}/qquaternion_axes_wrapper.cpp) ++endif() ++ + get_property(QtGui_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui + PROPERTY QT_ENABLED_PUBLIC_FEATURES) + +diff --git a/sources/pyside6/PySide6/QtWebView/CMakeLists.txt b/sources/pyside6/PySide6/QtWebView/CMakeLists.txt +index 4251bac..129af2d 100644 +--- a/sources/pyside6/PySide6/QtWebView/CMakeLists.txt ++++ b/sources/pyside6/PySide6/QtWebView/CMakeLists.txt +@@ -12,6 +12,14 @@ ${QtWebView_GEN_DIR}/qwebviewsettings_wrapper.cpp + ${QtWebView_GEN_DIR}/qtwebview_module_wrapper.cpp + ) + ++# Qt < 6.11 lacks these classes, so shiboken generates no wrapper for them. ++if(Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_LESS 6.11) ++ list(REMOVE_ITEM QtWebView_Src ++ ${QtWebView_GEN_DIR}/qwebview_wrapper.cpp ++ ${QtWebView_GEN_DIR}/qwebviewloadinginfo_wrapper.cpp ++ ${QtWebView_GEN_DIR}/qwebviewsettings_wrapper.cpp) ++endif() ++ + set(QtWebView_include_dirs ${QtWebView_SOURCE_DIR} + ${QtWebView_BINARY_DIR} + ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS} From 642a9d0d87014f12bd271e00be3dc4cd92527785 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 9 Nov 2026 09:50:56 +0000 Subject: [PATCH 09/21] pyside6-essentials: drop QStyleOptionMenuItemV2 wrapper for Qt 6.10 too Run 42480097603's QtWidgets build failed: fatal error: /work/build/.../PySide6/QtWidgets/PySide6/QtWidgets/ qstyleoptionmenuitemv2_wrapper.cpp: No such file or directory typesystem_widgets_common.xml marks QStyleOptionMenuItemV2 since="6.11" same as the QBasicReadWriteLock/Axes/QCustomSeries/QWebView* classes 0002 already guards, so shiboken generates no wrapper for it against Rocky 10's Qt 6.10.1, but QtWidgets/CMakeLists.txt still lists the *_wrapper.cpp unconditionally. QtWidgets isn't AUTOMOC'd like the other modules, so the gap surfaces later, as a ninja Unity-build compile failure rather than an AutoGen error. Extend 0002's same guard to it. --- ...op-Qt-6.11-only-wrappers-for-Qt-6.10.patch | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/patches/pyside6-essentials/6.11.2/0002-PySide6-drop-Qt-6.11-only-wrappers-for-Qt-6.10.patch b/patches/pyside6-essentials/6.11.2/0002-PySide6-drop-Qt-6.11-only-wrappers-for-Qt-6.10.patch index 1bb8973910d3..2cbd44e8781f 100644 --- a/patches/pyside6-essentials/6.11.2/0002-PySide6-drop-Qt-6.11-only-wrappers-for-Qt-6.10.patch +++ b/patches/pyside6-essentials/6.11.2/0002-PySide6-drop-Qt-6.11-only-wrappers-for-Qt-6.10.patch @@ -7,15 +7,22 @@ Subject: [PATCH] PySide6: drop Qt 6.11-only wrappers when building against Upstream-Status: Inappropriate [our image ships Qt 6.10.1, not the 6.11.x pyside-setup 6.11.2 expects] The typesystems mark QBasicReadWriteLock, QQuaternion::Axes, -QCustomSeries and QWebView/QWebViewLoadingInfo/QWebViewSettings as -since="6.11", so shiboken skips them against Rocky 10's Qt 6.10.1. The -module CMakeLists still list their *_wrapper.cpp unconditionally, and -CMake's AUTOMOC then aborts on the first missing one: +QCustomSeries, QWebView/QWebViewLoadingInfo/QWebViewSettings and +QStyleOptionMenuItemV2 as since="6.11", so shiboken skips them against +Rocky 10's Qt 6.10.1. The module CMakeLists still list their +*_wrapper.cpp unconditionally, and CMake's AUTOMOC then aborts on the +first missing one: AutoGen error The source file "BIN:/PySide6/QtCore/PySide6/QtCore/ qbasicreadwritelock_wrapper.cpp" does not exist. +QtWidgets isn't AUTOMOC'd, so there the same gap instead reaches ninja's +Unity build, which fails to compile the #include of the missing file: + + fatal error: .../PySide6/QtWidgets/qstyleoptionmenuitemv2_wrapper.cpp: + No such file or directory + Remove those sources from the module lists when Qt is older than 6.11. --- diff --git a/sources/pyside6/PySide6/QtCore/CMakeLists.txt b/sources/pyside6/PySide6/QtCore/CMakeLists.txt @@ -88,3 +95,20 @@ index 4251bac..129af2d 100644 set(QtWebView_include_dirs ${QtWebView_SOURCE_DIR} ${QtWebView_BINARY_DIR} ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS} +diff --git a/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt +index e1b1332..34ba4af 100644 +--- a/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt ++++ b/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt +@@ -203,6 +203,12 @@ ${SPECIFIC_OS_FILES} + ${QtWidgets_GEN_DIR}/qtwidgets_module_wrapper.cpp + ) + ++# Qt < 6.11 lacks these classes, so shiboken generates no wrapper for them. ++if(Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_LESS 6.11) ++ list(REMOVE_ITEM QtWidgets_SRC ++ ${QtWidgets_GEN_DIR}/qstyleoptionmenuitemv2_wrapper.cpp) ++endif() ++ + set(QtWidgets_include_dirs ${QtWidgets_SOURCE_DIR} + ${QtWidgets_BINARY_DIR} + ${pyside6_SOURCE_DIR} From 38d1f11d00ff83e6fa30b3f1239042c91e66c438 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 10 Nov 2026 00:48:49 +0000 Subject: [PATCH 10/21] pyside6-essentials: pass matrix input to _publish-wheel.yml _publish-wheel.yml now requires a matrix input (main's "publish: Validate effective wheel targets"), but this PR branch forked before that landed and pyside6-essentials has never been merged to main, so build-pyside6-essentials.yml never picked up the matching one-line update every already-published package's workflow got. The merge ref combines the new required-input _publish-wheel.yml with this branch's old build-pyside6-essentials.yml, so any run has failed startup with "Input matrix is required, but not provided". Pass it the same way the mass-update commit did for every other package's publish job. --- .github/workflows/build-pyside6-essentials.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 40c234e7ac0b..5555db90f266 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -172,4 +172,5 @@ jobs: secrets: app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }} with: + matrix: ${{ needs.setup.outputs.matrix }} artifact-pattern: pyside6-essentials-${{ matrix.version }}-*-manylinux_riscv64 From eb821ccbe0e001715b94e3c6b6bee6071ad7aaff Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Wed, 11 Nov 2026 00:31:24 +0000 Subject: [PATCH 11/21] pyside6-essentials: skip bundled Qt tools in the standalone build The --standalone pyside6 build unconditionally rpath-patches assistant/designer/linguist (build_scripts' PYSIDE_UNIX_BUNDLED_TOOLS), with no existence check first. None of the three is installed by the qt6-qt*-devel packages (devel packages carry headers/libs, not these runtime tool binaries), so the build failed with: RuntimeError: Running `readelf -d .../package/PySide6/assistant` failed with error output: readelf: Error: ... No such file. Pass --no-qt-tools, pyside-setup's own flag for this: these are standalone Qt dev tools, not part of the `import PySide6` surface this wheel ships, and create_wheels.py otherwise just warns (not fails) when they're missing from the package tree. --- .github/workflows/build-pyside6-essentials.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 5555db90f266..be584786276b 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -129,6 +129,11 @@ jobs: # Rocky 10 llvm-config reports /usr/lib64/llvm21/lib64, but clang-libs puts # the headers in /usr/lib/clang/21/include, so every Qt module failed with # "stddef.h file not found". Point it at /usr so it finds /usr/lib/clang/21. + # --standalone bundles+rpath-patches assistant/designer/linguist + # (PYSIDE_UNIX_BUNDLED_TOOLS) unconditionally; none is installed by the + # qt6-qt*-devel packages above, so patchelf failed on a file that was + # never copied. --no-qt-tools skips them -- they are standalone Qt dev + # tools, not part of the `import PySide6` surface this wheel ships. LLVM_INSTALL_DIR=/usr \ "$pybin/python3" setup.py bdist_wheel \ --build-type=pyside6 \ @@ -137,7 +142,8 @@ jobs: --cmake=/usr/bin/cmake \ --parallel="$(nproc)" \ --skip-docs \ - --limited-api=yes + --limited-api=yes \ + --no-qt-tools "$pybin/python3" create_wheels.py --no-examples "$pybin/pip" install -q auditwheel "$pybin/python3" -m auditwheel repair --plat manylinux_2_39_riscv64 \ From 626090638ec204a81564f9adbe8cc22648beab4d Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 16 Nov 2026 12:21:49 +0000 Subject: [PATCH 12/21] pyside6-essentials: skip the designer plugin copy when it was not built prepare_standalone_package_linux() unconditionally copies {install_dir}/plugins/designer into the wheel's Qt/plugins/designer, with no existence guard (unlike every other optional copydir() call in this same function, which pass force=False). On this build the PySide Designer custom-widget plugin component isn't produced -- Rocky 10's qt6-qt*-devel packages carry Designer's headers/libs but not its runtime application pieces, same gap --no-qt-tools already works around for the bundled assistant/designer/linguist executables -- so plugins/designer never exists under install/, and the build failed with: setup.py/prepare_packages: [Errno 2] No such file or directory: '.../install/plugins/designer' Patch build_scripts/platforms/linux.py to pass force=False, same as the adjacent qt_translations_dir and shiboken6 docs/html copies in that file, so a missing optional component is skipped (logged) instead of aborting the build. The Designer plugin is only consumed by the standalone Designer app to load custom PySide widgets, not by `import PySide6.QtDesigner` itself. --- ...kip-the-designer-plugin-copy-when-it.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 patches/pyside6-essentials/6.11.2/0003-build_scripts-skip-the-designer-plugin-copy-when-it.patch diff --git a/patches/pyside6-essentials/6.11.2/0003-build_scripts-skip-the-designer-plugin-copy-when-it.patch b/patches/pyside6-essentials/6.11.2/0003-build_scripts-skip-the-designer-plugin-copy-when-it.patch new file mode 100644 index 000000000000..251f40da3c58 --- /dev/null +++ b/patches/pyside6-essentials/6.11.2/0003-build_scripts-skip-the-designer-plugin-copy-when-it.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Mon, 16 Nov 2026 00:00:00 +0000 +Subject: [PATCH] build_scripts: skip the designer plugin copy when it was + not built + +Upstream-Status: To upstream [no Gerrit account to submit to Qt's code review] + +prepare_standalone_package_linux() unconditionally copies +{install_dir}/plugins/designer into the wheel's Qt/plugins/designer, +with no existence guard (unlike every other optional copydir() call in +this same function, which pass force=False). On this build the PySide +Designer custom-widget plugin component isn't produced -- Rocky 10's +qt6-qt*-devel packages carry Designer's headers/libs but not its +runtime application pieces, same gap --no-qt-tools already works +around for the bundled assistant/designer/linguist executables -- so +plugins/designer never exists under install/, and the build failed +with: + + setup.py/prepare_packages: [Errno 2] No such file or directory: + '.../install/plugins/designer' + +Pass force=False, same as the adjacent qt_translations_dir and +shiboken6 docs/html copies in this file, so a missing optional +component is skipped (logged) instead of aborting the build. The +Designer plugin is only consumed by the standalone Designer *app* to +load custom PySide widgets, not by `import PySide6.QtDesigner` itself. + +diff --git a/build_scripts/platforms/linux.py b/build_scripts/platforms/linux.py +index 32ad9da..464a8ca 100644 +--- a/build_scripts/platforms/linux.py ++++ b/build_scripts/platforms/linux.py +@@ -101,6 +101,7 @@ def prepare_standalone_package_linux(pyside_build, _vars, cross_build=False, is + plugins_target / "designer", + _filter=["*.so"], + recursive=False, ++ force=False, + _vars=_vars) + + copied_plugins = pyside_build.get_shared_libraries_in_path_recursively( +-- +2.43.0 From 7931bace0b16b38a1fdb0fabf3104a664ed3e836 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 16 Nov 2026 16:17:48 +0000 Subject: [PATCH 13/21] pyside6-essentials: point auditwheel at shiboken6's .so via LD_LIBRARY_PATH With the designer-plugin fix, the build now gets past prepare_packages and all the way to carving out and repairing the wheels, but auditwheel repair on pyside6_essentials-*.whl now fails differently: ValueError: Cannot repair wheel, because required library "libshiboken6.abi3.so.6.11" could not be located pyside6_essentials's extension modules carry an $ORIGIN/../shiboken6/ RPATH (valid once pip-installed next to the shiboken6 wheel), but auditwheel repair inspects the wheel's own extracted tree in isolation, where that relative path doesn't resolve -- it only finds NEEDED libraries via LD_LIBRARY_PATH or the system's own lib dirs, not by searching site-packages. shiboken6 itself was already pip-installed earlier in this same script; point LD_LIBRARY_PATH at wherever that install actually put its .so (found via `import shiboken6`, rather than hard-coding the site-packages path) before calling auditwheel. --- .github/workflows/build-pyside6-essentials.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index be584786276b..20d75eb0a602 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -146,6 +146,15 @@ jobs: --no-qt-tools "$pybin/python3" create_wheels.py --no-examples "$pybin/pip" install -q auditwheel + # pyside6_essentials's QtQml.abi3.so etc. carry an $ORIGIN/../shiboken6/ RPATH + # (valid once installed next to the shiboken6 wheel), but auditwheel repair + # inspects the wheel's own extracted tree in isolation, where that relative + # path doesn't resolve -- it only finds NEEDED libraries via LD_LIBRARY_PATH + # or the system's own lib dirs, not by searching site-packages. Without it, + # repair failed with: ValueError: Cannot repair wheel, because required + # library "libshiboken6.abi3.so.6.11" could not be located. Point it at the + # shiboken6 wheel already pip-installed above, where that .so actually lives. + export LD_LIBRARY_PATH="$("$pybin/python3" -c 'import os, shiboken6; print(os.path.dirname(shiboken6.__file__))'):${LD_LIBRARY_PATH:-}" "$pybin/python3" -m auditwheel repair --plat manylinux_2_39_riscv64 \ -w audited dist/pyside6_essentials-*.whl rm -f dist/*.whl From a4e158fbf9d4a5224b2392d36faf1df8cec4f9e8 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 16 Nov 2026 19:36:20 +0000 Subject: [PATCH 14/21] pyside6-essentials: fix nested-quote bug breaking LD_LIBRARY_PATH export Real CI (run 43905964476, job 133434983148) shows the previous LD_LIBRARY_PATH fix never actually ran as written: both $pybin/python3 invocations right after it failed with "/python3: No such file or directory" (pybin resolved empty), even though $pybin worked fine for every earlier python3/pip call in the same script. Root cause: the whole build step is one big single-quoted bash -c '...' block. Line 157's python3 -c 'import os, shiboken6; ...' nested a second single-quoted string inside it - bash cannot nest single quotes, so that inner quote pair closes and reopens the outer string early, corrupting everything parsed afterward. Four comment lines just above it (apostrophes in "essentials's", "wheel's own", "doesn't resolve", "system's own") carry the same problem: each literal apostrophe toggles the single-quoted state again, since # has no special meaning once already inside single quotes. Fix: quote the python one-liner with double quotes instead (it contains no quotes of its own, so this is safe and lets $(...) still expand correctly), and reword the four comments to drop their apostrophes. Verified by extracting the step's run: block and checking `bash -n` cleanly parses it, both of which failed before this fix and pass after. --- .github/workflows/build-pyside6-essentials.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 20d75eb0a602..59d006c6783a 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -146,15 +146,15 @@ jobs: --no-qt-tools "$pybin/python3" create_wheels.py --no-examples "$pybin/pip" install -q auditwheel - # pyside6_essentials's QtQml.abi3.so etc. carry an $ORIGIN/../shiboken6/ RPATH + # pyside6_essentials QtQml.abi3.so etc. carry an $ORIGIN/../shiboken6/ RPATH # (valid once installed next to the shiboken6 wheel), but auditwheel repair - # inspects the wheel's own extracted tree in isolation, where that relative - # path doesn't resolve -- it only finds NEEDED libraries via LD_LIBRARY_PATH - # or the system's own lib dirs, not by searching site-packages. Without it, + # inspects the extracted wheel tree in isolation, where that relative + # path does not resolve -- it only finds NEEDED libraries via LD_LIBRARY_PATH + # or the system lib dirs, not by searching site-packages. Without it, # repair failed with: ValueError: Cannot repair wheel, because required # library "libshiboken6.abi3.so.6.11" could not be located. Point it at the # shiboken6 wheel already pip-installed above, where that .so actually lives. - export LD_LIBRARY_PATH="$("$pybin/python3" -c 'import os, shiboken6; print(os.path.dirname(shiboken6.__file__))'):${LD_LIBRARY_PATH:-}" + export LD_LIBRARY_PATH="$("$pybin/python3" -c "import os, shiboken6; print(os.path.dirname(shiboken6.__file__))"):${LD_LIBRARY_PATH:-}" "$pybin/python3" -m auditwheel repair --plat manylinux_2_39_riscv64 \ -w audited dist/pyside6_essentials-*.whl rm -f dist/*.whl From 590fc76572521c7fe342daf35a79a63cd904a10d Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 16 Nov 2026 22:26:57 +0000 Subject: [PATCH 15/21] pyside6-essentials: install gtk3-devel so auditwheel can bundle libgtk-3.so.0 Real riscv64 CI (run 43941112119, job 133558627193): the nested-quote fix got the build past LD_LIBRARY_PATH and all the way to a built pyside6_essentials wheel, then auditwheel repair failed: 'Cannot repair wheel, because required library "libgtk-3.so.0" could not be located'. Qt6Gui's standalone build carves out a platformthemes/libqgtk3.so plugin (QGtk3Theme, an optional desktop-integration plugin dlopened by the QPA at runtime, not part of any import this wheel's test exercises) that links against libgtk-3.so.0. The before-all dnf install only pulled in Qt/X11/fontconfig devel packages, so the runtime .so auditwheel needs to locate and vendor was never present in the container. Adding gtk3-devel (ships both the headers and the runtime libgtk-3.so.0) resolves it the same way the existing Qt/X11/fontconfig packages already do for their own NEEDED libraries, rather than carving the plugin out. --- .github/workflows/build-pyside6-essentials.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 59d006c6783a..ad5b3abcb727 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -96,7 +96,7 @@ jobs: "${MANYLINUX_RISCV64_IMAGE}" bash -c ' set -euxo pipefail dnf -y install clang-devel llvm-devel "qt6-qt*-devel" \ - libxcb-devel libX11-devel libxkbcommon-devel fontconfig-devel + libxcb-devel libX11-devel libxkbcommon-devel fontconfig-devel gtk3-devel curl -fsSL -o /tmp/patchelf.tar.gz \ "https://github.com/NixOS/patchelf/releases/download/${PATCHELF_VERSION}/patchelf-${PATCHELF_VERSION}-riscv64.tar.gz" echo "${PATCHELF_SHA256} /tmp/patchelf.tar.gz" | sha256sum -c - From 531e5e4c7be4b09cc8229a45eee9c9676180f56e Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 17 Nov 2026 02:30:16 +0000 Subject: [PATCH 16/21] pyside6-essentials: dedent the python3 -c import-check heredoc Real riscv64 CI (run 43970186751, job 133660085221): the gtk3-devel fix got the wheel built and repaired successfully this time, but the final import smoke test failed with IndentationError: unexpected indent on its first statement. This step is one big bash -c '...' block (run: | at 10 spaces base indent), inside which the python3 -c "..." heredoc's from/print lines were written at 12 spaces - 2 more than the block's own base level. YAML's block scalar only strips the first line's indentation (10) uniformly; those 2 extra spaces survive into the literal string bash hands to python3 -c, landing as a real leading indent on what python parses as its first statement. Dedent those two lines to exactly 10 spaces, matching the block's own base indentation, so they carry zero leftover whitespace after YAML's dedent - verified via yaml.safe_load() + bash -n and a direct ast.parse() of the resulting python source. --- .github/workflows/build-pyside6-essentials.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index ad5b3abcb727..12ba048828f5 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -161,9 +161,9 @@ jobs: mv audited/*.whl dist/ "$pybin/pip" install -q dist/pyside6_essentials-*.whl "$pybin/python3" -c " - from PySide6 import QtCore, QtGui, QtWidgets, QtNetwork, QtQml, QtQuick, QtSql, QtSvg - print(\"PySide6 Essentials import OK\") - " + from PySide6 import QtCore, QtGui, QtWidgets, QtNetwork, QtQml, QtQuick, QtSql, QtSvg + print(\"PySide6 Essentials import OK\") + " ' - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 From 6aa38b3044a5ef498a4110d60b6a2c4dbbc9df6f Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 17 Nov 2026 06:37:12 +0000 Subject: [PATCH 17/21] pyside6-essentials: exclude libshiboken6 from the auditwheel repair Real riscv64 CI (run 44003615124, job 133773524330): the previous LD_LIBRARY_PATH fix got auditwheel past "could not be located" and the build all the way to a repaired, installed wheel, but the final smoke test crashed hard: Fatal Python error: libshiboken: could not init enum Python runtime state: initialized RecursionError: maximum recursion depth exceeded Extension modules: shiboken6.Shiboken, PySide6.QtCore (total: 2) during `from PySide6 import QtCore`. Root cause: pointing LD_LIBRARY_PATH at the already pip-installed shiboken6 wheel let auditwheel repair *find* libshiboken6.abi3.so.6.11, but with no --exclude it also went ahead and *vendored* a private copy of that .so into pyside6_essentials, same as gotcha 17's general dep-wheel case. That puts two independently loaded copies of libshiboken6 in the same process: the real shiboken6 wheel's copy (which `import shiboken6.Shiboken` actually loads) and the vendored copy pyside6_essentials's own QtCore.abi3.so now links against instead of the $ORIGIN/../shiboken6/ RPATH the comment above already describes as valid. Every piece of process-global state libshiboken keeps -- the enum-type registry, the one-time-init guard in sbkenum.cpp's init_enum() -- exists twice and the two copies never see each other's writes, so registering QtCore's own enums against the wrong copy's registry fails and aborts the interpreter. The printed RecursionError is a symptom of that wedged state, not a separate bug: a riscv64 ABI incompatibility and a shiboken6/pyside6 version mismatch both look unlikely here, since Alpine already ships this exact shiboken6/PySide6 minor version for riscv64 through ordinary distro packaging. Pass --exclude libshiboken6.abi3.so.6.11 to the auditwheel repair call so it keeps relying on the real shiboken6 install via the existing RPATH instead of grafting in a second, independently stateful copy. Keep the LD_LIBRARY_PATH export: auditwheel still needs it to resolve and inspect the library, --exclude only stops that library from being copied into the wheel. --- .github/workflows/build-pyside6-essentials.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 12ba048828f5..42703af4b2ca 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -155,7 +155,19 @@ jobs: # library "libshiboken6.abi3.so.6.11" could not be located. Point it at the # shiboken6 wheel already pip-installed above, where that .so actually lives. export LD_LIBRARY_PATH="$("$pybin/python3" -c "import os, shiboken6; print(os.path.dirname(shiboken6.__file__))"):${LD_LIBRARY_PATH:-}" + # Real riscv64 CI: once LD_LIBRARY_PATH let auditwheel locate + # libshiboken6, it went ahead and vendored a private copy of that .so + # into pyside6_essentials (gotcha 17 dep-wheel case) instead of + # trusting the $ORIGIN/../shiboken6/ RPATH above. That gives the + # process two independent libshiboken6 instances at runtime -- the + # vendored copy QtCore.abi3.so links against, and the one the + # separately pip-installed shiboken6 wheel actually loads -- so their + # C++-side enum and type registries diverge and the smoke test import + # of PySide6.QtCore aborted with Fatal Python error: libshiboken: + # could not init enum. --exclude keeps the shiboken6 .so out of the + # repair so the wheel relies on the real shiboken6 install instead. "$pybin/python3" -m auditwheel repair --plat manylinux_2_39_riscv64 \ + --exclude libshiboken6.abi3.so.6.11 \ -w audited dist/pyside6_essentials-*.whl rm -f dist/*.whl mv audited/*.whl dist/ From fe0a8db6ec3878a91ff173b2a6d1fe3ae32c6b68 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 17 Nov 2026 06:37:22 +0000 Subject: [PATCH 18/21] gotchas: document the auditwheel LD_LIBRARY_PATH/--exclude interaction Add gotcha 714 to native-deps-and-linking.md (and its gotchas-index.md row): pointing auditwheel repair at a dep-wheel's .so via LD_LIBRARY_PATH so it can be located also makes it get vendored, unless --exclude says so too, giving a process two independently loaded copies of a native runtime with its own internal registries. Generalizes gotcha 17's dep-wheel pattern with the pyside6-essentials/ shiboken6 case, where the resulting symptom (a native "could not init enum" fatal error plus a RecursionError) pointed everywhere except at the real cause. --- .../references/gotchas-index.md | 4 ++ .../gotchas/native-deps-and-linking.md | 41 +++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/skills/python-project-porting/references/gotchas-index.md b/skills/python-project-porting/references/gotchas-index.md index 3d855bb2bc4e..2a4c7d30bbc9 100644 --- a/skills/python-project-porting/references/gotchas-index.md +++ b/skills/python-project-porting/references/gotchas-index.md @@ -1294,6 +1294,10 @@ The porting gotchas (566 of them) live in [`references/gotchas/`](gotchas/), spl CI/releases directly, not the consuming package's hardcoded list, and bypass via an existing path/URL override env var instead of patching (the componentize-py / WASI-SDK case). +- **714** — Pointing `auditwheel repair` at a dep-wheel's `.so` via `LD_LIBRARY_PATH` so it can + be located makes it get vendored too, unless `--exclude` says otherwise — two loaded copies + of a native runtime with its own internal registries corrupts them both (the + pyside6-essentials/shiboken6 case). ### Compiled-vs-pure detection & the require-extension knob — [`gotchas/compiled-vs-pure-detection.md`](gotchas/compiled-vs-pure-detection.md) diff --git a/skills/python-project-porting/references/gotchas/native-deps-and-linking.md b/skills/python-project-porting/references/gotchas/native-deps-and-linking.md index 4269e76a843a..61d625883048 100644 --- a/skills/python-project-porting/references/gotchas/native-deps-and-linking.md +++ b/skills/python-project-porting/references/gotchas/native-deps-and-linking.md @@ -64,6 +64,10 @@ To pull up one entry: `grep -n '^N\. ' references/gotchas/native-deps-and-linkin - **691** — Splitting a non-relocatable native-deps build into its own job breaks CMake `find_package()` for the later build job unless both jobs agree on the same literal absolute install path (the meshioplusplus / netCDF case). +- **714** — Pointing `auditwheel repair` at a dep-wheel's `.so` via `LD_LIBRARY_PATH` so it + can be *located* makes it get *vendored* too, unless `--exclude` says otherwise — two + loaded copies of a native runtime with its own internal registries corrupts them both + (the pyside6-essentials/shiboken6 case). - **702** — A build-time cross-toolchain downloader's own host-arch match list can simply be stale against the toolchain project's *own* current release matrix — check the toolchain's own CI/releases directly and bypass via an existing path/URL override, no patch needed (the @@ -1030,3 +1034,40 @@ To pull up one entry: `grep -n '^N\. ' references/gotchas/native-deps-and-linkin *binary*'s own downloader lacking a riscv64 entry) — there the fix was exploiting an existing PATH-search fallback because the target binary's upstream truly ships no riscv64 asset; here the fix is a path override because the SDK's upstream already does. + +714. **Pointing `auditwheel repair` at a dep-wheel's `.so` via `LD_LIBRARY_PATH` so it can be + *located* makes it get *vendored* too, unless `--exclude` says otherwise (the + pyside6-essentials/shiboken6 case).** pyside6_essentials's extension modules carry an + `$ORIGIN/../shiboken6/` RPATH, valid once pip-installed next to the separately-published + `shiboken6` wheel. But `auditwheel repair` inspects the extracted wheel tree in + isolation, where that relative RPATH does not resolve, so it cannot find + `libshiboken6.abi3.so.6.11` and fails outright (gotcha 17's "could not be located" case). + Exporting `LD_LIBRARY_PATH` to point at the already pip-installed `shiboken6` wheel's own + copy of that `.so` fixes the "could not be located" failure — but with no `--exclude`, + auditwheel then does what it always does with a NEEDED library it *can* locate and that + isn't on the manylinux policy allowlist: it vendors a private copy into the wheel being + repaired and rewrites that wheel's own `.so`s to link against the copy instead. + - **The result is two independently-loaded copies of the same native runtime in one + process**, not one shared instance: the `shiboken6` wheel's copy (the one Python's + `import shiboken6.Shiboken` actually loads) and the vendored copy baked into + `pyside6_essentials` (the one its own `QtCore.abi3.so` etc. now link against). Every + piece of process-global C++ state libshiboken keeps — the enum-type registry, the + "have I initialized yet" flag `init_enum()` guards with — exists twice and the two + copies never see each other's writes. + - **The crash lands far from the cause.** `from PySide6 import QtCore` aborted with + `Fatal Python error: libshiboken: could not init enum` plus a `RecursionError: + maximum recursion depth exceeded` reported alongside it — not a riscv64 ABI fault and + not a Python-version mismatch (Alpine ships this exact shiboken6/PySide6 minor version + on riscv64 via ordinary distro packaging). `could not init enum` is + `sbkenum.cpp`'s `init_enum()` hitting `Py_FatalError` because its own + `PyImport_ImportModule("shiboken6.Shiboken")` sanity re-check failed, which only + happens here because the *other* loaded copy of libshiboken has already wedged the + interpreter into a bad enough state (hence the pending `RecursionError`) for that + import to fail. Chase the two-copies evidence instead of the printed message: check + the repaired wheel's `*.libs/` (or equivalent auditwheel-vendored dir) for a second, + renamed `libshiboken6*.so` before treating this as an upstream Qt/shiboken bug. + - **Fix: `--exclude libshiboken6.abi3.so.6.11` on the `auditwheel repair` call**, same as + gotcha 17's general dep-wheel rule — once excluded, the wheel keeps relying on the real + `shiboken6` install via its RPATH instead of a private, independently-stateful copy. + Keep the `LD_LIBRARY_PATH` export too: auditwheel still needs to resolve the path to + check it, `--exclude` only stops it from being grafted in. From fe3e57a32fb3826e0fd0dbe768ba5015a70a50d7 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 17 Nov 2026 10:43:57 +0000 Subject: [PATCH 19/21] pyside6-essentials: diagnostics only, not a fix, for the bare-signal crash Real riscv64 CI (run 44039568819, job 133890810729): with the --exclude fix in place, auditwheel repair now succeeds and the wheel installs, but the smoke test's single joint import line dies with no output at all -- not even a Python-level traceback -- and the step reports "Process completed with exit code 133" (signal 5, SIGTRAP; not SIGABRT). There is no stack smashing / malloc corruption / OOM text anywhere in the log around the crash. Two things this run cannot tell us: which of the eight submodules the joint `from PySide6 import QtCore, QtGui, ...` line actually dies on, and whether auditwheel's repair kept or dropped the original $ORIGIN/../shiboken6/ rpath entry once --exclude stopped it from vendoring that library. On that second point: reading auditwheel's own repair.py, append_rpath_within_wheel() only preserves a pre-existing rpath entry when it resolves to a path inside the wheel being repaired (is_subdir check); $ORIGIN/../shiboken6/ resolves to a sibling wheel's install location, so it is very likely discarded as "pointing outside the wheel" rather than kept alongside the new vendored-libs rpath, even though the comment above this step assumed it would still be there. This may or may not be what is actually crashing the smoke test; the LD_LIBRARY_PATH set up earlier in this same script for auditwheel's own benefit is still in scope at test time, which could just as well be masking it. So, diagnostics only: -v on the auditwheel invocation to surface its own debug-level reasoning about that rpath entry, a dump of the installed PySide6 extension modules' actual rpath after repair, and splitting the joint import into one submodule at a time with flushed prints so the log shows exactly which one it reaches before dying. Also install gdb, raise the core limit and point core_pattern at /tmp, and if the smoke test exits non-zero, run gdb against any core file produced for a backtrace before re-raising the original exit code. None of this changes what the build does if the smoke test passes. --- .../workflows/build-pyside6-essentials.yml | 47 +++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 42703af4b2ca..715e459d53f0 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -166,16 +166,57 @@ jobs: # of PySide6.QtCore aborted with Fatal Python error: libshiboken: # could not init enum. --exclude keeps the shiboken6 .so out of the # repair so the wheel relies on the real shiboken6 install instead. - "$pybin/python3" -m auditwheel repair --plat manylinux_2_39_riscv64 \ + "$pybin/python3" -m auditwheel -v repair --plat manylinux_2_39_riscv64 \ --exclude libshiboken6.abi3.so.6.11 \ -w audited dist/pyside6_essentials-*.whl rm -f dist/*.whl mv audited/*.whl dist/ + # Diagnostic only, not a fix: dump the actual RPATH of the repaired wheel + # so we can see in the real log whether auditwheel kept or dropped the original + # $ORIGIN/../shiboken6/ entry above (it only preserves rpath entries that + # resolve to somewhere inside the wheel being repaired, and shiboken6 lives + # in a separate wheel, so that entry may be silently dropped + "$pybin/python3" -c " + import glob, zipfile, subprocess, os + whl = glob.glob(\"dist/pyside6_essentials-*.whl\")[0] + zf = zipfile.ZipFile(whl) + names = [n for n in zf.namelist() if n.startswith(\"PySide6/\") and n.endswith(\".abi3.so\") and \".libs/\" not in n] + zf.extractall(\"/tmp/rpathcheck\", members=names) + zf.close() + for n in sorted(names): + print(\"RPATH\", n) + subprocess.run([\"patchelf\", \"--print-rpath\", os.path.join(\"/tmp/rpathcheck\", n)]) + " "$pybin/pip" install -q dist/pyside6_essentials-*.whl + # Diagnostic only, not a fix: capture a backtrace if the smoke test below + # dies from a bare signal (no Python-level traceback at all), and import + # one submodule at a time so the log shows exactly which one it was. + dnf -y install gdb || true + ulimit -c unlimited || true + echo "/tmp/core.%e.%p" > /proc/sys/kernel/core_pattern || true + set +e "$pybin/python3" -c " - from PySide6 import QtCore, QtGui, QtWidgets, QtNetwork, QtQml, QtQuick, QtSql, QtSvg + import sys + mods = [\"QtCore\", \"QtGui\", \"QtWidgets\", \"QtNetwork\", \"QtQml\", \"QtQuick\", \"QtSql\", \"QtSvg\"] + for name in mods: + print(\"importing\", name) + sys.stdout.flush() + __import__(\"PySide6.\" + name) + print(name, \"OK\") + sys.stdout.flush() print(\"PySide6 Essentials import OK\") - " + " + rc=$? + echo "smoke test exit code: $rc" + set -e + if [ "$rc" -ne 0 ]; then + ls -la /tmp/core.* 2>/dev/null || echo "no core file produced" + for c in /tmp/core.*; do + [ -f "$c" ] || continue + gdb -q -batch -ex "bt full" -ex "info sharedlibrary" "$pybin/python3" "$c" + done + exit "$rc" + fi ' - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 From df1b7a5a26b963bf8e7d5edd029575b76248c990 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 17 Nov 2026 20:30:51 +0000 Subject: [PATCH 20/21] pyside6-essentials: run the QtQuick crash live under gdb, not via core dump The prior diagnostic run confirmed the crash is a bare SIGABRT on import PySide6.QtQuick specifically (QtCore/QtGui/QtWidgets/QtNetwork/ QtQml all import fine first), with no stderr text at all and no core file - this container has no CAP_SYS_ADMIN, so both ulimit -c unlimited and writing /proc/sys/kernel/core_pattern silently no-op here. Run the import under gdb directly instead, so the backtrace is captured live at the moment of the abort rather than depending on a core dump this runner cannot produce. --- .../workflows/build-pyside6-essentials.yml | 52 +++++++++++-------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index 715e459d53f0..dbfd4c311365 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -188,34 +188,42 @@ jobs: subprocess.run([\"patchelf\", \"--print-rpath\", os.path.join(\"/tmp/rpathcheck\", n)]) " "$pybin/pip" install -q dist/pyside6_essentials-*.whl - # Diagnostic only, not a fix: capture a backtrace if the smoke test below - # dies from a bare signal (no Python-level traceback at all), and import - # one submodule at a time so the log shows exactly which one it was. + # Diagnostic only, not a fix: the previous run confirmed the crash is a + # bare SIGABRT specifically on `import PySide6.QtQuick` (QtCore/QtGui/ + # QtWidgets/QtNetwork/QtQml all import fine first), with zero stderr + # text (no glibc malloc-corruption message, no Qt warning) and no core + # file - this runner's container has no CAP_SYS_ADMIN, so `ulimit -c + # unlimited` and writing /proc/sys/kernel/core_pattern both silently + # no-op (confirmed in that run's log: "Operation not permitted" / + # "Read-only file system"). Run the import live under gdb instead of + # relying on a post-mortem core file, so the backtrace is captured at + # the moment of the abort regardless of core-dump permissions. dnf -y install gdb || true - ulimit -c unlimited || true - echo "/tmp/core.%e.%p" > /proc/sys/kernel/core_pattern || true - set +e - "$pybin/python3" -c " + cat > /tmp/qtquick_smoke.py <&1 | tee /tmp/gdb_smoke.log set -e - if [ "$rc" -ne 0 ]; then - ls -la /tmp/core.* 2>/dev/null || echo "no core file produced" - for c in /tmp/core.*; do - [ -f "$c" ] || continue - gdb -q -batch -ex "bt full" -ex "info sharedlibrary" "$pybin/python3" "$c" - done - exit "$rc" + # gdb exit code reflects gdb, not the inferior - check for the + # final print from the script instead, same signal the plain + # smoke test used before this diagnostic wrapper. + if ! grep -q "PySide6 Essentials import OK" /tmp/gdb_smoke.log; then + echo "smoke test did not complete - see gdb backtrace above" + exit 1 fi ' From 7ad257ff0b6b1969cf617346b8a0496fbf773bee Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Wed, 18 Nov 2026 01:35:11 +0000 Subject: [PATCH 21/21] pyside6-essentials: fix a tooling bug in the gdb diagnostic comment Real riscv64 CI (run 44170132031, job 134346892564): the step failed instantly after the pip install with 'dnf: command not found' / 'gdb: command not found' - the two possessive apostrophes in the previous commit's own comment ("this runner's container", "that run's log") closed and reopened the outer single-quoted docker bash -c argument early, and the backticked text between them ('ulimit -c ... unlimited') executed as unintended command substitution on the bare runner rather than staying inert inside the quoted string - the same class of bug already avoided everywhere else in this file, which has no contractions or possessives anywhere else for exactly this reason. Reworded both sentences to drop the apostrophes; verified via a direct simulation of the YAML block's own dedent plus bash -n that the resulting script now parses with no stray quote boundary. --- .github/workflows/build-pyside6-essentials.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-pyside6-essentials.yml b/.github/workflows/build-pyside6-essentials.yml index dbfd4c311365..aff1f9c07e04 100644 --- a/.github/workflows/build-pyside6-essentials.yml +++ b/.github/workflows/build-pyside6-essentials.yml @@ -192,9 +192,9 @@ jobs: # bare SIGABRT specifically on `import PySide6.QtQuick` (QtCore/QtGui/ # QtWidgets/QtNetwork/QtQml all import fine first), with zero stderr # text (no glibc malloc-corruption message, no Qt warning) and no core - # file - this runner's container has no CAP_SYS_ADMIN, so `ulimit -c - # unlimited` and writing /proc/sys/kernel/core_pattern both silently - # no-op (confirmed in that run's log: "Operation not permitted" / + # file - the container on this runner has no CAP_SYS_ADMIN, so `ulimit + # -c unlimited` and writing /proc/sys/kernel/core_pattern both silently + # no-op (confirmed in the log of that run: "Operation not permitted" / # "Read-only file system"). Run the import live under gdb instead of # relying on a post-mortem core file, so the backtrace is captured at # the moment of the abort regardless of core-dump permissions.