FS#51396 - [gobject-introspection] g-ir-scanner hangs while building Cinnamon

Attached to Project: Arch Linux
Opened by Balló György (City-busz) - Saturday, 15 October 2016, 14:31 GMT
Last edited by Jan de Groot (JGC) - Thursday, 20 October 2016, 13:12 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

It looks like there is a problem with our git-based gobject-introspection package. When I build any version (commit) of gobject-introspection from git, cinnamon build always hang (g-ir-scanner uses 100% CPU, and never finishes). When I rebuild gobject-introspection from the released tarball (e.g. 1.50.0), cinnamon builds successfully.
This task depends upon

Closed by  Jan de Groot (JGC)
Thursday, 20 October 2016, 13:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  https://bugzilla.gnome.org/show_bug.cgi? id=773272 upstream.
Comment by Jan de Groot (JGC) - Wednesday, 19 October 2016, 11:01 GMT
Looks like a bug in flex. When building from git, the files scannerparser.h/c and scannerlexer.c are generated. When building from tarball these are included in the tarball. scannerparser.c/h are identical, scannerlexer.c is not. The main difference is that tarball is built with flex 2.5.39, we build with flex 2.6.1

Can you reproduce this with tarball build by removing the scannerlexer.c before running make, that way we can find out if it's caused by a bug in flex or if something else is going on here.
Comment by Jan Alexander Steffens (heftig) - Wednesday, 19 October 2016, 20:32 GMT
If flex is indeed the problem, it would also be interesting to know if flex from https://github.com/westes/flex master fixes it.
Comment by Jan de Groot (JGC) - Thursday, 20 October 2016, 10:57 GMT
Removing the pregenerated files from the source reproduces the problem. Tried with flex 2.6.1 patched with patches from Fedora and tried with Flex git master, both show the problem, so there's no fix available yet.

Eventually this will hit upstream releases also in the near future, as upstream maintainers will move to more recent distributions with flex 2.6.x in the future.
Comment by Jan de Groot (JGC) - Thursday, 20 October 2016, 11:52 GMT
Some google skills (flex 2.6 patch) pointed me to this:
https://www.redhat.com/archives/libguestfs/2016-July/msg00252.html

Seems flex returns 0 instead of EOF now. Looking at the gobject-introspection lexer code, it checks for EOF on gtk-doc comments where it should check for 0 now.

Probably cinnamon code contains a broken gtk-doc block, so gobject-introspection will continue parsing the whole file until it reaches EOF. As EOF is not returned this will loop until killed.

Loading...