poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU poke 2.90.0 on macOS


From: Bruno Haible
Subject: Re: GNU poke 2.90.0 on macOS
Date: Mon, 23 Jan 2023 01:49:38 +0100

On macOS 12.5, the build fails with a compilation error:

cc -DHAVE_CONFIG_H -I. -I../../poke  -I../gl -I../../gl -I../../common 
-I../../libpoke -I../libpoke -DJITTER_VERSION=\"0.9.291\" 
-DPKGDATADIR=\"/Users/haible/share/poke\" 
-DPKGINFODIR=\"/Users/haible/share/info\" 
-DLOCALEDIR=\"/Users/haible/share/locale\" -I/Users/haible/include -Wall -Wall 
-g -O2 -MT poke-pk-repl.o -MD -MP -MF .deps/poke-pk-repl.Tpo -c -o 
poke-pk-repl.o `test -f 'pk-repl.c' || echo '../../poke/'`pk-repl.c
../../poke/pk-repl.c:143:38: warning: incompatible function pointer types 
assigning to 'Function *' (aka 'int (*)(const char *, int)') from 'const 
completer_t' (aka 'char *(*const)(const char *, int)') 
[-Wincompatible-function-pointer-types]
        rl_completion_entry_function = cmd->completer;
                                     ^ ~~~~~~~~~~~~~~
../../poke/pk-repl.c:145:38: warning: incompatible function pointer types 
assigning to 'Function *' (aka 'int (*)(const char *, int)') from 'char *(const 
char *, int)' [-Wincompatible-function-pointer-types]
        rl_completion_entry_function = null_completion_function;
                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~
../../poke/pk-repl.c:148:34: warning: incompatible function pointer types 
assigning to 'Function *' (aka 'int (*)(const char *, int)') from 'char *(const 
char *, int)' [-Wincompatible-function-pointer-types]
    rl_completion_entry_function = poke_completion_function;
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~
../../poke/pk-repl.c:150:12: error: implicit declaration of function 'rl_getc' 
is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  int c =  rl_getc (stream);
           ^
../../poke/pk-repl.c:156:36: warning: comparison of distinct pointer types 
('Function *' (aka 'int (*)(const char *, int)') and 'char *(*)(const char *, 
int)') [-Wcompare-distinct-pointer-types]
  if (rl_completion_entry_function == doc_completion_function)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
../../poke/pk-repl.c:158:42: warning: incompatible function pointer types 
assigning to 'VFunction *' (aka 'void (*)(void)') from 'void (char **, int, 
int)' [-Wincompatible-function-pointer-types]
      rl_completion_display_matches_hook = space_substitute_display_matches;
                                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../poke/pk-repl.c:239:46: error: use of undeclared identifier 'rl_mark'
          rl_line_buffer[rl_point = rl_end = rl_mark = 0] = 0;
                                             ^
../../poke/pk-repl.c:367:3: error: use of undeclared identifier 
'rl_filename_quote_characters'; did you mean 'rl_completer_quote_characters'?
  rl_filename_quote_characters = " ";
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  rl_completer_quote_characters
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/readline/history.h:110:15:
 note: 'rl_completer_quote_characters' declared here
extern char             *rl_completer_quote_characters;
                         ^
../../poke/pk-repl.c:368:3: error: use of undeclared identifier 
'rl_filename_quoting_function'
  rl_filename_quoting_function = escape_metacharacters;
  ^
../../poke/pk-repl.c:380:36: warning: incompatible function pointer types 
assigning to 'Function *' (aka 'int (*)(const char *, int)') from 'char *(const 
char *, int)' [-Wincompatible-function-pointer-types]
      rl_completion_entry_function = poke_completion_function;
                                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~
../../poke/pk-repl.c:391:40: warning: comparison of distinct pointer types 
('Function *' (aka 'int (*)(const char *, int)') and 'char *(*)(const char *, 
int)') [-Wcompare-distinct-pointer-types]
      if (rl_completion_entry_function == doc_completion_function)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
../../poke/pk-repl.c:434:3: error: implicit declaration of function 
'rl_save_prompt' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  rl_save_prompt ();
  ^
../../poke/pk-repl.c:434:3: note: did you mean 'rl_set_prompt'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/readline/history.h:204:7:
 note: 'rl_set_prompt' declared here
int              rl_set_prompt(const char *);
                 ^
../../poke/pk-repl.c:435:3: error: implicit declaration of function 
'rl_clear_message' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  rl_clear_message ();
  ^
../../poke/pk-repl.c:444:3: error: implicit declaration of function 
'rl_restore_prompt' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  rl_restore_prompt ();
  ^
../../poke/pk-repl.c:444:3: note: did you mean 'rl_set_prompt'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/readline/history.h:204:7:
 note: 'rl_set_prompt' declared here
int              rl_set_prompt(const char *);
                 ^
7 warnings and 7 errors generated.
make[2]: *** [poke-pk-repl.o] Error 1

The reason is that
  - I haven't installed GNU readline so far,
  - Thus the build uses /usr/include/readline/readline.h.
  - But this is a symlink to /usr/include/editline/readline.h
    and this file does not declare the functions rl_getc, rl_mark,
    rl_filename_quote_characters, rl_filename_quoting_function, rl_save_prompt,
    rl_clear_message, rl_restore_prompt.

Please apply the attached patch.

After installing a proper GNU readline, the build completes fine.

Bruno

Attachment: 0001-A-dependency-clarification.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]