Qt bootstrap assumes every native Qt library has a corresponding PySide wrapper
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- android, python
- 領域
- build-system, mobile
調査の方向性
Start with the Qt bootstrap template at pythonforandroid/bootstraps/qt/build/templates/libs.tmpl.xml, which emits both Qt6<Module>``_<arch> native entries and Qt<Module>.abi3.so wrapper entries from the same qt_libs list, and then check how build.py in pythonforandroid/bootstraps/common/build/ passes that list. Done means the generated load_local_libs contains only wrapper libraries that exist in the PySide wheel, such as no QtQmlModels.abi3.so, with a separate pyside-libs option falling back to qt_libs. Confirm this by rendering the template and checking the output, since the reporter says the change works on an arm64 emulator.
索引モデルが issue の本文から書いたものです。
説明
Title: Qt bootstrap assumes every native Qt library has a corresponding PySide wrapper
Description:
I found an issue in the python-for-android Qt bootstrap when it is used by PySide6.
Environment:
- PySide6: 6.12
- Python: 3.14
- Android ABI: arm64-v8a
- Android emulator: Android 16
- Android NDK: r28c
- Qt Quick / Qt Quick Controls
The PySide Android deployment correctly needs to pass native Qt dependencies such as:
Core
Gui
Network
Qml
OpenGL
QmlModels
QmlWorkerScript
QmlMeta
Quick
QuickTemplates2
QuickControls2
The problem is in:
pythonforandroid/bootstraps/qt/build/templates/libs.tmpl.xml
The current template iterates over qt_libs and generates both:
Qt6<Module>_<arch>
for native Qt libraries, and:
Qt<Module>.abi3.so
for PySide wrapper libraries.
These two sets are not equivalent.
Some native Qt dependencies do not have a corresponding PySide wrapper library.
For example:
QmlModels
QmlWorkerScript
QmlMeta
QuickTemplates2
are valid native Qt dependencies, but the corresponding wrapper libraries do not exist in the PySide wheel:
QtQmlModels.abi3.so
QtQmlWorkerScript.abi3.so
QtQmlMeta.abi3.so
QtQuickTemplates2.abi3.so
As a result, the generated load_local_libs array can contain non-existent libraries.
The runtime then fails with an error like:
dlopen failed: library ".../QtQmlModels.abi3.so" not found
java.lang.UnsatisfiedLinkError
Loading Qt native libraries failed
Root cause:
qt_libs is currently used for two different purposes:
- native Qt libraries;
- PySide wrapper libraries.
This assumption is not always valid.
Suggested solution:
Introduce a separate list/argument for PySide wrapper modules, for example:
--pyside-libs
Then:
qt_libs
should be used only for native Qt libraries, while:
pyside_libs
should be used only to generate:
Qt<Module>.abi3.so
entries in load_local_libs.
For backward compatibility, if --pyside-libs is not provided, it could fall back to qt_libs.
Conceptually:
pyside_libs = (
args.pyside_libs.split(",")
if args.pyside_libs
else qt_libs
)
and in libs.tmpl.xml:
{%- for pyside_lib in pyside_libs %}
<item>{{ arch }};Qt{{ pyside_lib }}.abi3.so</item>
{% if pyside_lib == "Qml" -%}
<item>{{ arch }};libpyside6qml.abi3.so</item>
{% endif %}
{%- endfor -%}
I implemented this locally and tested it successfully.
After separating native Qt libraries from PySide wrapper libraries:
- the application starts correctly;
- Qt Quick Controls work;
- no non-existent
Qt*.abi3.solibraries are loaded; - no
UnsatisfiedLinkErroroccurs; - QML to Python interaction works correctly.
The relevant files are:
pythonforandroid/bootstraps/common/build/build.py
pythonforandroid/bootstraps/qt/build/templates/libs.tmpl.xml
This issue is related to PySide Android deployment, because PySide may need to pass native Qt-only dependencies which do not have Python wrapper libraries.
I have a working local implementation and can provide the diff if useful.
- 主要言語
- Python
- スター
- 8.9k
- フォーク
- 2.1k
- 平均マージ
- 3日 19時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
kivy/python-for-android のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
kivy/python-for-android#3405 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
kivy/python-for-android#3335 · コメント 1 件 · リアクション 3 件 ·
-
Documentation easy
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
kivy/python-for-android#3326 · コメント 1 件 ·
-
Documentation easy Priority: Low
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
kivy/python-for-android#3299 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
kivy/python-for-android#3409 ·
kivy/python-for-android の issue をすべて見る
似ている issue
-
`destroy` sans terminal répond « Aborted. » au lieu de réclamer `--yes` comme `clean` et `reset`オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
stephrobert/dsoxlab#354 ·
メンテナーはふだん 1 日以内に返信
-
hardware help wanted testing
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
jasonacox/pypowerwall#472 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: DoubleMLRDDData accepts a score_col that is no data column (as in its docstring example); the running variable then becomes a covariate and RDFlex fails対応中かも @vrjdev が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DoubleML/doubleml-for-py#455 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Python mod.Box[T] annotation gets a false generic_arg edge that replaces the parameter_type one ('is' on tree-sitter nodes)対応中かも @rohit-jsfreaky が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Graphify-Labs/graphify#5110 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信