[PyQt] PyQt5.9 on Raspberry Pi

Phil Thompson phil at riverbankcomputing.com
Tue Jul 25 18:21:29 BST 2017


On 25 Jul 2017, at 2:36 pm, Jens Carroll <jens at carroll.de> wrote:
> 
> Hi All,
> 
> I am having a hard time to compile PyQt5.9 natively on a Raspberry Pi 3
> (newest Raspbian). Qt5.9.2 compiles fine on it and as far as I can say
> the provided examples work as supposed. On PyQt5.9 doing a
> 
> python3 configure.py runs as well
> and a make works for the QtCore module.
> 
> Trouble starts with the QtGui module:
> 
> in qpy/QtGui/qpyopengl_api.h line 69 I changed:
> #if defined(SIP_FEATURE_PyQt_Desktop_OpenGL_)
> to overcome a undefined GLdouble (in the hope not getting in trouble
> while linking at a later state).
> 
> This helped and it compiles further up to (and here I am stuck!):
> 
> /usr/bin/g++ -c -march=armv8-a -mtune=cortex-a53
> -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -O2 -std=gnu++11
> -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC
> -Dprotected=public -DPy_LIMITED_API=0x03040000 -DQT_NO_EXCEPTIONS
> -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -isystem
> /usr/include/python3.4m -I../qpy/QtGui -I/usr/local/qt5/include
> -I/usr/local/qt5/include/QtGui -I/usr/local/qt5/include/QtCore -I.
> -I=/opt/vc/include -I=/opt/vc/include/interface/vcos/pthreads
> -I=/opt/vc/include/interface/vmcs_host/linux
> -I/usr/local/qt5/mkspecs/devices/linux-rasp-pi3-g++ -o
> sipQtGuiQOpenGLVersionProfile.o sipQtGuiQOpenGLVersionProfile.cpp
> /home/pi/opt/PyQt5_gpl-5.9/QtGui/sipQtGuiQOpenGLTimeMonitor.cpp:88:1:
> error: expected class-name before ‘{’ token
> {
> ^
> /home/pi/opt/PyQt5_gpl-5.9/QtGui/sipQtGuiQOpenGLTimeMonitor.cpp: In
> constructor ‘sipQOpenGLTimeMonitor::sipQOpenGLTimeMonitor(QObject*)’:
> /home/pi/opt/PyQt5_gpl-5.9/QtGui/sipQtGuiQOpenGLTimeMonitor.cpp:120:83:
> error: expected class-name before ‘(’ token
> sipQOpenGLTimeMonitor::sipQOpenGLTimeMonitor( ::QObject*a0):
> ::QOpenGLTimeMonitor(a0), sipPySelf(0)
> 
>          ^
> /home/pi/opt/PyQt5_gpl-5.9/QtGui/sipQtGuiQOpenGLTimeMonitor.cpp:120:83:
> error: expected ‘{’ before ‘(’ token
> /home/pi/opt/PyQt5_gpl-5.9/QtGui/sipQtGuiQOpenGLTimeMonitor.cpp: At
> global scope:
> /home/pi/opt/PyQt5_gpl-5.9/QtGui/sipQtGuiQOpenGLTimeMonitor.cpp:120:57:
> warning: unused parameter ‘a0’ [-Wunused-parameter]
> sipQOpenGLTimeMonitor::sipQOpenGLTimeMonitor( ::QObject*a0):
> ::QOpenGLTimeMonitor(a0), sipPySelf(0)
>                                                         ^
> /home/pi/opt/PyQt5_gpl-5.9/QtGui/sipQtGuiQOpenGLTimeMonitor.cpp:120:87:
> error: expected constructor, destructor, or type conversion before ‘,’ token
> sipQOpenGLTimeMonitor::sipQOpenGLTimeMonitor( ::QObject*a0):
> ::QOpenGLTimeMonitor(a0), sipPySelf(0)
> 
>              ^
> /home/pi/opt/PyQt5_gpl-5.9/QtGui/sipQtGuiQOpenGLTimeMonitor.cpp:120:98:
> error: expected constructor, destructor, or type conversion before ‘(’ token
> sipQOpenGLTimeMonitor::sipQOpenGLTimeMonitor( ::QObject*a0):
> ::QOpenGLTimeMonitor(a0), sipPySelf(0)
> ---------------
> 
> In case you are interested in my qt5.9.2 config.summary check out:
> http://paste.debian.net/978069/
> 
> I really would love to have PyQt5.9 running on my Pi3. Otherwise I need
> to reimplement my not so small PyQt app into C++.
> 
> Any help appreciated. Thanks in advance.
> Jens

Can you try the current PyQt5 snapshot? It fixes a regression in detecting disabled features.

If there is still a problem then send me a copy of cfgtest_QtGui.out which is created by configure.py.

Phil



More information about the PyQt mailing list