GNOME Bugzilla – Bug 778857
Building lua-factory breaks with gperf 3.1 iff builddir != srcdir
Last modified: 2017-02-22 21:10:57 UTC
(patches follow)
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.
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.
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.
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
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.
Review of attachment 346374 [details] [review]: Looks good, many thanks!
pushed as 3c61220469dbeb9b40d0a9866bf5aa8444b271f6