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

macOS/Homebrew Qt: FTBFS: Segmentation fault 11 when generating QtDesigner binding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 6.2.0
    • Shiboken
    • None
    • macOS 11
      LLVM 13 or LLVM 12 (Homebrew)
      Qt 6.2.0 (Homebrew)
    • Linux/X11, macOS

    Description

      Build pyside with

      python3 ./setup.py build --skip-docs
      

      or run

      cmake -G Ninja -S . -B build
      cmake --build build
      # or build target
      # ninja -C build sources/pyside6/PySide6/QtDesigner/mjb_rejected_classes.log
      

      It will fail when generating binding for QtDesigner.

      output:

      /bin/sh: line 1: 13683 Segmentation fault: 11 /tmp/pyside-20211011-11292-ijkmay/pyside-setup-opensource-src-6.2.0/pyside3_install/py3.9-qt6.2.0-64bit-release/bin/shiboken6 --generator-set=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero --include-paths=/tmp/pyside-20211011-11292-ijkmay/pyside-setup-opensource-src-6.2.0/sources/pyside6/PySide6:/usr/local/share/qt/mkspecs/macx-clang:/usr/local/include:/usr/local/lib/QtCore.framework:/usr/local/lib/QtCore.framework/Headers --typesystem-paths=/tmp/pyside-20211011-11292-ijkmay/pyside-setup-opensource-src-6.2.0/pyside3_build/py3.9-qt6.2.0-64bit-release/pyside6/PySide6:/tmp/pyside-20211011-11292-ijkmay/pyside-setup-opensource-src-6.2.0/sources/pyside6/PySide6:/tmp/pyside-20211011-11292-ijkmay/pyside-setup-opensource-src-6.2.0/sources/pyside6/PySide6/QtDesigner --output-directory=/tmp/pyside-20211011-11292-ijkmay/pyside-setup-opensource-src-6.2.0/pyside3_build/py3.9-qt6.2.0-64bit-release/pyside6/PySide6/QtDesigner --license-file=/tmp/pyside-20211011-11292-ijkmay/pyside-setup-opensource-src-6.2.0/sources/pyside6/PySide6/QtDesigner/../licensecomment.txt --api-version=6.2 --framework-include-paths=/usr/local/lib /tmp/pyside-20211011-11292-ijkmay/pyside-setup-opensource-src-6.2.0/pyside3_build/py3.9-qt6.2.0-64bit-release/pyside6/PySide6/QtDesigner_global.h /tmp/pyside-20211011-11292-ijkmay/pyside-setup-opensource-src-6.2.0/sources/pyside6/PySide6/QtDesigner/typesystem_designer.xml

      Update:

      Process 50912 stoppedProcess 50912 stopped* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8) 
      frame #0: 0x00000001001e42fc shiboken6`QScopedPointer<AbstractMetaClassPrivate, QScopedPointerDeleter<AbstractMetaClassPrivate> >::operator->(this=0x0000000000000008) const at qscopedpointer.h:127:16 
         124
         125 	    T *operator->() const noexcept
         126 	    {
      -> 127 	        return d;
         128 	    }
         129
         130 	    bool operator!() const noexcept
      Target 0: (shiboken6) stopped
      

       stack trace:

      * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
        * frame #0: 0x00000001001e42fc shiboken6`QScopedPointer<AbstractMetaClassPrivate, QScopedPointerDeleter<AbstractMetaClassPrivate> >::operator->(this=0x0000000000000008) const at qscopedpointer.h:127:16
          frame #1: 0x00000001001e6960 shiboken6`AbstractMetaClass::typeSystemBaseClasses(this=0x0000000000000000) const at abstractmetalang.cpp:491:36
          frame #2: 0x00000001001e6af8 shiboken6`AbstractMetaClass::allTypeSystemAncestors(this=0x0000000000000000) const at abstractmetalang.cpp:503:47
          frame #3: 0x00000001000b2721 shiboken6`OverloadDataRootNode::sortNextOverloads(this=0x00007ffeefbfd068, api=0x000000010ba06b10) at overloaddata.cpp:292:65
          frame #4: 0x00000001000b80c2 shiboken6`OverloadData::OverloadData(this=0x00007ffeefbfd068, overloads=0x00000001170f3038, api=0x000000010ba06b10) at overloaddata.cpp:483:5
          frame #5: 0x00000001000b8785 shiboken6`OverloadData::OverloadData(this=0x00007ffeefbfd068, overloads=0x00000001170f3038, api=0x000000010ba06b10) at overloaddata.cpp:465:1
          frame #6: 0x000000010002190b shiboken6`CppGenerator::generateClass(this=0x000000010ba085b0, s=0x00007ffeefbfd638, classContext=0x00007ffeefbfd908) at cppgenerator.cpp:548:22
          frame #7: 0x000000010000871a shiboken6`Generator::generateFileForContext(this=0x000000010ba085b0, context=0x00007ffeefbfd908) at generator.cpp:429:5
          frame #8: 0x0000000100008ca8 shiboken6`Generator::generate(this=0x000000010ba085b0) at generator.cpp:467:14
          frame #9: 0x000000010010d82e shiboken6`shibokenMain(argc=14, argv=0x00007ffeefbff008) at main.cpp:715:56
          frame #10: 0x000000010010f899 shiboken6`main(argc=14, argv=0x00007ffeefbff008) at main.cpp:734:14
          frame #11: 0x00007fff203acf3d libdyld.dylib`start + 1
          frame #12: 0x00007fff203acf3d libdyld.dylib`start + 1
      

       Update:

      shiboken could not find QWidget, when targetType is QWidget this line will return a nullptr, only Widget in the list.

       

      Update:

      If using homebrew, shiboken argument --include-paths contains /usr/local/include (Qt's include dir), it will trigger segmentation fault, if use /usr/local/opt/qt/include instead, everything is ok, but /usr/local/include contains all files in /usr/local/opt/qt/include...

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            paper L JC
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes