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

QOpenGLWidget has no attribute 'defaultFramebufferObject' on macos/arm64

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.15.7
    • PySide
    • None
    • macOS

    Description

      when building from source with cmake on conda-forge on osx/arm64

      the function defaultFramebufferObject is not available in pyside2 (5.15.7, 5.15.8)

       

      I checked it is okay in pure c++ first just to be sure:

       

      #include <QOpenGLWidget>
      #include <QApplication>
      #include <iostream>
      int main(int argc, char *argv[])
      {
        QApplication app(argc, argv);
        QOpenGLWidget oglw;
        std::cout << "defaultFramebufferObject=" << oglw.defaultFramebufferObject() << std::endl;
        return 0;
      }
      

       

       

      But in Python (all versions 3.8-3.11) it is not:

       

      from PySide2.QtWidgets import QOpenGLWidget, QApplication
      app = QApplication()
      obj = QOpenGLWidget()
      print('python.obj.defaultFramebufferObject', obj.defaultFramebufferObject())
      

       

      I confirmed this by grep'ing defaultFramebufferObject on the Pyside2 binaries, where no .so module had this symbol contrary to all the other platforms (linux/x86_64, osx/x86_64, windows/x86_64, linux/aarch64)

       

      This is our build script:

      https://github.com/conda-forge/pyside2-feedstock/blob/main/recipe/build.sh

       

      This has been confirmed on homebrew, so not likely a conda-forge issue:

      https://github.com/napari/packaging/issues/35

       

      Original report at conda-forge:

      https://github.com/conda-forge/pyside2-feedstock/issues/142

       

      I should add that it works for all native platforms, as well as linux/aarch64 for which we cross-compile like osx/arm64 (the difference being that we're able to run cross-compiled code there thanks to qemu for tests), so we rely on the native x86_64 shiboken, could the problem stem from there ?

       

      Pyside6 is okay

       

      Attachments

        1. gluint.patch
          3 kB
        2. pyside2187_repro5.diff
          0.6 kB
        3. pyside2187_repro6.diff
          0.6 kB
        4. pyside2187.py
          0.7 kB

        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
              jschueller Julien Schueller
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes