GNOME Bugzilla – Bug 684159
gobject-introspection fails to build
Last modified: 2013-01-28 15:18:31 UTC
While trying to build gnumeric 1.11.6 with gobject-introspection support enabled, the build fails with: [ 263s] GISCAN Gnm-1.12.gir [ 264s] In file included from <stdin>:52:0: [ 264s] /home/abuild/rpmbuild/BUILD/gnumeric-1.11.6/src/gnm-style-impl.h:40:2: warning: #warning TODO use GOFont [-Wcpp] [ 272s] application.c:214: Warning: Gnm: '@wbc' parameter unexpected at this location: [ 272s] * @wbc: the workbook control that requested the operation. [ 272s] ^ [ 272s] application.c:215: Warning: Gnm: '@is_cut' parameter unexpected at this location: [ 272s] * @is_cut: is this a cut or a copy. [ 272s] ^ [ 272s] application.c:216: Warning: Gnm: '@sv' parameter unexpected at this location: [ 272s] * @sv: The source sheet for the copy. [ 272s] ^ [ 272s] application.c:217: Warning: Gnm: '@area' parameter unexpected at this location: [ 272s] * @area: A single rectangular range to be copied. [ 272s] ^ [ 272s] application.c:218: Warning: Gnm: '@animate_range' parameter unexpected at this location: [ 272s] * @animate_range: Do we want ot add an animated cursor around things. [ 272s] ^ [ 272s] cell.c:136: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * gnm_cell_set_value: Stores (WITHOUT COPYING) the supplied value. It marks the [ 272s] ^ [ 272s] cell.c:246: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * gnm_cell_set_expr: Stores and references the supplied expression [ 272s] ^ [ 272s] cell.c:365: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * gnm_cell_set_array: set an array expression for a range. [ 272s] ^ [ 272s] clipboard.c:246: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * paste_cell: Pastes a cell in the spreadsheet [ 272s] ^ [ 272s] colrow.c:760: Warning: Gnm: missing ':' at column 22: [ 272s] * rows_height_update [ 272s] ^ [ 272s] command-context-stderr.c:29: Warning: Gnm: 'Returns:' tag unexpected at this location: [ 272s] * Returns: (transfer full): the newly allocated #GOCmdContext. [ 272s] ^ [ 272s] commands.c:180: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * checks whether the cells are effectively locked [ 272s] ^ [ 272s] commands.c:214: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * checks whether the cells are effectively locked [ 272s] ^ [ 272s] commands.c:306: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * get_menu_label : Utility routine to get the descriptor associated [ 272s] ^ [ 272s] commands.c:325: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * undo_redo_menu_labels : Another utility to set the menus correctly. [ 272s] ^ [ 272s] commands.c:420: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * command_redo : Redo the last command that was undone. [ 272s] ^ [ 272s] commands.c:474: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * command_repeat : Repeat the last command (if possible) [ 272s] ^ [ 272s] commands.c:639: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * command_register_undo : An internal utility to tack a new command [ 272s] ^ [ 272s] commands.c:677: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * gnm_command_push_undo : An internal utility to tack a new command [ 272s] ^ [ 272s] consolidate.c:348: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * Same as retrieve_row_tree, but for cols [ 272s] ^ [ 272s] consolidate.c:458: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * This routine consolidates all the ranges in source into [ 272s] ^ [ 272s] consolidate.c:602: Warning: Gnm: missing ':' at column 15: [ 272s] * cb_col_tree [ 272s] ^ [ 272s] dependent.c:410: Warning: Gnm: missing ':' at column 23: [ 272s] * dependent_set_sheet [ 272s] ^ [ 272s] dependent.c:1777: Warning: Gnm: '@sheet' parameter unexpected at this location: [ 272s] * @sheet : The sheet. [ 272s] ^ [ 272s] dependent.c:1778: Warning: Gnm: '@range' parameter unexpected at this location: [ 272s] * @range : Optionally NULL range. [ 272s] ^ [ 272s] expr.c:562: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * gnm_expr_equal : Returns TRUE if the supplied expressions are exactly the [ 272s] ^ [ 272s] expr-name.c:412: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: [ 272s] * expr_name_handle_references : register or unregister a name with [ 272s] ^ [ 272s] Traceback (most recent call last): [ 272s] File "/usr/bin/g-ir-scanner", line 46, in <module> [ 272s] sys.exit(scanner_main(sys.argv)) [ 272s] File "/usr/lib64/gobject-introspection/giscanner/scannermain.py", line 416, in scanner_main [ 272s] blocks = ap.parse(ss.get_comments()) [ 272s] File "/usr/lib64/gobject-introspection/giscanner/annotationparser.py", line 541, in parse [ 272s] comment_block = self.parse_comment_block(comment) [ 272s] File "/usr/lib64/gobject-introspection/giscanner/annotationparser.py", line 578, in parse_comment_block [ 272s] return self._parse_comment_block(comment_lines, filename, lineno) [ 272s] File "/usr/lib64/gobject-introspection/giscanner/annotationparser.py", line 858, in _parse_comment_block [ 272s] if comment_block.comment: [ 272s] AttributeError: 'NoneType' object has no attribute 'comment' [ 272s] make[4]: *** [Gnm-1.12.gir] Error 1 [ 272s] make[4]: Leaving directory `/home/abuild/rpmbuild/BUILD/gnumeric-1.11.6/src' [ 272s] make[3]: *** [all-recursive] Error 1 [ 272s] make[3]: Leaving directory `/home/abuild/rpmbuild/BUILD/gnumeric-1.11.6/src' [ 272s] make[2]: *** [all] Error 2 [ 272s] make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/gnumeric-1.11.6/src' [ 272s] make[1]: *** [all-recursive] Error 1 [ 272s] make[1]: Leaving directory `/home/abuild/rpmbuild/BUILD/gnumeric-1.11.6' [ 272s] make: *** [all] Error 2 [ 272s] error: Bad exit status from /var/tmp/rpm-tmp.g8bADT (%build) [ 272s] [ 272s] [ 272s] RPM build errors: [ 272s] Bad exit status from /var/tmp/rpm-tmp.g8bADT (%build)
Created attachment 224475 [details] [review] Patch This should fix the warnings, hopefully, but I'm unable to reproduce them. Note that most of them are related to static functions that can't be introspected. Not sure it will fix the scanner failure, this looks like an introspection bug to me.
Jean, Thanks a lot for the patch. with this one applied, I get: GISCAN Gnm-1.12.gir In file included from <stdin>:52:0: /home/abuild/rpmbuild/BUILD/gnumeric-1.11.6/src/gnm-style-impl.h:40:2: warning: #warning TODO use GOFont [-Wcpp] cell.c:249: Warning: Gnm: ignoring unrecognized GTK-Doc comment block, identifier not found: * gnm_cell_set_expr: Stores and references the supplied expression ^ Traceback (most recent call last):
+ Trace 230858
sys.exit(scanner_main(sys.argv))
blocks = ap.parse(ss.get_comments())
comment_block = self.parse_comment_block(comment)
return self._parse_comment_block(comment_lines, filename, lineno)
if comment_block.comment:
make[4]: *** [Gnm-1.12.gir] Error 1 make[4]: Leaving directory `/home/abuild/rpmbuild/BUILD/gnumeric-1.11.6/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/abuild/rpmbuild/BUILD/gnumeric-1.11.6/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/gnumeric-1.11.6/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/abuild/rpmbuild/BUILD/gnumeric-1.11.6' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.7IW96v (%build) (This is all done with gobject-introspection 1.33.10)
Created attachment 224734 [details] [review] Updated patch Looks like gobject-introspection 1.33.10 is much less permissive than the 1.32.1 available on debian. Ths scanner probably fails on a bad gtk-doc comment, but it does not say which, so it is hard to fix. There are probably lots of issues to fix.
Comment on attachment 224734 [details] [review] Updated patch This probbaly does not fix it all.
Dominique, can you test again?
Sorry for the delay.. I must have missed the new patch. New test result: [ 76s] GISCAN Gnm-1.12.gir [ 77s] In file included from <stdin>:52:0: [ 77s] /home/abuild/rpmbuild/BUILD/gnumeric-1.11.6/src/gnm-style-impl.h:40:2: warning: #warning TODO use GOFont [-Wcpp] [ 84s] Traceback (most recent call last): [ 84s] File "/usr/bin/g-ir-scanner", line 46, in <module> [ 84s] sys.exit(scanner_main(sys.argv)) [ 84s] File "/usr/lib64/gobject-introspection/giscanner/scannermain.py", line 416, in scanner_main [ 84s] blocks = ap.parse(ss.get_comments()) [ 84s] File "/usr/lib64/gobject-introspection/giscanner/annotationparser.py", line 541, in parse [ 84s] comment_block = self.parse_comment_block(comment) [ 84s] File "/usr/lib64/gobject-introspection/giscanner/annotationparser.py", line 578, in parse_comment_block [ 84s] return self._parse_comment_block(comment_lines, filename, lineno) [ 84s] File "/usr/lib64/gobject-introspection/giscanner/annotationparser.py", line 858, in _parse_comment_block [ 84s] if comment_block.comment: [ 84s] AttributeError: 'NoneType' object has no attribute 'comment' [ 84s] make[4]: *** [Gnm-1.12.gir] Error 1
Looks like a gobject introspection bug. Nothing I can't do without a more recent gi version.
Created attachment 232364 [details] [review] proposed patch The attached patch for current gnumeric git head fixes most of the annotation warnings for me, and allows introspection support to be built using gobject-introspection-1.34.2
I'll take your word for it. Thanks. This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Hmm, that patch introduces new warnings.