Summary: | [PATCH] workaround a gperf 3.1 bug | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Rafael Kitover <rkitover> |
Component: | library | Assignee: | fontconfig-bugs |
Status: | RESOLVED FIXED | QA Contact: | Behdad Esfahbod <freedesktop> |
Severity: | normal | ||
Priority: | medium | CC: | akira |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
patch to workaround gperf bug
fcobjshash.gperf generated on my system (msys2 64bit) |
Description
Rafael Kitover
2018-07-31 22:30:56 UTC
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.