buildroot / Linux4SAM 6.0 / SAMA5D2 Xplained Ultra: pyqt build fails at "sip: QOpenGLFramebufferObject is undefined"

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

mustafazr
Posts: 2
Joined: Fri Jun 07, 2019 7:59 pm

buildroot / Linux4SAM 6.0 / SAMA5D2 Xplained Ultra: pyqt build fails at "sip: QOpenGLFramebufferObject is undefined"

Wed Jun 12, 2019 8:16 pm

buildroot / Linux4SAM 6.0 / SAMA5D2 Xplained Ultra: pyqt build fails at "sip: QOpenGLFramebufferObject is undefined"

When attempting to build the demo image for the SAMA5D2 Xplained Ultra board using buildroot at Linux4SAM 6.0 version, I get the following error during python-pyqt5 build:

-----------------------------------------------------

Generating the C++ source for the QtQuick module...
/home/mustafazr/buildroot/output/host/bin/sip -w -f -x VendorID -t WS_X11 -t Qt_5_9_4 -x PyQt_OpenGL -x PyQt_Desktop_OpenGL -x Py_v3 -B Qt_6_0_0 -P -c /home/mustafazr/buildroot/output/build/python-pyqt5-5.7/QtQuick -I sip -I /home/mustafazr/buildroot/output/build/python-pyqt5-5.7/sip /home/mustafazr/buildroot/output/build/python-pyqt5-5.7/sip/QtQuick/QtQuickmod.sip
sip: QOpenGLFramebufferObject is undefined
Error: Unable to create the C++ code.

-----------------------------------------------------

It occurs since:
- sama5d2_xplained_demo_defconfig enables BR2_PACKAGE_VISION & BR2_PACKAGE_PYTHON_IOCONTROL
- This causes BR2_PACKAGE_PYTHON_PYQT5 to be enabled
- qt5 is built with the Qt Quick module w/ OpenGL dependency removed per https://github.com/buildroot/buildroot/ ... b3d9978ecc / https://blog.qt.io/blog/2016/08/15/the- ... in-qt-5-8/
- pyqt5 also attempts to compile Qt Quick using sip.
- However, since BR2_PACKAGE_QT5BASE_OPENGL is not set, pyqt5 is aware that OpenGL is not enabled, thus PyQt_OpenGL flag is set for sip as a feature that is not supported
- When attempting to compile Qt Quick using sip, PyQt5_gpl-5.7\sip\QtQuick\QtQuickmod.sip includes qquickframebufferobject.sip
- qquickframebufferobject.sip relies on objects such as QOpenGLFramebufferObject
- This would normally be defined from the include of QtGui/QtGuimod.sip, through including qopenglframebufferobject.sip. However, qopenglframebufferobject.sip only defines QOpenGLFramebufferObject if !PyQt_OpenGL.
- Thus QOpenGLFramebufferObject is not defined and Qt Quick sip build fails

So in summary, Qt 5.9.4 supports Qt Quick without OpenGL, but pyqt-5.7 does not, thus the latter's build fails.

Has anyone faced this? Any ideas? I've disabled BR2_PACKAGE_PYTHON_PYQT5 (and the associated applications) for now - but I'm wondering why the defconfig fails and surely, it must have built at some point in time as the demo image provided does have these applications present. I've tried to inspect the latest pyqt version (5.12.2), they don't provide a git repo, just a tar ball, and nothing obvious stood out from diff vs 5.7 that would fix this, so I'm not sure if they've yet added support for Qt Quick without OpenGL. Is there any easy way to disable Qt Quick for pyqt without disturbing the Qt build? Or even better yet, a patch for pyqt-5.7 that allows Qt Quick without OpenGL?

Thanks
nferre
Site Admin
Posts: 205
Joined: Wed Feb 14, 2007 11:17 am

Re: buildroot / Linux4SAM 6.0 / SAMA5D2 Xplained Ultra: pyqt build fails at "sip: QOpenGLFramebufferObject is undefined"

Thu Jun 13, 2019 10:39 am

Hi,

Do you use both the buildroot external: https://github.com/linux4sam/buildroot- ... microchip/
together with buildroot-at91: https://github.com/linux4sam/buildroot-at91
for generating your rootfs? They must be used together.

Hope that it helps.
Best regards,
Nicolas
mustafazr
Posts: 2
Joined: Fri Jun 07, 2019 7:59 pm

Re: buildroot / Linux4SAM 6.0 / SAMA5D2 Xplained Ultra: pyqt build fails at "sip: QOpenGLFramebufferObject is undefined"

Thu Jun 13, 2019 4:40 pm

Yes, I am using buildroot-external-microchip in conjunction with buildroot-at91. That's where the demo defconfig comes from.

Return to “LINUX”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests