Mac RVM 1.9.2-p0 Install Error – readline.c 1292

January 23rd, 2011 by jason.nah

To those who may have had a similar error, this post is for you.

So your rvm is up to date. And now you have to roll with ruby 1.9.2.

In my previous post, I went through how I got around a ruby 1.8.7 install error. And that error had to do with readline.

Well, if you ran

rvm install 1.9.2

And go the following error:

ruby-1.9.2-p0 - #fetching
ruby-1.9.2-p0 - #downloading ruby-1.9.2-p0, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 8296k  100 8296k    0     0  23037      0  0:06:08  0:06:08 --:--:--  8643
ruby-1.9.2-p0 - #extracting ruby-1.9.2-p0 to /Users/jasonn/.rvm/src/ruby-1.9.2-p0
ruby-1.9.2-p0 - #extracted to /Users/jasonn/.rvm/src/ruby-1.9.2-p0
ruby-1.9.2-p0 - #configuring
ruby-1.9.2-p0 - #compiling
Error running 'make ', please read /Users/jasonn/.rvm/log/ruby-1.9.2-p0/make.log
There has been an error while running make. Halting the installation.

If you examine the make.log file, the last few lines may show the following:

compiling readline
gcc -I. -I../../.ext/include/x86_64-darwin10.5.0 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64 -fno-common -pipe  -o readline.o -c readline.c
readline.c: In function ‘username_completion_proc_call’:
readline.c:1292: error: ‘rl_username_completion_function’ undeclared (first use in this function)
readline.c:1292: error: (Each undeclared identifier is reported only once
readline.c:1292: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [mkmain.sh] Error 1

Fortunately, this is exactly the same problem as before. All you need to do is tell the compiler where the readline library is. If you setup is similar to what I indicated in my previous post, then all you have to do to install 1.9.2 is:

rvm install 1.9.2 -C --with-readline-dir=/usr/local
  • Twitter
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Posterous
  • DZone
  • Technorati
  • LinkedIn
  • Facebook
  • email
  • RSS

One Response to “Mac RVM 1.9.2-p0 Install Error – readline.c 1292”

  1. hugo villero says:

    Thank you very much for that tip :)

Leave a Reply