jer successfully answered Rich Collins's question:

When attempting to make rlwrap, I get the following error:

gcc -DDATADIR=\"/usr/local/share\" -g -O2 -o rlwrap main.o signals.o utils.o readline.o pty.o completion.o term.o ptytty.o -lreadline -lcurses
/usr/bin/ld: Undefined symbols:
_rl_pending_input
_rl_set_screen_size
_rl_catch_sigwinch
_rl_delete_text
_rl_expand_prompt
_rl_forced_update_display
_rl_insert_close
_rl_insert_text
_rl_filename_completion_function
collect2: ld returned 1 exit status

Can someone please help me debug this?

People succeed in answering Rich Collins's questions 37% of the time (32 successes in 86 attempts).

Answers by: jer

jer's Answer:

Chat Conversation 808 days ago

hello? jer at 12:18 AM on Wednesday June 14th, 2006
First you need to build and install GNU readline (5.1 is the latest). It defaults to install to /usr/local/lib. jer at 12:30 AM on Wednesday June 14th, 2006
Then you need to cd to your rlwrap directory, and run the configure script such as: LDFLAGS="-L/usr/local/lib" ./configure jer at 12:31 AM on Wednesday June 14th, 2006
that should automatically add -L/usr/local/lib to your Makefile jer at 12:31 AM on Wednesday June 14th, 2006
Then you run make like this: make LIBS="/usr/local/lib/libreadline.dylib -lcurses" jer at 12:34 AM on Wednesday June 14th, 2006
You will get a few warnings but those are nothing to worry about. After that you can make install, and run rlwrap <whatever>. You will now have a functioning rlwrap jer at 12:35 AM on Wednesday June 14th, 2006
The problem comes into play that OSX's libreadline.dylib is actually just pointing at libedit (a BSD licenced replacement for readline) which doesn't support all the features rlwrap wants. jer at 12:35 AM on Wednesday June 14th, 2006
Worked perfectly, thanks Rich Collins at 11:45 AM on Wednesday June 14th, 2006