On ~amd64 emerging dev-python/PyQt5-5.9::gentoo ends in compile error: PyQt5_gpl-5.9-python2_7/QtQuick/sipQtQuickQSGGeometry.cpp:1077:42: error: ‘GL_DOUBLE’ was not declared in this scope
Created attachment 500194 [details] emerge --info
Created attachment 500196 [details] build.log
Same GL_DOUBLE issue here, but in different source file: sipQtGuiQAbstractOpenGLFunctions.cpp Build Log snippet: cd QtGui/ && ( test -e Makefile || /usr/lib64/qt5/bin/qmake -o Makefile /var/tmp/portage/dev-python/PyQt5-5.9/work/PyQt5_gpl-5.9-python2_7/QtGui/QtGui.pro 'QMAKE_AR=x86_64-pc-linux-gnu-ar cqs' QMAKE_CC=x86_64-pc-linux-gnu-gcc QMAKE_LINK_C=x86_64-pc-linux-gnu-gcc QMAKE_LINK_C_SHLIB=x86_64-pc-linux-gnu-gcc QMAKE_CXX=x86_64-pc-linux-gnu-g++ QMAKE_LINK=x86_64-pc-linux-gnu-g++ QMAKE_LINK_SHLIB=x86_64-pc-linux-gnu-g++ QMAKE_OBJCOPY=x86_64-pc-linux-gnu-objcopy QMAKE_RANLIB= QMAKE_STRIP= 'QMAKE_CFLAGS=-O2 -pipe' QMAKE_CFLAGS_RELEASE= QMAKE_CFLAGS_DEBUG= 'QMAKE_CXXFLAGS=-O2 -pipe' QMAKE_CXXFLAGS_RELEASE= QMAKE_CXXFLAGS_DEBUG= 'QMAKE_LFLAGS=-Wl,-O1 -Wl,--as-needed' QMAKE_LFLAGS_RELEASE= QMAKE_LFLAGS_DEBUG= ) && make -f Makefile make[1]: Entering directory '/var/tmp/portage/dev-python/PyQt5-5.9/work/PyQt5_gpl-5.9-python2_7/QtGui' x86_64-pc-linux-gnu-g++ -c -O2 -pipe -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/python2.7 -I../../PyQt5_gpl-5.9/qpy/QtGui -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o sipQtGuiQAbstractOpenGLFunctions.o sipQtGuiQAbstractOpenGLFunctions.cpp x86_64-pc-linux-gnu-g++ -c -O2 -pipe -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/python2.7 -I../../PyQt5_gpl-5.9/qpy/QtGui -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o sipQtGuiQAbstractTextDocumentLayout.o sipQtGuiQAbstractTextDocumentLayout.cpp In file included from /var/tmp/portage/dev-python/PyQt5-5.9/work/PyQt5_gpl-5.9/sip/QtGui/qopenglshaderprogram.sip:341:0, from sipQtGuiQAbstractOpenGLFunctions.cpp:24: ../../PyQt5_gpl-5.9/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 /var/tmp/portage/dev-python/PyQt5-5.9/work/PyQt5_gpl-5.9/sip/QtGui/qopenglshaderprogram.sip:341:0, from sipQtGuiQAbstractTextDocumentLayout.cpp:24: ../../PyQt5_gpl-5.9/qpy/QtGui/qpyopengl_api.h:70:53: error: ‘GLdouble’ does not name a type PyObject *qpyopengl_from_GLdouble(int *eflag, const GLdouble *array, ^~~~~~~~ make[1]: *** [Makefile:1171: sipQtGuiQAbstractOpenGLFunctions.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile:1175: sipQtGuiQAbstractTextDocumentLayout.o] Error 1 make[1]: Leaving directory '/var/tmp/portage/dev-python/PyQt5-5.9/work/PyQt5_gpl-5.9-python2_7/QtGui' make: *** [Makefile:186: sub-QtGui-make_first-ordered] Error 2 * ERROR: dev-python/PyQt5-5.9::gentoo failed (compile phase): * emake failed
I guess it will have to do with the version of sip... (4.19.3 in your case)
(In reply to Andreas Sturmlechner from comment #4) > I guess it will have to do with the version of sip... (4.19.3 in your case) Not sure what you mean... 4.19.3 is the latest sip version, and PyQt5-5.9 requires sip >= 4.19.3
it seems to be caused by having USE=gles2 enabled, are you sure that's what you want?
I had the same error, so I searched a little. At https://www.riverbankcomputing.com/static/Downloads/PyQt5/ChangeLog-5.9.1.dev1710071532 --- 2017-10-07 Phil Thompson <phil@riverbankcomputing.com> * PyQt5.msp: Added support for Qt v5.9.2. [f2ddcf108add] [tip] <5.9-maint> --- relates to a newer dev source: https://www.riverbankcomputing.com/static/Downloads/PyQt5/PyQt5_gpl-5.9.1.dev1710071532.tar.gz which needs a newer sip source: https://www.riverbankcomputing.com/static/Downloads/sip/sip-4.19.4.dev1710092233.tar.gz but trying - these newer sources did not work for me :(
Also interesting: https://www.riverbankcomputing.com/pipermail/pyqt/2017-October/039646.html where Thompson expects to make a new official release 3 weeks later. Which is today. Which is why I had a look just now.
I'm aware of all that, I follow upstream development... it's not particularly relevant unless you tell me that a newer dev snapshots fixes the issue (which you said it doesn't). Do you also have USE=gles2 enabled? Can you answer my question in comment #6?
USE -gles worked for me: --- [ebuild N ] dev-python/PyQt5-5.9::gentoo USE="bluetooth dbus -debug declarative designer examples -gles2 gui help location multimedia network opengl positioning printsupport sensors -serialport sql svg -testlib webchannel -webengine -webkit websockets widgets x11extras xmlpatterns" PYTHON_TARGETS="python2_7 -python3_4 python3_5 -python3_6" 0 KiB ... >>> Emerging (1 of 1) dev-python/PyQt5-5.9::gentoo >>> Installing (1 of 1) dev-python/PyQt5-5.9::gentoo --- ... but for now I had disabled qtwebkit by USE -webkit, because I have an old and slow computer.
Having qtwebkit over night I tried a second time now with USE -gles2 webkit Works! --- # emerge -D eric These are the packages that would be merged, in order: Calculating dependencies ..... .... done! [ebuild R ] dev-python/PyQt5-5.9::gentoo USE="bluetooth dbus -debug declarative designer examples -gles2 gui help location multimedia network opengl positioning printsupport sensors -serialport sql svg -testlib webchannel -webengine webkit* websockets widgets x11extras xmlpatterns" PYTHON_TARGETS="python2_7 -python3_4 python3_5 python3_6*" 0 KiB [ebuild N ] dev-python/qscintilla-python-2.10.1::gentoo USE="-debug -qt4 qt5" PYTHON_TARGETS="python2_7 -python3_4 python3_5 python3_6" 0 KiB [ebuild N ] dev-util/eric-17.10:6::pmaci PYTHON_SINGLE_TARGET="-python2_7 -python3_4 python3_5" PYTHON_TARGETS="python2_7 -python3_4 python3_5" 0 KiB Total: 3 packages (2 new, 1 reinstall), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] y >>> Verifying ebuild manifests >>> Emerging (1 of 3) dev-python/PyQt5-5.9::gentoo >>> Installing (1 of 3) dev-python/PyQt5-5.9::gentoo >>> Emerging (2 of 3) dev-python/qscintilla-python-2.10.1::gentoo >>> Installing (2 of 3) dev-python/qscintilla-python-2.10.1::gentoo >>> Emerging (3 of 3) dev-util/eric-17.10::pmaci >>> Installing (3 of 3) dev-util/eric-17.10::pmaci >>> Recording dev-util/eric in "world" favorites file... >>> Jobs: 3 of 3 complete --- Which shows dev-python/qscintilla-python can successfully utilize PyQt5-5.9
Removing the gles2 use flag from this package doesn't work on my system for 2 reasons: 1.. I'm still getting the same error as the OP if the flag is disabled. (I had to use the --nodeps option to emerge because of #2.) 2.. Emerge insists that I will also need to remove gles2 from dev-qt/qtgui. This is not possible, unfortunately, because a number of qt libraries have hard dependencies on dev-qt/qtgui[gles2]. These libraries have deep dependencies on various other qt and kde packages. Basically, removing gles2 is a system breaker. Could this be some weird incompatibility with GCC 6+? The OP is running GCC 6 and I'm running GCC 7.2. I know there were a lot of changes from GCC 5 to 6 so it makes me wonder. Thanks.
It looks like I've mis-read the dependency declarations that emerge is complaining about. The dependency is for dev-qt/qtgui[gles2=] which means that it needs to be enabled there if it's enabled here in an ebuild. It appears that the reverse is also true: "if it's enabled here it has to be enabled there" also "if it's not enabled here it can't be enabled there." Sorry for the confusion.
Same problem here, and i have to use new version of anki flashcards app, since old qtwebkit is masked for removal now, and so is the stable anki app version. So no option for -gles2 for me here, since new ver requires it.
I think I found the root cause and reported it upstream. https://www.riverbankcomputing.com/pipermail/pyqt/2017-November/039778.html
(In reply to Marcin Kowalski from comment #14) > Same problem here, and i have to use new version of anki flashcards app, > since old qtwebkit is masked for removal now, and so is the stable anki app > version. > > So no option for -gles2 for me here, since new ver requires it. anki does not require gles2 at all.
After inspecting the ebuild - it sure doesn't. But portage says otherwise. I'll take another look at it.
(In reply to Marcin Kowalski from comment #17) > After inspecting the ebuild - it sure doesn't. But portage says otherwise. > > I'll take another look at it. This is almost always just a less-than-ideal portage output due to certain sets of packages (mostly Qt) all needing to be build with identical values of gles2. This is compounded by some other unrelated packages pulling gles2 causing people to set the USE flag globally when it's really only needed for one or two packages.
same issue here. However I definetly need the gles2 flag, I have QT on wayland. At this time I'm using PyQt5-5.8.2 which is working fine (with QT 5.9.2). I need PyQt5 with gles2 for qutebrowser. I tested compiling with USE="-opengl", but with no more success. I tried both version 5.9.1 and 5.9.2, but failing with the same error. When trying to fix PyQt5 by patching the source code (removing GL_DOUBLE and GLdouble reference and ensure Desktop_GL or something like this is not defined), I run in other compile errors that seem more complicated to fix than just opting out some lines in the code. Has someone successfully built PyQt5 with gles2 support? Thanks
*** Bug 644438 has been marked as a duplicate of this bug. ***
(In reply to Davide Pesavento from comment #15) > I think I found the root cause and reported it upstream. > https://www.riverbankcomputing.com/pipermail/pyqt/2017-November/039778.html For what it's worth... Based on the response from upstream I removed all the code that adds "--enable-<whatever>" from the ebuild and ran it. (Yes, I know. This breaks most, if not all, of the use flags.) The package does appear to compile properly and I was able to compile and run sys-boot/multibootusb (from jorgicio overlay.) The program appears to work properly and all the UI bits do what they are supposed to do and I don't get any errors on the console when working with the UI. When I have more time I am going to try something more complicated like www-client/qutebrowser and see if that works. Either way, this is an absolutely horrible kludge. Thanks.
(In reply to Martin DiViaio from comment #21) > Based on the response from upstream I removed all the code that adds > "--enable-<whatever>" from the ebuild and ran it. (Yes, I know. This breaks > most, if not all, of the use flags.) Yeah, that's NOT a solution. I'd rather remove the gles2 USE flag than forcing all modules on everyone or introducing automagic deps.
This is still a problem (for me) with PyQt5-5.10.1. I played around with this a bit and ran the configure routine from the main repo and my ebuild. The only difference I see is that my ebuild adds "-x PyQt_Desktop_OpenGL" to all the sip calls during the configure phase. I tried adding '--disable=PyQt_Desktop_OpenGL' and '--disable-feature=PyQt_Desktop_OpenGL' to the ebuild but both options fail with an error saying it can't find a module by that name. Thanks.
Building PyQt5 for Raspberry Pi 3, so I need gles2 I guess... and I'm getting the same error. Any chance to fix this?
(In reply to Martin DiViaio from comment #23) > This is still a problem (for me) with PyQt5-5.10.1. > > I played around with this a bit and ran the configure routine from the main > repo and my ebuild. The only difference I see is that my ebuild adds "-x > PyQt_Desktop_OpenGL" to all the sip calls during the configure phase. > > I tried adding '--disable=PyQt_Desktop_OpenGL' and > '--disable-feature=PyQt_Desktop_OpenGL' to the ebuild but both options fail > with an error saying it can't find a module by that name. > > Thanks. After digging into this for a while, I ended up adding this to the myconf array in the ebuild: $(use gles2 && echo '--disable-feature PyQt_Desktop_OpenGL') This works for me, =dev-python/PyQt5-5.10.1[gles2] now builds fine. :)
(In reply to Quentin Minster from comment #25) > $(use gles2 && echo '--disable-feature PyQt_Desktop_OpenGL') > > This works for me, =dev-python/PyQt5-5.10.1[gles2] now builds fine. :) Worked like a charm. Many thanks! :)
(In reply to Quentin Minster from comment #25) > $(use gles2 && echo '--disable-feature PyQt_Desktop_OpenGL') > > This works for me, =dev-python/PyQt5-5.10.1[gles2] now builds fine. :) Thank You dear sir! Still fixes the same issue in PyQt5-12_pre1812231618
Still using my above fix as of =PyQt-5.12.1. Any chance this makes it in the official ebuild?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a6cf0fad8a57e0ddf138a70d17998722924d511 commit 3a6cf0fad8a57e0ddf138a70d17998722924d511 Author: Michael Palimaka <kensington@gentoo.org> AuthorDate: 2019-04-30 12:45:12 +0000 Commit: Michael Palimaka <kensington@gentoo.org> CommitDate: 2019-04-30 12:46:28 +0000 dev-python/PyQt5: fix build with USE="gles2" Bug: https://bugs.gentoo.org/635502 Thanks-to: Quentin Minster <quentin@minster.io> Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Michael Palimaka <kensington@gentoo.org> dev-python/PyQt5/PyQt5-5.12.1.ebuild | 1 + 1 file changed, 1 insertion(+)