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 731294 - Fails to build with newer libreadline
Fails to build with newer libreadline
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nmcli
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-06-05 20:41 UTC by Christoph Reiter (lazka)
Modified: 2014-06-06 09:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christoph Reiter (lazka) 2014-06-05 20:41:16 UTC
CPPFunction and CPFunction are no longer defined it seems. I'm building on debain sid with jhbuild.


 CC       connections.o
connections.c: In function ‘nmcli_con_add_tab_completion’:
connections.c:5133:2: error: unknown type name ‘CPFunction’
  CPFunction *generator_func = NULL;
  ^
connections.c:5145:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_connection_types;
                  ^
connections.c:5147:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_func_vpn_types;
                  ^
connections.c:5151:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_func_master_ifnames;
                  ^
connections.c:5156:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_func_bool_values_l10n;
                  ^
connections.c:5158:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_func_ib_type;
                  ^
connections.c:5160:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_func_bt_type;
                  ^
connections.c:5162:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_func_bond_mode;
                  ^
connections.c:5164:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_func_bond_mon_mode;
                  ^
connections.c:5167:3: warning: passing argument 2 of ‘rl_completion_matches’ from incompatible pointer type [enabled by default]
   match_array = rl_completion_matches (text, generator_func);
   ^
In file included from connections.c:33:0:
/usr/include/readline/readline.h:457:15: note: expected ‘char * (*)(const char *, int)’ but argument is of type ‘int *’
 extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *));
               ^
connections.c: In function ‘do_connection_add’:
connections.c:5199:38: error: ‘CPPFunction’ undeclared (first use in this function)
  rl_attempted_completion_function = (CPPFunction *) nmcli_con_add_tab_completion;
                                      ^
connections.c:5199:38: note: each undeclared identifier is reported only once for each function it appears in
connections.c:5199:51: error: expected expression before ‘)’ token
  rl_attempted_completion_function = (CPPFunction *) nmcli_con_add_tab_completion;
                                                   ^
connections.c: In function ‘nmcli_editor_tab_completion’:
connections.c:5795:2: error: unknown type name ‘CPFunction’
  CPFunction *generator_func = NULL;
  ^
connections.c:5835:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_connection_types;
                  ^
connections.c:5837:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_setting_names;
                  ^
connections.c:5839:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_property_names;
                  ^
connections.c:5842:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_func_bool_values_l10n;
                  ^
connections.c:5850:20: warning: assignment from incompatible pointer type [enabled by default]
     generator_func = gen_nmcli_cmds_menu;
                    ^
connections.c:5854:22: warning: assignment from incompatible pointer type [enabled by default]
       generator_func = gen_setting_names;
                      ^
connections.c:5856:22: warning: assignment from incompatible pointer type [enabled by default]
       generator_func = gen_property_names;
                      ^
connections.c:5860:23: warning: assignment from incompatible pointer type [enabled by default]
        generator_func = gen_setting_names;
                       ^
connections.c:5863:23: warning: assignment from incompatible pointer type [enabled by default]
        generator_func = gen_property_names;
                       ^
connections.c:5869:23: warning: assignment from incompatible pointer type [enabled by default]
        generator_func = gen_vpn_uuids;
                       ^
connections.c:5876:22: warning: assignment from incompatible pointer type [enabled by default]
       generator_func = gen_setting_names;
                      ^
connections.c:5879:22: warning: assignment from incompatible pointer type [enabled by default]
       generator_func = gen_property_names;
                      ^
connections.c:5882:22: warning: assignment from incompatible pointer type [enabled by default]
       generator_func = gen_cmd_nmcli;
                      ^
connections.c:5884:22: warning: assignment from incompatible pointer type [enabled by default]
       generator_func = get_gen_func_cmd_nmcli (word);
                      ^
connections.c:5888:22: warning: assignment from incompatible pointer type [enabled by default]
       generator_func = gen_cmd_verify0;
                      ^
connections.c:5890:21: warning: assignment from incompatible pointer type [enabled by default]
      generator_func = gen_compat_devices;
                     ^
connections.c:5892:21: warning: assignment from incompatible pointer type [enabled by default]
      generator_func = gen_cmd_save;
                     ^
connections.c:5894:21: warning: assignment from incompatible pointer type [enabled by default]
      generator_func = gen_nmcli_cmds_menu;
                     ^
connections.c:5899:20: warning: assignment from incompatible pointer type [enabled by default]
     generator_func = gen_nmcli_cmds_submenu;
                    ^
connections.c:5907:22: warning: assignment from incompatible pointer type [enabled by default]
       generator_func = gen_vpn_uuids;
                      ^
connections.c:5911:21: warning: assignment from incompatible pointer type [enabled by default]
      generator_func = gen_cmd_print2;
                     ^
connections.c:5913:21: warning: assignment from incompatible pointer type [enabled by default]
      generator_func = gen_nmcli_cmds_submenu;
                     ^
connections.c:5919:3: warning: passing argument 2 of ‘rl_completion_matches’ from incompatible pointer type [enabled by default]
   match_array = rl_completion_matches (text, generator_func);
   ^
In file included from connections.c:33:0:
/usr/include/readline/readline.h:457:15: note: expected ‘char * (*)(const char *, int)’ but argument is of type ‘int *’
 extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *));
               ^
connections.c: In function ‘do_connection_edit’:
connections.c:7808:38: error: ‘CPPFunction’ undeclared (first use in this function)
  rl_attempted_completion_function = (CPPFunction *) nmcli_editor_tab_completion;
                                      ^
connections.c:7808:51: error: expected expression before ‘)’ token
  rl_attempted_completion_function = (CPPFunction *) nmcli_editor_tab_completion;
                                                   ^
connections.c: In function ‘nmcli_con_tab_completion’:
connections.c:8414:2: error: unknown type name ‘CPFunction’
  CPFunction *generator_func = NULL;
  ^
connections.c:8426:18: warning: assignment from incompatible pointer type [enabled by default]
   generator_func = gen_func_connection_names;
                  ^
connections.c:8429:3: warning: passing argument 2 of ‘rl_completion_matches’ from incompatible pointer type [enabled by default]
   match_array = rl_completion_matches (text, generator_func);
   ^
In file included from connections.c:33:0:
/usr/include/readline/readline.h:457:15: note: expected ‘char * (*)(const char *, int)’ but argument is of type ‘int *’
 extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *));
               ^
connections.c: In function ‘parse_cmd’:
connections.c:8439:38: error: ‘CPPFunction’ undeclared (first use in this function)
  rl_attempted_completion_function = (CPPFunction *) nmcli_con_tab_completion;
                                      ^
connections.c:8439:51: error: expected expression before ‘)’ token
  rl_attempted_completion_function = (CPPFunction *) nmcli_con_tab_completion;
                                                   ^
Makefile:575: recipe for target 'connections.o' failed
Comment 1 Christoph Reiter (lazka) 2014-06-05 20:51:20 UTC
I'm using readline 6.3: https://packages.debian.org/sid/libreadline6
Comment 2 Christoph Reiter (lazka) 2014-06-05 20:54:13 UTC
See the diff here where the typedefs got removed: http://upstream-tracker.org/diffs/readline/6.2_to_6.3/diff.html
Comment 3 Jiri Klimes 2014-06-06 09:40:41 UTC
Thanks for pointing it out.

Related links:
http://lists.gnu.org/archive/html/bug-readline/2014-04/msg00018.html
http://lists.gnu.org/archive/html/bug-bash/2000-10/msg00078.html
http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC26


Fixed in master:
dae8391 cli: switch to the new-style readline typedefs (bgo #731294)