[PyQt] Building PyQt4 4.10.3 with SIP 4.15.3 fails
aj at dneg.com
Mon Dec 9 21:25:37 GMT 2013
I finally tracked this down to the sip build varying based on whether the sipgen/parser.y file was newer or older than sipgen/parser.c. If for some reason the .y mtime is newer, gnu make will regenerate the .c file using yacc, based on an implicit make rule(!), and the resultant parser.c file is completely wrong, or at least very different to the shipped parser.c file!
I saw a similar issue with lexer.l -> lexer.c, though its result seems OK on my system.
gcc -c -pipe -O2 -w -DNDEBUG -I. -o main.o main.c
gcc -c -pipe -O2 -w -DNDEBUG -I. -o transform.o transform.c
gcc -c -pipe -O2 -w -DNDEBUG -I. -o gencode.o gencode.c
gcc -c -pipe -O2 -w -DNDEBUG -I. -o extracts.o extracts.c
gcc -c -pipe -O2 -w -DNDEBUG -I. -o export.o export.c
gcc -c -pipe -O2 -w -DNDEBUG -I. -o heap.o heap.c
lex -t lexer.l > lexer.c
yacc: 2 shift/reduce conflicts.
mv -f y.tab.c parser.c
gcc -c -pipe -O2 -w -DNDEBUG -I. -o parser.o parser.c
gcc -c -pipe -O2 -w -DNDEBUG -I. -o lexer.o lexer.c
Should it not be the case that the .l and .y files successfully regenerate working .c files? I have fixed my system to make sure the timestamps match those in the tarball, but it seems a bit peculiar that an implicit make rule is kicking in and having yacc generate a completely broken .c file.
In any event, posting this here for reference. I saw a few other people throughout internets history have run into sip 'syntax errors' for no apparent reason...
----- Original Message -----
> From: "Alexander Jones" <aj at dneg.com>
> To: pyqt at riverbankcomputing.com
> Sent: Friday, 6 December, 2013 4:00:54 PM
> Subject: Building PyQt4 4.10.3 with SIP 4.15.3 fails
> Last bits of the build log suggest that sip/QtCore/QtCoremod.sip line 28
> %Module(name=PyQt4.QtCore, keyword_arguments="Optional", version=1)
> is not valid sip syntax.
> $ /builds/33053b6f7201475883aaaf17df751156/bin/sip -V
> Qt v4.8.5 (Open Source) is being used.
> The qmake executable is /builds/31fd53e06351418c8c3a628224717e39/bin/qmake.
> Qt is built as a shared library.
> SIP 4.15.3 is being used.
> The sip executable is /builds/33053b6f7201475883aaaf17df751156/bin/sip.
> These PyQt4 modules will be built: QtCore, QtGui, QtHelp, QtMultimedia,
> QtNetwork, QtDeclarative, QtScript, QtScriptTools, QtXml, QtOpenGL, QtSql,
> QtSvg, QtTest, QtWebKit, QtXmlPatterns, phonon, QtDesigner, QtDBus.
> The PyQt4 Python package will be installed in
> PyQt4 is being built with generated docstrings.
> PyQt4 is being built with 'protected' redefined as 'public'.
> The Designer plugin will be installed in
> The PyQt4 .sip files will be installed in
> pyuic4, pyrcc4 and pylupdate4 will be installed in
> The interpreter used by pyuic4 is
> Embedding sip flags...
> Generating the .pro file for the QPy support library for QtCore...
> Generating the Makefile for the QPy support library for QtCore...
> /builds/31fd53e06351418c8c3a628224717e39/bin/qmake w_qpycore.pro
> Generating the C++ source for the QtCore module...
> /builds/33053b6f7201475883aaaf17df751156/bin/sip -w -x VendorID -t WS_X11 -t
> Qt_4_8_4 -x PyQt_NoPrintRangeBug -x Py_v3 -o -P -a QtCore.api -g -c
> /user_data/.tmp/tmpi93lOi.bobbuild/QtCore -I sip -I
> sip: /user_data/.tmp/tmpi93lOi.bobbuild/sip/QtCore/QtCoremod.sip:28: syntax
> Error: Unable to create the C++ code.
> Any idea what's going on? Pretty sure I was getting this to build before...
> Alexander Jones
> Double Negative R&D
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt