gitsh: readline problems

rl_completion_suppress_quote is (erroneously?) not found. No matter what I point ./configure at, it never finds rl_completion_suppress_quote, introduced in readline 5 (https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES). I’ve hand-verified that the readline that it’s pointing at has this variable. if i comment out the readline.require_func checks, configure succeeds, but make does indeed break.

if i download readline and build it and point gitsh at it, it fails

➔ CPPFLAGS="-I/Users/john/tmp/build/usr/local/include/readline/" LDFLAGS="-L/Users/john/tmp/build/usr/local/lib/" ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ruby... /usr/bin/ruby
checking for ruby... (cached) /usr/bin/ruby
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for ruby version... ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... no
extconf.rb:51:in `<main>': readline not found (RuntimeError)
configure: error: Failed to configure Ruby extension

i can’t use --with-readline-dir

configure: WARNING: unrecognized options: --with-readline-dir

even though the error output of ./configure says i can…

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
	--with-curses-dir
	--without-curses-dir
	--with-curses-include
	--without-curses-include=${curses-dir}/include
	--with-curses-lib
	--without-curses-lib=${curses-dir}/
	--with-ncurses-dir
	--without-ncurses-dir
	--with-ncurses-include
	--without-ncurses-include=${ncurses-dir}/include
	--with-ncurses-lib
	--without-ncurses-lib=${ncurses-dir}/
	--with-termcap-dir
	--without-termcap-dir
	--with-termcap-include
	--without-termcap-include=${termcap-dir}/include
	--with-termcap-lib
	--without-termcap-lib=${termcap-dir}/
	--with-readline-dir
	--without-readline-dir
	--with-readline-include
	--without-readline-include=${readline-dir}/include
	--with-readline-lib
	--without-readline-lib=${readline-dir}/
	--with-ncurseslib
	--without-ncurseslib
	--with-readlinelib
	--without-readlinelib

please advise. thanks!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

Given that

  • it is possible to install from source on macOS,
  • I’ve written down how to make that work,
  • we recommend installing via Homebrew, and
  • I’ve opened #284 to fix the more complex OpenBSD case,

I’m going to close this. Please re-open if you have further problems.

@joesasson updated, thanks!

@jjb @jakeboxer I just had an identical error when trying to install with homebrew. The steps in the gist fixed it, but it only works if you run the commands from inside a cloned repo of the project.

So I would just add to the beginning of the gist:

git clone git@github.com:thoughtbot/gitsh.git
cd gitsh
.
.
.

I’m not sure if this was obvious, just putting it our there, because at first I was just trying to run the commands from a random directory.

Thanks for the gist @jjb!

@jjb appreciate it! This is a work computer and I want to avoid tacking on things like MacPorts and other versions of Ruby, so for now I think I’ll hold off for a fix, but I’ll probably use that on my personal computer. Thanks!