ewxrjk/with-readline

Version 0.1.1 does not build on MacOS 10.8.4

Closed this issue · 3 comments

I installed Readline via homebrew, configure says:

(...)
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
(...)

but when I run make I get:

with-readline.c: In function ‘version’:
with-readline.c:59: error: ‘rl_gnu_readline_p’ undeclared (first use in this function)
with-readline.c:59: error: (Each undeclared identifier is reported only once
with-readline.c:59: error: for each function it appears in.)
with-readline.c: In function ‘resize’:
with-readline.c:139: warning: implicit declaration of function ‘rl_resize_terminal’
with-readline.c:139: warning: nested extern declaration of ‘rl_resize_terminal’
with-readline.c: In function ‘main’:
with-readline.c:377: warning: assignment discards qualifiers from pointer target type
with-readline.c:379: error: ‘rl_catch_signals’ undeclared (first use in this function)
with-readline.c:380: error: ‘rl_catch_sigwinch’ undeclared (first use in this function)
with-readline.c:429: warning: assignment from incompatible pointer type
with-readline.c:455: warning: implicit declaration of function ‘append_history’
with-readline.c:455: warning: nested extern declaration of ‘append_history’
with-readline.c:465: error: ‘rl_mark’ undeclared (first use in this function)
with-readline.c:466: warning: implicit declaration of function ‘rl_free_undo_list’
with-readline.c:466: warning: nested extern declaration of ‘rl_free_undo_list’
make[1]: *** [with-readline.o] Error 1
make: *** [all] Error 2

Looks like you need to install GNU Readline.

I thought so too, I tried installing it via Homebrew:

brew install readline
Warning: readline-6.2.4 already installed

I ended up with installing yafc via Homebrew, which installs readline as a requirement and also provides completion for sftp.

You probably need to point LDFLAGS to the right place then. The error quoted is exactly what you get if you try to link against an imitation Readline...