[PyQt] Building PyQt4 4.10.3 with SIP 4.15.3 fails

Alexander Jones 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 
yacc parser.y 
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... 

Thanks 

Alex 

----- 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
> 4.15.3

> ...

> 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
> /builds/b7d39adb1af7447480fbcb90d33a9f95/lib/python.
> PyQt4 is being built with generated docstrings.
> PyQt4 is being built with 'protected' redefined as 'public'.
> The Designer plugin will be installed in
> /builds/b7d39adb1af7447480fbcb90d33a9f95/lib/qt/plugins.
> The PyQt4 .sip files will be installed in
> /builds/b7d39adb1af7447480fbcb90d33a9f95/share/sip.
> pyuic4, pyrcc4 and pylupdate4 will be installed in
> /builds/b7d39adb1af7447480fbcb90d33a9f95/bin.
> The interpreter used by pyuic4 is
> /builds/efadbeb8de594d03860666e827c593c9/bin/python.
> 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
> /user_data/.tmp/tmpi93lOi.bobbuild/sip
> /user_data/.tmp/tmpi93lOi.bobbuild/sip/QtCore/QtCoremod.sip
> sip: /user_data/.tmp/tmpi93lOi.bobbuild/sip/QtCore/QtCoremod.sip:28: syntax
> error
> 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
> www.dneg.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20131209/8dc3a047/attachment.html>


More information about the PyQt mailing list