Created attachment 140908 [details] [review] patch to workaround gperf bug gperf 3.1 has a bug described here that makes the fontconfig build fail: https://stackoverflow.com/a/7900875/262458 attached is a patch for the makefile which strips blank lines from the .gperf file to workaround the bug.
What errors did you see from gperf 3.1?
The error is: "Empty input keyword is not allowed. To recognize an empty input keyword, your code should check for len == 0 before calling the gperf generated lookup function."
I can reproduce that error with the sample code on stackoverflow but I can't with ours. can you attach your fcobjshash.gperf which is problematic and you can reproduce this issue? I may rather suspect that different versions or different variants of sed/awk may introduces it.
Created attachment 140909 [details] fcobjshash.gperf generated on my system (msys2 64bit) Attached the fcobjshash.gperf file generated on my system which is msys2 64bit on windows 10.
$(GREP) '^[^#]' is supposed to drop the empty lines too but seems not on your system. what grep do you use?
I have: sed (GNU sed) 4.4 GNU Awk 4.2.1, API: 2.0 (GNU MPFR 4.0.1, GNU MP 6.1.2) grep (GNU grep) 3.1
Hmm, okay. weird though. does this work then? diff --git a/src/Makefile.am b/src/Makefile.am index 7a35575..7b414df 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -111,10 +111,10 @@ fcobjshash.gperf: Makefile stamp-fcobjshash.gperf stamp-fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h $(AM_V_GEN) $(CPP) -I$(top_srcdir) $(CPPFLAGS) $< | \ $(SED) 's/^ *//;s/ *, */,/' | \ - $(GREP) '^[^#]' | \ awk ' \ /CUT_OUT_BEGIN/ { no_write=1; next; }; \ /CUT_OUT_END/ { no_write=0; next; }; \ + /^$$/||/^#/ { next; }; \ { if (!no_write) print; next; }; \ ' - > $@.tmp && \ mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false )
Yup that works perfectly!
Fixed in git. thanks
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.