Building PyQt6 with GLES

Ben Greiner code-pyqt at bnavigator.de
Tue Jul 13 16:59:27 BST 2021


Hi,

we currently get a failure while trying to build PyQt6 for aarch64 on 
openSUSE distributions. Qt6 for ARM has opengles2 enabled.


[   47s] + grep opengles2 /usr/include/qt6/QtGui/qtgui-config.h
[   47s] #define QT_FEATURE_opengles2 1
[   47s] + grep -R 'typedef GLuint64' /usr/include
[   47s] /usr/include/qt6/QtGui/qopengles2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLEIMGPROC) (GLuint texture);
[   47s] /usr/include/qt6/QtGui/qopengles2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEIMGPROC) (GLuint texture, GLuint sampler);
[   47s] /usr/include/qt6/QtGui/qopengles2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
[   47s] /usr/include/qt6/QtGui/qopengles2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
[   47s] /usr/include/qt6/QtGui/qopengles2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
[   47s] /usr/include/qt6/QtGui/qopenglext.h:typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);
[   47s] /usr/include/qt6/QtGui/qopenglext.h:typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);
[   47s] /usr/include/qt6/QtGui/qopenglext.h:typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
[   47s] /usr/include/qt6/QtGui/qopenglext.h:typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
[   47s] /usr/include/qt6/QtGui/qopenglext.h:typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
[   47s] /usr/include/qt6/QtGui/qopenglext.h:typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
[   47s] /usr/include/GLES2/gl2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLEIMGPROC) (GLuint texture);
[   47s] /usr/include/GLES2/gl2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEIMGPROC) (GLuint texture, GLuint sampler);
[   47s] /usr/include/GLES2/gl2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
[   47s] /usr/include/GLES2/gl2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
[   47s] /usr/include/GLES2/gl2ext.h:typedef GLuint64 (GL_APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
[   47s] + export 'CXXFLAGS=-mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g'
[   47s] + CXXFLAGS='-mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g'
[   47s] + export 'CFLAGS=-mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g'
[   47s] + CFLAGS='-mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g'
[   47s] ++ '[' -f _current_flavor ']'
[   47s] ++ true
[   47s] + last_flavor=
[   47s] + '[' -z '' ']'
[   47s] + last_flavor=tmp
[   47s] + '[' tmp '!=' python39 ']'
[   47s] + '[' -d build ']'
[   47s] + '[' -d _build.python39 ']'
[   47s] + echo python39
[   47s] + python_flavor=python39
[   47s] + sip-build-3.9 --verbose --api-dir /usr/share/qt6/qsci/api/python_3.9/ --no-make --qmake=/usr/lib64/qt6/bin/qmake --qmake-setting 'QMAKE_CFLAGS += -mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g ' --qmake-setting 'QMAKE_CXXFLAGS += -mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g ' --pep484-pyi --confirm-license --qt-shared
[   47s] Querying qmake about your Qt installation...
[   47s] /usr/lib64/qt6/bin/qmake -query
[   47s] This is the GPL version of PyQt 6.1.1 (licensed under the GNU General Public License) for Python 3.9.5 on linux.
[   47s] Found the license file 'pyqt-gpl.sip'.
...
[   53s] Checking to see if the QtGui bindings can be built...
[   53s] /usr/lib64/qt6/bin/qmake QtGui.pro
[   53s] Info: creating stash file /home/abuild/rpmbuild/BUILD/PyQt6-6.1.1/build/cfgtest_QtGui/.qmake.stash
[   53s] make
[   55s] g++ -c -pipe -mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt6 -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtCore -I. -I/usr/lib64/qt6/mkspecs/linux-g++ -o cfgtest_QtGui.o ../../config-tests/cfgtest_QtGui.cpp
[   55s] g++ -Wl,-O1 -Wl,-rpath,/usr/lib64 -o QtGui cfgtest_QtGui.o   /usr/lib64/libQt6Gui.so /usr/lib64/libGLESv2.so /usr/lib64/libEGL.so /usr/lib64/libQt6Core.so -lpthread -lGLESv2
[   55s] /home/abuild/rpmbuild/BUILD/PyQt6-6.1.1/build/cfgtest_QtGui/./QtGui /home/abuild/rpmbuild/BUILD/PyQt6-6.1.1/build/cfgtest_QtGui/cfgtest_QtGui.out
...

[   67s] Checking to see if the QtOpenGL bindings can be built...
[   67s] /usr/lib64/qt6/bin/qmake QtOpenGL.pro
[   67s] Info: creating stash file /home/abuild/rpmbuild/BUILD/PyQt6-6.1.1/build/cfgtest_QtOpenGL/.qmake.stash
[   67s] make
[   70s] g++ -c -pipe -mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../qpy/QtOpenGL -I/usr/include/qt6 -I/usr/include/qt6/QtOpenGL -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtCore -I. -I/usr/lib64/qt6/mkspecs/linux-g++ -o cfgtest_QtOpenGL.o cfgtest_QtOpenGL.cpp
[   70s] g++ -Wl,-O1 -Wl,-rpath,/usr/lib64 -o QtOpenGL cfgtest_QtOpenGL.o   /usr/lib64/libQt6OpenGL.so /usr/lib64/libQt6Gui.so /usr/lib64/libGLESv2.so /usr/lib64/libEGL.so /usr/lib64/libQt6Core.so -lpthread -lGLESv2
...
[   97s] These bindings will be built: QtCore, QtNetwork, QtGui, QtQml, QtWidgets, QtDBus, QtDesigner, QtHelp, QtOpenGL, QtOpenGLWidgets, QtPrintSupport, QtQuick, QtQuickWidgets, QtSql, QtSvg, QtSvgWidgets, QtTest, QtXml.
[   97s] Generating the QtCore bindings...
[   97s] Generating the QtCore .api file...
[   97s] Generating the QtCore .pyi file...
[   97s] Generating the QtNetwork bindings...
[   98s] Generating the QtNetwork .api file...
[   98s] Generating the QtNetwork .pyi file...
[   98s] Generating the QtGui bindings...
[  100s] Generating the QtGui .api file...
[  100s] Generating the QtGui .pyi file...
[  100s] Generating the QtQml bindings...
[  100s] Generating the QtQml .api file...
[  100s] Generating the QtQml .pyi file...
[  100s] Generating the QtWidgets bindings...
[  106s] Generating the QtWidgets .api file...
[  106s] Generating the QtWidgets .pyi file...
[  106s] Generating the QtDBus bindings...
[  107s] Generating the QtDBus .api file...
[  107s] Generating the QtDBus .pyi file...
[  107s] Generating the QtDesigner bindings...
[  112s] Generating the QtDesigner .api file...
[  112s] Generating the QtDesigner .pyi file...
[  112s] Generating the QtHelp bindings...
[  117s] Generating the QtHelp .api file...
[  117s] Generating the QtHelp .pyi file...
[  117s] Generating the QtOpenGL bindings...
[  119s] sip-build-3.9: GLuint64 is undefined
[  119s]
[  119s] error: Bad exit status from /var/tmp/rpm-tmp.GvLZOC (%build)


Mesa-libGLESv3-devel-21.1.4
Mesa-libGLESv2-devel-21.1.4

Qt6 6.1.2
SIP v 6.1.1
PyQt-builder 1.10.3


Full build log for openSUSE Tumbleweed on aarch64 (Python 3.9): 
https://susepaste.org/6003158 <https://susepaste.org/6003158>
Full build log for openSUSE Leap 15.3 on aarch64 (Python 3.6): 
https://susepaste.org/65317120 <https://susepaste.org/65317120>


Any hint what is going wrong?

Regards,
Ben



More information about the PyQt mailing list