Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PySide6: error when compiling from source code
Forum Updated to NodeBB v4.3 + New Features

PySide6: error when compiling from source code

Scheduled Pinned Locked Moved Unsolved Qt for Python
pysidepythonqt for python
4 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    d_niel
    wrote on 16 Dec 2021, 15:51 last edited by d_niel
    #1

    Hi everyone,

    I want to wrap a C++ library to use it with Python and therefore wanted to create PoC and give Shiboken6 a try. So far I got Qt, Ninja and Cmake using the Qt Online installer. I also cloned PySide from the Qt repo and checked out the correct branch matching the Qt version I have downloaded (6.2.2). Ninja is also added to the PATH environment variable.

    Some details of the system I am running:

    • Ubuntu 20.04
    • Python 3.8.10 (used venv to create a virtual environment)
    • CLang10 (via apt)

    However when I run:

    python3 setup.py build --qmake=<my_qmake_path> --cmake=<my_cmake_path> --build-tests --parallel=8
    

    shiboken6 and shiboken6_generator are build (I see them in site-packages) but not pyside6.

    The error I get is the following:

    [931/999] cd /home/users/user123/pyside-setup/QtShiboken3_bui...qt6.2.2-64bit-release/lib/python3.8/site-packages/shiboken6/..
    FAILED: PySide6/QtQuick/CMakeFiles/QtQuick_pyi /home/users/user123/pyside-setup/QtShiboken3_build/py3.8-qt6.2.2-64bit-release/pyside6/PySide6/QtQuick/CMakeFiles/QtQuick_pyi
    cd /home/users/user123/pyside-setup/QtShiboken3_build/py3.8-qt6.2.2-64bit-release/pyside6/PySide6/QtQuick && /home/users/user123/Qt/Tools/CMake/bin/cmake -E env LD_LIBRARY_PATH=/home/users/user123/pyside-setup/QtShiboken3_build/py3.8-qt6.2.2-64bit-release/pyside6/libpyside:/home/users/user123/pyside-setup/QtShiboken3_install/py3.8-qt6.2.2-64bit-release/lib /home/users/user123/VirtualEnvironments/QtShiboken/bin/python3 /home/users/user123/pyside-setup/sources/pyside6/PySide6/QtQuick/../support/generate_pyi.py QtQuick --sys-path /home/users/user123/pyside-setup/QtShiboken3_build/py3.8-qt6.2.2-64bit-release/pyside6 /home/users/user123/pyside-setup/QtShiboken3_install/py3.8-qt6.2.2-64bit-release/lib/python3.8/site-packages/shiboken6/..
    Traceback (most recent call last):
      File "/home/users/user123/pyside-setup/sources/pyside6/PySide6/QtQuick/../support/generate_pyi.py", line 130, in <module>
        generate_all_pyi(outpath, options=options)
      File "/home/users/user123/pyside-setup/sources/pyside6/PySide6/QtQuick/../support/generate_pyi.py", line 97, in generate_all_pyi
        with feature.force_selection(feature_id, import_name):
      File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
        return next(self.gen)
      File "shibokensupport/feature.py", line 220, in force_selection
    ImportError: /home/users/user123/pyside-setup/QtShiboken3_build/py3.8-qt6.2.2-64bit-release/pyside6/PySide6/QtQuick.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN18QQuickRenderTarget15fromVulkanImageEyiRK5QSizei
    [938/999] Building CXX object PySide6/QtQuickWidgets/CMakeFile...kWidgets.dir/PySide6/QtQuickWidgets/qquickwidget_wrapper.cpp.o
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "setup.py", line 78, in <module>
        setup_runner.run_setup()
      File "/home/users/user123/pyside-setup/build_scripts/setup_runner.py", line 137, in run_setup
        self.run_setuptools_setup()
      File "/home/users/user123/pyside-setup/build_scripts/setup_runner.py", line 192, in run_setuptools_setup
        setup(**kwargs)
      File "/home/users/user123/VirtualEnvironments/QtShiboken/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/users/user123/pyside-setup/build_scripts/main.py", line 546, in run
        self.build_extension(ext)
      File "/home/users/user123/pyside-setup/build_scripts/main.py", line 884, in build_extension
        raise DistutilsSetupError(f"Error compiling {extension}")
    setuptools._distutils.errors.DistutilsSetupError: Error compiling pyside6
    Traceback (most recent call last):
      File "setup.py", line 78, in <module>
        setup_runner.run_setup()
      File "/home/users/user123/pyside-setup/build_scripts/setup_runner.py", line 178, in run_setup
        raise RuntimeError(msg)
    RuntimeError:
    setup.py invocation failed with exit code: 1.
    
    
    setup.py invocation was: /home/users/user123/VirtualEnvironments/QtShiboken/bin/python3 setup.py build --qmake=/home/users/user123/Qt/6.2.2/gcc_64/bin/qmake --cmake=/home/users/user123/Qt/Tools/CMake/bin/cmake --parallel=8 --build-tests --internal-build-type=pyside6
    

    I tried to look for answers in the holly Stackoverflow and here in the forums but couldn't find anything (maybe I missed something, sorry if that's the case).

    Could someone shed some light on what could be wrong?

    Thanks a lot.

    D.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Dec 2021, 19:25 last edited by
      #2

      Hi and welcome to devnet,

      Not a direct answer but since you only want to use shiboken, why not install it through pip ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        d_niel
        wrote on 17 Dec 2021, 14:06 last edited by d_niel
        #3

        Well I was just following a tutorial I found in youtube from one of your Qt colleagues. I thought shiboken, shiboken_generator and pyside were all required.

        In any case I will stop PySide6 testing for the time being and continue my proof of concept with PySide2. I managed to compile everything without any problems using Qt and PySide versions 5.15.2

        If development team is interested in reproducing the scenario that made my local PySide6 compilation crash let me know :-)

        Cheers,
        D.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 17 Dec 2021, 19:38 last edited by
          #4

          Since you have a pretty reliable way to trigger the crash, sure, open a report providing the step by step instructions to reproduce this :-)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          1/4

          16 Dec 2021, 15:51

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved