After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778857 - Building lua-factory breaks with gperf 3.1 iff builddir != srcdir
Building lua-factory breaks with gperf 3.1 iff builddir != srcdir
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
0.3.x
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2017-02-17 22:40 UTC by Jan Alexander Steffens (heftig)
Modified: 2017-02-22 21:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH 1/2] lua-factory: Remove bad prototype for html_entity_hash (920 bytes, patch)
2017-02-17 22:42 UTC, Jan Alexander Steffens (heftig)
none Details | Review
[PATCH 2/2] lua-factory: Remove generated htmlentity.c (28.20 KB, patch)
2017-02-17 22:42 UTC, Jan Alexander Steffens (heftig)
none Details | Review
[PATCH] lua-factory: Sanitize code generation (30.53 KB, patch)
2017-02-21 17:02 UTC, Jan Alexander Steffens (heftig)
committed Details | Review

Description Jan Alexander Steffens (heftig) 2017-02-17 22:40:56 UTC
(patches follow)
Comment 1 Jan Alexander Steffens (heftig) 2017-02-17 22:42:14 UTC
Created attachment 346111 [details] [review]
[PATCH 1/2] lua-factory: Remove bad prototype for html_entity_hash

gperf 3.1 changes the type of the len argument for the generated
function to size_t, causing a conflict.
Comment 2 Jan Alexander Steffens (heftig) 2017-02-17 22:42:55 UTC
Created attachment 346112 [details] [review]
[PATCH 2/2] lua-factory: Remove generated htmlentity.c

Now that gperf is required to build this plugin, the generated
htmlentity.c should be removed from the source. Otherwise, it
will be used iff builddir == srcdir.
Comment 3 Victor Toso 2017-02-21 08:02:15 UTC
Review of attachment 346111 [details] [review]:

3.1 is quite new but this does not show any issue with gperf 3.0.4, so it should be fine.
Comment 4 Victor Toso 2017-02-21 08:10:50 UTC
Review of attachment 346112 [details] [review]:

make distcheck is broken with the second patch

(...) lua-library/htmlentity.gperf:31:24: fatal error: htmlentity.h: No such file or directory
 #include "htmlentity.h"
                        ^
I agree with removing the htmlentity.c as it should be generated. I wonder if there was a reason to include it in the first place. I missed it at the time.

Btw, makes sense to add htmlentity.c to lua-factory/.gitignore in this patch too
Comment 5 Jan Alexander Steffens (heftig) 2017-02-21 17:02:48 UTC
Created attachment 346374 [details] [review]
[PATCH] lua-factory: Sanitize code generation

Now that gperf is required to build this plugin, the generated
htmlentity.c should be removed from the source. Otherwise, it
will be used iff builddir == srcdir.

Add some further adjustments to make sure out-of-tree builds don't
break.

gperf 3.1 changes the type of the len argument for the generated
function to size_t, causing a conflict. Replace the prototype with
pragmas to make GCC ignore -Werror=missing-prototypes.

Tested with "make distcheck" and meson, with gcc and clang.
Comment 6 Victor Toso 2017-02-22 08:05:22 UTC
Review of attachment 346374 [details] [review]:

Looks good, many thanks!
Comment 7 Victor Toso 2017-02-22 21:10:57 UTC
pushed as 3c61220469dbeb9b40d0a9866bf5aa8444b271f6