Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-787

Building with clang doesn't work when Qt headers are in a system header location

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.0
    • 5.11.1
    • PySide, Shiboken
    • None
    • Linux/Wayland, Linux/X11, Linux/Other display system
    • 7cc5c139482d735c49002649d26bb524c92cc86b

    Description

      I'm trying to build PySide2 under Flatpak (https://www.flatpak.org).

      I don't know how familiar you are with Flatpak, but reproducing this locally is simple. Create a file "org.pyside.Test.yaml" with the following content:

      app-id: org.pyside.Test
      runtime: org.kde.Platform
      runtime-version: '5.11'
      sdk: org.kde.Sdk
      modules:
        - name: pyside2
          buildsystem: simple
          build-commands:
            - python3 setup.py install --prefix=/app
          sources:
            - type: archive
              url: http://download.qt.io/official_releases/QtForPython/pyside2/PySide2-5.11.1-src/pyside-setup-everywhere-src-5.11.1.tar.xz
              sha256: 9cbc3cbb03c6c1ddba8de7a651c84b269f87ebd4a0991a1f9acc8b2d0ccdfb83
      

      Now from the command line:

      $ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
      $ flatpak install flathub org.kde.Sdk//5.11
      $ flatpak-builder --install build_dir org.pyside.Test.yaml
      

      This results in the following error:

      [...]
      qt.shiboken: (core) enum 'QMetaMethod::MethodType' is specified in typesystem, but not declared
      qt.shiboken: (core) type 'QItemSelection' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
      qt.shiboken: (core) enum 'Qt::CursorShape' is specified in typesystem, but not declared
      qt.shiboken: (core) type 'QEventLoop' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
      qt.shiboken: (core) type 'QVariantAnimation' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
      qt.shiboken: (core) type 'QTemporaryFile' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
      
      qt.shiboken: (core) No C++ classes found!
      qt.shiboken: (core) writeMinimalConstructorExpression: Could not find a minimal constructor for type 'QByteArray'. This will result in a compilation error.
      qt.shiboken: (core) writeMinimalConstructorExpression: Could not find a minimal constructor for type 'QModelIndex'. This will result in a compilation error.
      Done, 712ms, 362 warnings (3 known issues)
      [  2%] Building CXX object PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/qabstractanimation_wrapper.cpp.o
      c++: error: /run/build/pyside2/pyside3_build/py3.5-qt5.11.1-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qabstractanimation_wrapper.cpp: No such file or directory
      c++: fatal error: no input files
      compilation terminated.
      make[2]: *** [PySide2/QtCore/CMakeFiles/QtCore.dir/build.make:527: PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/qabstractanimation_wrapper.cpp.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:354: PySide2/QtCore/CMakeFiles/QtCore.dir/all] Error 2
      make: *** [Makefile:128: all] Error 2
      error: Error compiling pyside2
      Error: module pyside2: Child process exited with code 1
      

      In Flatpak there are two prefixes:
      /usr - read-only shared runtime with all the standard libraries (including Qt)
      /app - application data + bundled libraries

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              eszlari Peter Eszlari
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes