kconfig-frontends fails to build with current gperf

Issue #1 resolved
Philipp Krause created an issue

The version of kconfig-frontends here does not build with current gperf (version 3.1 released 2017-01-05).

Upstream apparently tried to fix this, but even in the current 4.11.0.1 upstream release, the fix is incomplete. However, fixing the current 4.11.0.1 upstream release is just one line:

Change line 175 of hconf.c from

kconf_id_lookup (register const char *str, register unsigned int len)

to

kconf_id_lookup (register const char *str, register GPERF_LEN_TYPE len)

With this change, upstream should build fine both with gperf 3.1 and older versions.

Fixing the older version distributed here would need more effort.

Philipp

Comments (3)

  1. Nathan T

    cool, thx. found the file i had to patch w/ this comment, but this seemed to do it for me:

    changed hconf.c:163 to:

    kconf_id_lookup (register const char *str, register unsigned int len)
    
  2. Harald Gutsche

    I noticed that hconf.c is a generated file, so changing this doesn't make much sense. Instead it is better to change hconf.perf which is used to generate hconf.c.

    In my case I changed the type in line 12 to size_t:

    static const struct kconf_id *kconf_id_lookup(register const char *str, register size_t len);
    

    I guess this is dependent on the parser/lexer generators.

  3. Log in to comment