Skip to content
  • thanks for your great manual. Can you make an instruction how to compile PySide6_essentials for ARM64?

    and recently I was able to compile PySide6 in Arch Linux, but when I try to run some Python application, an error always appears

  • Seth Parker @csparker247 ·

    Seems like you can just use create_wheels.py instead of setup.py. No idea how it's meant to be called.

    And your runtime error is fairly common. This will show you how to debug what's keeping the module from getting loaded, but since it doesn't even show in your list of supported modules, did you install libxcb?

  • Yes, I have already installed libxcb but it didn't help

  • Seth Parker @csparker247 ·

    I'm not sure then. I do know that it takes more than libxcb. There's a whole host of xcb-related things that could be missing. And all of those might need to be in place when you build Qt so that the plugin also gets created. Using export QT_DEBUG_PLUGINS=1 as suggested in those threads should help you identify the problem.

    Additionally, it looks like your display is some sort of remote desktop/virtual display. That can affect the display plugin that needs to be loaded. I've had to setup proper X11 forwarding when running a Qt GUI app from a Docker container before, for example. If you can remove that from your setup temporarily, it might get you a step closer.

  • After using export QT_DEBUG_PLUGINS=1: Link

    About my device. This is ARM64 phone with Spandragon 860 8 cores, 2,9 ghz. I'm use Linux Deploy to run Linux ARM64 on phone (btw PySide6 works for me in Debian) because using this possible to run Linux desktop apps on phone with almost native performance without porting programs to Android.

    I'm use VNC for display. Here about PySide6

  • Hi Seth Parker. I forgot to ask 1 important question. Can you just make a PySide6 and Shiboken6 .whl packages? this would solve the problem of frequent compilation errors and waiting for 6 hours.

  • Seth Parker @csparker247 ·

    Sorry, I don't have the capacity to debug this or to compile wheels for you (which I'm not sure would even work). The script above is provided as-is. Hopefully you can modify it to get it to work for your use case.

    The only advice that I can give you is that the Qt install didn't compile/install the xcb plugin. I would start by investigating why it didn't. Good luck.

  • At latest this script works in Debian. And I can use PySide6 in it without problems

  • Hi Seth Parker. Now there is no problems with PySide6 and Shiboken6 in Arch Linux because Arch Linux ARM has native packages in Pacman (package manager). I knew about them before, but they didn't work last time. Today I decided to try again and they were installed successfully. And this time there was no unknown error at startup test_qt_gl.py (this is a PySide6 health check program). Packages:

    https://archlinuxarm.org/packages/aarch64/pyside6

    https://archlinuxarm.org/packages/armv7h/pyside6

    Now anyone can install PySide6 in Arch Linux ARM not in 8 hours of compilation, but in a few minutes!

    Examples: https://ibb.co/fCtVvTL

    https://youtu.be/Ou0kWpkffF4?si=we2viLQASdiZgqyh

    Edited by Max-RM
  • Jeffrey @jeffreygu0109 ·

    Hi Max-RM,

    Could you guide me how to use or install the package that you gave on arm Ubuntu directly, please?

    https://archlinuxarm.org/packages/armv7h/pyside6

    Thank you so much.

  • Hi. I don't think it's possible to install a package from Arch to debian. Maybe it's possible, but I've never done this, so I won't be able to help with this problem.

  • I am trying to build it with the same configuration as you described but i am getting this error: OS: Windows 11 with Conda python 3.8, QT6.4, PySide6.4.2

    python setup.py build --qtpaths="C:/Qt/6.4.2/msvc2019_64/bin/qtpaths6.exe" --ignore-git --parallel 4 --standalone ***** Exception while trying to prepare bdist_wheel override class: cannot import name 'get_abi_tag' from 'wheel.bdist_wheel' (C:\ProgramData\Anaconda3\envs\containerModeler\lib\site-packages\wheel\bdist_wheel.py). Skipping wheel overriding. In directory D:\dev\pyside-pyside-setup: Running command: C:\ProgramData\Anaconda3\envs\containerModeler\python.exe setup.py build --qtpaths=C:/Qt/6.4.2/msvc2019_64/bin/qtpaths6.exe --ignore-git --parallel 4 --standalone --internal-build-type=shiboken6 ***** Exception while trying to prepare bdist_wheel override class: cannot import name 'get_abi_tag' from 'wheel.bdist_wheel' (C:\ProgramData\Anaconda3\envs\containerModeler\lib\site-packages\wheel\bdist_wheel.py). Skipping wheel overriding. running build

    Could not find Qt. You can pass the --qt-target-path= option as a hint where to find Qt. Error was:

    Traceback (most recent call last): File "setup.py", line 42, in setup_runner.run_setup() File "D:\dev\pyside-pyside-setup\build_scripts\setup_runner.py", line 204, in run_setup self.run_setuptools_setup() File "D:\dev\pyside-pyside-setup\build_scripts\setup_runner.py", line 277, in run_setuptools_setup setup(**kwargs) File "C:\ProgramData\Anaconda3\envs\containerModeler\lib\site-packages\setuptools_init_.py", line 153, in setup return distutils.core.setup(**attrs) File "C:\ProgramData\Anaconda3\envs\containerModeler\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\ProgramData\Anaconda3\envs\containerModeler\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\ProgramData\Anaconda3\envs\containerModeler\lib\distutils\dist.py", line 984, in run_command cmd_obj.ensure_finalized() File "C:\ProgramData\Anaconda3\envs\containerModeler\lib\distutils\cmd.py", line 107, in ensure_finalized self.finalize_options() File "D:\dev\pyside-pyside-setup\build_scripts\main.py", line 279, in finalize_options DistUtilsCommandMixin.mixin_finalize_options(self) File "D:\dev\pyside-pyside-setup\build_scripts\options.py", line 323, in mixin_finalize_options self._do_finalize() File "D:\dev\pyside-pyside-setup\build_scripts\options.py", line 408, in _do_finalize raise e File "D:\dev\pyside-pyside-setup\build_scripts\options.py", line 398, in _do_finalize QtInfo().prefix_dir File "D:\dev\pyside-pyside-setup\build_scripts\qtinfo.py", line 82, in prefix_dir return self.get_property("QT_INSTALL_PREFIX") File "D:\dev\pyside-pyside-setup\build_scripts\qtinfo.py", line 124, in get_property self._get_other_properties() File "D:\dev\pyside-pyside-setup\build_scripts\qtinfo.py", line 212, in _get_other_properties for key, value in self._get_cmake_mkspecs_variables().items(): File "D:\dev\pyside-pyside-setup\build_scripts\qtinfo.py", line 233, in _get_cmake_mkspecs_variables qt_target_mkspec_output = configure_cmake_project( File "D:\dev\pyside-pyside-setup\build_scripts\utils.py", line 1304, in configure_cmake_project raise RuntimeError(m) RuntimeError: Failed to configure CMake project: 'D:/dev/pyside-pyside-setup/sources/shiboken6/config.tests/target_qt_mkspec' Configure args were: C:\Program Files\CMake\bin\cmake.EXE -G Ninja -S D:/dev/pyside-pyside-setup/sources/shiboken6/config.tests/target_qt_mkspec -B D:/dev/pyside-pyside-setup/build/config.tests\target_qt_mkspec_rwablsab -DCMAKE_PREFIX_PATH=C:/Qt/6.4.2/msvc2019_64 -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe Return code: 1

    with error: CMake Error at CMakeLists.txt:8 (find_package): Could not find a configuration file for package "Qt6" that is compatible with requested version "".

      The following configuration files were considered but not accepted:
    
        C:/Qt/6.4.2/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake, version: 6.4.2 (64bit)

    CMakeOutput.log: The system is: Windows - 10.0.22631 - AMD64 Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe Build flags: Id flags:

    The output was:
    0
    Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30145 for x86
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    CMakeCXXCompilerId.cpp
    Microsoft (R) Incremental Linker Version 14.29.30145.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    /out:CMakeCXXCompilerId.exe
    CMakeCXXCompilerId.obj
    
    
    Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.exe"
    
    Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.obj"
    
    The CXX compiler identification is MSVC, found in "D:/dev/pyside-pyside-setup/build/config.tests/target_qt_mkspec_rwablsab/CMakeFiles/3.24.0-rc1/CompilerIdCXX/CMakeCXXCompilerId.exe"
    
    Detecting CXX compiler ABI info compiled with the following output:
    Change Dir: D:/dev/pyside-pyside-setup/build/config.tests/target_qt_mkspec_rwablsab/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/PROGRA~2/MICROS~2/2019/PROFES~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe cmTC_42b1d && [1/2] Building CXX object CMakeFiles\cmTC_42b1d.dir\CMakeCXXCompilerABI.cpp.obj
    
    [2/2] Linking CXX executable cmTC_42b1d.exe

    Output: -- The CXX compiler identification is MSVC 19.29.30145.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- SHIBOKEN_IS_CROSS_BUILD: FALSE -- Configuring incomplete, errors occurred! See also "D:/dev/pyside-pyside-setup/build/config.tests/target_qt_mkspec_rwablsab/CMakeFiles/CMakeOutput.log".

    Traceback (most recent call last): File "setup.py", line 42, in setup_runner.run_setup() File "D:\dev\pyside-pyside-setup\build_scripts\setup_runner.py", line 260, in run_setup raise RuntimeError(msg) RuntimeError: setup.py invocation failed with exit code: 1.

    setup.py invocation was: C:\ProgramData\Anaconda3\envs\containerModeler\python.exe setup.py build --qtpaths=C:/Qt/6.4.2/msvc2019_64/bin/qtpaths6.exe --ignore-git --parallel 4 --standalone --internal-build-type=shiboken6

  • Seth Parker @csparker247 ·

    Again, I was building Arm on Ubuntu so who knows.

    Looking at your error, it's finding but rejecting Qt 6.4.2. Did you checkout the v6.4.2 ref for the setup script or just v6.4? The latter will not probably only work with the latest Qt 6.4 patch version (6.4.3).

  • Now I tried to compile on Windows 11 ARM64 that was installed on my phone.

    After command:

    cmake --build .

    (Without --parallels 8 because cmake on Windows doesn't support this option).

    I stuck on 20%. Need to fix this error:

    [ 20%] Automatic QML type registration for target Qml
    Error 5 while parsing D:/qt-everywhere-src-6.5.3/qt6-build/qtdeclarative/src/qml/meta_types/qt6qml_debug_metatypes.json: illegal value
    NMAKE : fatal error U1077: 'call ..\..\..\.qt\bin\qt_setup_tool_path.bat D:/qt-everywhere-src-6.5.3/qt6-build/qtbase/bin/qmltyperegistrar.exe --generate-qmltypes=D:/qt-everywhere-src-6.5.3/qt6-build/qtbase/qml/QtQml/Base/plugins.qmltypes --import-name=QtQml.Base --major-version=6 --minor-version=5 --follow-foreign-versioning @D:/qt-everywhere-src-6.5.3/qt6-build/qtdeclarative/src/qml/qmltypes/Qml_foreign_types.txt --private-includes -o D:/qt-everywhere-src-6.5.3/qt6-build/qtdeclarative/src/qml/qml_qmltyperegistrations.cpp D:/qt-everywhere-src-6.5.3/qt6-build/qtdeclarative/src/qml/meta_types/qt6qml_debug_metatypes.json' : return code '0x1'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostARM64\ARM64\nmake.exe" -s -f qtdeclarative\src\qml\CMakeFiles\Qml.dir\build.make /nologo -SL                 qtdeclarative\src\qml\CMakeFiles\Qml.dir\depend' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostARM64\ARM64\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -LS                 all' : return code '0x2'
    Stop.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment