[PyQt] Error Building PyQt5 from Source

James Ross-Smith jars121 at gmail.com
Tue Aug 1 10:17:32 BST 2017


G'day,

I'm compiled Qt 5.9.0 on my Raspberry Pi, as I required an EGLFS
environment for displaying graphics without the X window. Upon (seemingly)
successfully compiling and installing Qt 5.9.0, I've then compiled and
installed Python 3.6.2 also from source. Following Python, I compiled and
installed SIP.

I've downloaded, unpacked and attempted to install PyQt5, but am running
into errors. I've used the --qmake and --sip flags in the ./configure
command to point to the required executables, which appears to have worked.
I receive the following strange line when checking whether or not to build
QtGui:

Checking to see if the QtGui module should be built...
Disabled QtGui features: P, y, Q, t, _, D, e, s, k, t, o, p, _, O, p, e, n,
G, L

The build continues, but throws the following final lines in the 'make'
command:

In file included from
/home/pi/PyQt5_gpl-5.9/sip/QtGui/qopenglshaderprogram.sip:341:0,
                from sipQtGuiQAbstractTextDocumentLayoutSelection.cpp:24:
../qpy/QtGui/qpyopengl_api.h:70:53: error: ‘GLdouble’ does not name a type
PyObject *qpyopengl_from_GLdouble(int *eflag, const GLdouble *array,
                                                    ^
In file included from
/home/pi/PyQt5_gpl-5.9/sip/QtGui/qopenglshaderprogram.sip:341:0,
                from sipQtGuiQAbstractTextDocumentLayout.cpp:24:
../qpy/QtGui/qpyopengl_api.h:70:53: error: ‘GLdouble’ does not name a type
PyObject *qpyopengl_from_GLdouble(int *eflag, const GLdouble *array,
                                                    ^
In file included from
/home/pi/PyQt5_gpl-5.9/sip/QtGui/qopenglshaderprogram.sip:341:0,
                from sipQtGuiQAbstractTextDocumentLayoutPaintContext.cpp:24:
../qpy/QtGui/qpyopengl_api.h:70:53: error: ‘GLdouble’ does not name a type
PyObject *qpyopengl_from_GLdouble(int *eflag, const GLdouble *array,
                                                    ^
In file included from
/home/pi/PyQt5_gpl-5.9/sip/QtGui/qopenglshaderprogram.sip:341:0,
                from sipQtGuiQAbstractOpenGLFunctions.cpp:24:
../qpy/QtGui/qpyopengl_api.h:70:53: error: ‘GLdouble’ does not name a type
PyObject *qpyopengl_from_GLdouble(int *eflag, const GLdouble *array,
                                                    ^
Makefile:1336: recipe for target 'sipQtGuiQAbstractOpenGLFunctions.o' failed
make[1]: *** [sipQtGuiQAbstractOpenGLFunctions.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:1705: recipe for target
'sipQtGuiQAbstractTextDocumentLayoutSelection.o' failed
make[1]: *** [sipQtGuiQAbstractTextDocumentLayoutSelection.o] Error 1
Makefile:1584: recipe for target
'sipQtGuiQAbstractTextDocumentLayoutPaintContext.o' failed
make[1]: *** [sipQtGuiQAbstractTextDocumentLayoutPaintContext.o] Error 1
Makefile:1463: recipe for target 'sipQtGuiQAbstractTextDocumentLayout.o'
failed
make[1]: *** [sipQtGuiQAbstractTextDocumentLayout.o] Error 1
make[1]: Leaving directory '/home/pi/PyQt5_gpl-5.9/QtGui'
Makefile:114: recipe for target 'sub-QtGui-make_first-ordered' failed
make: *** [sub-QtGui-make_first-ordered] Error 2

When I then run the 'make install' command I receive the following errors:

In file included from
/home/pi/PyQt5_gpl-5.9/sip/QtGui/qopenglshaderprogram.sip:341:0,
                 from sipQtGuiQAbstractOpenGLFunctions.cpp:24:
../qpy/QtGui/qpyopengl_api.h:70:53: error: ‘GLdouble’ does not name a type
 PyObject *qpyopengl_from_GLdouble(int *eflag, const GLdouble *array,
                                                     ^
Makefile:1336: recipe for target 'sipQtGuiQAbstractOpenGLFunctions.o' failed
make[1]: *** [sipQtGuiQAbstractOpenGLFunctions.o] Error 1
make[1]: Leaving directory '/home/pi/PyQt5_gpl-5.9/QtGui'
Makefile:138: recipe for target 'sub-QtGui-install_subtargets-ordered'
failed
make: *** [sub-QtGui-install_subtargets-ordered] Error 2

At this point I can start Python3.6 and import PyQt5 successfully (so far
as the interpreter doesn't raise any errors), as well as PyQt5.QtCore, but
none of the other modules (such as QtGui) seem to exist.

Can anyone point me in the right direction? This is my first attempt at
building packages from source and I'm a little unsure as to where to start
trying to resolve these issues.

Many thanks,

Jamie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170801/caef4080/attachment.html>


More information about the PyQt mailing list