Skip to content

pyside6-essentials: Add version 6.11.2 - #3255

Draft
luhenry wants to merge 27 commits into
mainfrom
pyside6-essentials
Draft

luhenry wants to merge 27 commits into
mainfrom
pyside6-essentials

Conversation

@luhenry

@luhenry luhenry commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Compiles PySide6's 22 Essentials Qt modules (Core, Gui, Widgets, Qml, Quick, Sql, Svg, ...) via shiboken6. Upstream publishes no riscv64 wheel for any pyside6-* distribution.

Mirrors pyside-setup's own release recipe (setup.py bdist_wheel --build-type=... --standalone + create_wheels.py); the project has no public CI workflow to link (Gerrit, not GitHub Actions).

Differs from upstream

  • Qt/libclang toolchain - Rocky 10 AppStream dnf packages (qt6-*-devel, clang-devel, llvm-devel), not a Qt installer, since the build runs inside manylinux_2_39_riscv64.
  • Qt minor version - the image ships Qt 6.10.1, not 6.11.x, so wheels expose a 6.10 API surface under the 6.11.2 version.

Matrix: single cp310-abi3 build (built on cp312), matching upstream's limited-API wheel.

Testing

License: wheel bundles the Qt 6.10.1 runtime (LGPL-3.0-only, same licence as this package); sources are Rocky 10 AppStream's public SRPMs.

Base of the pyside6 family (shiboken6 #1696 -> essentials -> addons -> pyside6). The same build tree carves out PySide6_Addons and the PySide6 meta-wheel too; unlike addons, essentials needs none of the 9 Qt modules Rocky 10 doesn't package (WebEngine/Pdf/Graphs/HttpServer/WebView).

luhenry added a commit that referenced this pull request Oct 15, 2026
@luhenry
luhenry marked this pull request as draft October 15, 2026 12:14
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.
shiboken6's ApiExtractor looks for libclang's builtin headers under
$LLVM_INSTALL_DIR/lib/clang/<ver>/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.
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.
@luhenry
luhenry force-pushed the pyside6-essentials branch from b052972 to 8009452 Compare November 5, 2026 16:32
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.
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.
_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.
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.
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.
…Y_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.
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.
…k-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.
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.
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.
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.
…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.
…e 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.
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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant