[PyQt] Building PyQt4 4.10.3 with SIP 4.15.3 fails

Phil Thompson phil at riverbankcomputing.com
Mon Dec 9 22:07:17 GMT 2013


On 09-12-2013 9:25 pm, Alexander Jones wrote:
> 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...

flex and bison are needed. I'll try updating configure.py so that it 
makes sure that parser.c and lexer.c are newer.

Phil


More information about the PyQt mailing list