Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Pyside2 over LinuxFB/DRM
Forum Updated to NodeBB v4.3 + New Features

Pyside2 over LinuxFB/DRM

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
14 Posts 3 Posters 2.0k 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.
  • J Offline
    J Offline
    JimJin
    wrote on last edited by
    #1

    We are using PySide2 on our embedded Linux board, the hardware does not contain GPU (and no X11). So we have to use LinuxFB/DRM. The Qt for C++ works well. We set the correct environment variables:

    export QT_QPA_FB_TSLIB=1
    
    export QT_ROOT=/data/QT5/arm-qt
    export QT_QPA_FONTDIR=$QT_ROOT/fonts/truetype/freefont
    export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
    export QT_PLUGIN_PATH=$QT_ROOT/plugins
    export LD_LIBRARY_PATH=$QT_ROOT/lib:$QT_ROOT/plugins/platforms
    export QT_QPA_PLATFORM=linuxfb
    export QT_QPA_FB_DRM=1
    

    After downloading PySide2(from https://archlinuxarm.org/packages/aarch64/pyside2), we run a python sample and it complains ImportError: /data/usr/lib/python3.9/site-packages/PySide2/QtWidgets.cpython-39-aarch64-linux-gnu.so: undefined symbol: _ZTI13QOpenGLWidget, version Qt_5.

    Does it mean that PySide2 (or shiboken2) didn't use LinuxFB/DRM? Is there any way to switch to LinuxFB/DRM without recompiling PySide2?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi and welcome to devnet,

      Does your Qt library come from the same source as PySide2 ?

      Does your example use QOpenGLWidget ?

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

      J 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Does your Qt library come from the same source as PySide2 ?

        Does your example use QOpenGLWidget ?

        J Offline
        J Offline
        JimJin
        wrote on last edited by JimJin
        #3

        Does your Qt library come from the same source as PySide2 ?

        No.

        Does your example use QOpenGLWidget ?

        No.

        Looking forward to your help. Thanks in advance.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @JimJin said in Pyside2 over LinuxFB/DRM:

          Does your Qt library come from the same source as PySide2 ?

          No

          Then you should ensure it does.

          PySide2 is built against a set of libraries that provides all the classes exposed as Python classes. You seem to use a version of Qt that is lighter weight.

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

          J 1 Reply Last reply
          0
          • SGaistS SGaist

            @JimJin said in Pyside2 over LinuxFB/DRM:

            Does your Qt library come from the same source as PySide2 ?

            No

            Then you should ensure it does.

            PySide2 is built against a set of libraries that provides all the classes exposed as Python classes. You seem to use a version of Qt that is lighter weight.

            J Offline
            J Offline
            JimJin
            wrote on last edited by JimJin
            #5

            Then you should ensure it does.

            Sure. We are going to do it.

            You seem to use a version of Qt that is lighter weight.

            Yes. We are using Qt Embedded. However, we can't find the manual of compiling PySide2 on ARM. Could you please show us a link of a porting guide to ARM?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              What are you using to cross-compile Qt ?

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

              W 1 Reply Last reply
              0
              • SGaistS SGaist

                What are you using to cross-compile Qt ?

                W Offline
                W Offline
                wonghui
                wrote on last edited by
                #7

                @SGaist said in Pyside2 over LinuxFB/DRM:

                What are you using to cross-compile Qt ?

                We are using linaro-gcc (aarch64-linux-gnu)

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  JimJin
                  wrote on last edited by
                  #8

                  @JimJin said in Pyside2 over LinuxFB/DRM:

                  Does your Qt library come from the same source as PySide2 ?

                  Is it possible to hack PySide2 binaries(from https://archlinuxarm.org/packages/aarch64/pyside2) which redirect OpenGL to LinuxFB?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    You are mixing two different things. The backend plugin is not the issue.

                    Your issue is that you are trying to use a version of PySide2 that was built against a version of Qt with OpenGL enable and thus using the corresponding symbols with a version of Qt with OpenGL disabled as it seems.

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

                    J 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      You are mixing two different things. The backend plugin is not the issue.

                      Your issue is that you are trying to use a version of PySide2 that was built against a version of Qt with OpenGL enable and thus using the corresponding symbols with a version of Qt with OpenGL disabled as it seems.

                      J Offline
                      J Offline
                      JimJin
                      wrote on last edited by
                      #10

                      Your issue is that you are trying to use a version of PySide2 that was built against a version of Qt with OpenGL enable and thus using the corresponding symbols with a version of Qt with OpenGL disabled as it seems.

                      Yes, exactly. So,

                      1. Is there any hack(or workaround) to let the PySide2 of OpenGL work on QT of LinuxFB?
                      2. Or, is there any manual (or article) to guide us to cross-compile PySide2 on embedded Linux?
                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @JimJin said in Pyside2 over LinuxFB/DRM:

                        Is there any hack(or workaround) to let the PySide2 of OpenGL work on QT of LinuxFB?

                        As I already wrote several times: your issue is unrelated to mixing OpenGL and LinuxFB

                        @JimJin said in Pyside2 over LinuxFB/DRM:

                        Or, is there any manual (or article) to guide us to cross-compile PySide2 on embedded Linux?

                        I am not aware of any but since it's a Qt project following the documentation:

                        python setup.py build --qmake=/path/to/your-cross-compiled-Qt/bin/qmake --ignore-git --parallel=8
                        

                        might be enough.

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

                        J W 2 Replies Last reply
                        0
                        • SGaistS SGaist

                          @JimJin said in Pyside2 over LinuxFB/DRM:

                          Is there any hack(or workaround) to let the PySide2 of OpenGL work on QT of LinuxFB?

                          As I already wrote several times: your issue is unrelated to mixing OpenGL and LinuxFB

                          @JimJin said in Pyside2 over LinuxFB/DRM:

                          Or, is there any manual (or article) to guide us to cross-compile PySide2 on embedded Linux?

                          I am not aware of any but since it's a Qt project following the documentation:

                          python setup.py build --qmake=/path/to/your-cross-compiled-Qt/bin/qmake --ignore-git --parallel=8
                          

                          might be enough.

                          J Offline
                          J Offline
                          JimJin
                          wrote on last edited by
                          #12

                          @SGaist Thank you very much. I'll try it ASAP and keep you posted.

                          1 Reply Last reply
                          0
                          • SGaistS SGaist

                            @JimJin said in Pyside2 over LinuxFB/DRM:

                            Is there any hack(or workaround) to let the PySide2 of OpenGL work on QT of LinuxFB?

                            As I already wrote several times: your issue is unrelated to mixing OpenGL and LinuxFB

                            @JimJin said in Pyside2 over LinuxFB/DRM:

                            Or, is there any manual (or article) to guide us to cross-compile PySide2 on embedded Linux?

                            I am not aware of any but since it's a Qt project following the documentation:

                            python setup.py build --qmake=/path/to/your-cross-compiled-Qt/bin/qmake --ignore-git --parallel=8
                            

                            might be enough.

                            W Offline
                            W Offline
                            wonghui
                            wrote on last edited by
                            #13

                            @SGaist Is there an option to disable opengl when build pyside2?

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              I do not think there's anything special to do as long as you use a Qt version that was built with OpenGL disabled but that's only a guess.

                              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

                              • Login

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