installation with readline on mac os x lion

1,033 views
Skip to first unread message

Mark Ryall

unread,
Aug 20, 2011, 12:47:36 AM8/20/11
to rubyversi...@googlegroups.com
When I try to install using the readline package on mac os x lion using the instructions at http://beginrescueend.com/packages/readline I get the attached make error during compilation (ie. 'rvm install 1.9.2 --with-readline-dir=$rvm_path/usr').

I do not get this error if I just 'rvm install 1.9.2'

I'm also using zsh in case that might be a contributing factor.

I doubt many people would use this approach but it seems that if I use whatever is the default readline on mac os x (edline?), Readline.completer_word_break_characters = '' has no effect.  I have a few command line gems thatact as shells with tab completion on entire strings rather than just white space delimited tokens (this is arguably a strange thing to want).

Any tips?
make.log

Mark Ryall

unread,
Aug 20, 2011, 1:00:24 AM8/20/11
to rubyversi...@googlegroups.com
Sorry - I posted prematurely.  I found the solution here and was successful using the readline i'd installed with brew:

rvm install 1.9.2 -C --with-readline-dir=/usr/local/Cellar/readline/6.2.1

It still seems that the instructions regarding rvm and readline might not quite work correctly on lion.

Deryl R. Doucette

unread,
Aug 20, 2011, 5:39:12 PM8/20/11
to rubyversi...@googlegroups.com
The reason for the failure is because you did not use RVM to install readline, you used Homebrew. The instructions there are for using readline from RVM

rvm pkg install readline

I will modify the docs to reflect this.

Deryl R. Doucette

unread,
Aug 20, 2011, 5:40:40 PM8/20/11
to rubyversi...@googlegroups.com
Actually, the docs reflect this fact. They just point solely to MacPorts and did not reference Homebrew as well. I'll make the change in the docs.

From the page:

"Note that this error occurs most often when having a macports installed readline on your system."


Deryl R. Doucette

unread,
Aug 20, 2011, 6:19:10 PM8/20/11
to rubyversi...@googlegroups.com
OK, docs have been updated. Thanks Mark, you were credited on the git commit for this. :-)

Wayne E. Seguin

unread,
Aug 20, 2011, 7:13:29 PM8/20/11
to rubyversi...@googlegroups.com
One minor note on this, for --with* --enable* --disable* configure flags the -C is unnecessary so that could have been:

rvm install 1.9.2 --with-readline-dir=………..


On Sat, Aug 20, 2011 at 1:00 AM, Mark Ryall <mark....@gmail.com> wrote:
rvm install 1.9.2 -C --with-readline-dir=/usr/local/Cellar/readline/6.2.1
 

Mark Ryall

unread,
Aug 21, 2011, 12:30:47 AM8/21/11
to rubyversi...@googlegroups.com
Thanks for the responses but I might have not made myself clear.

The compile error happened only when I did follow the original rvm readline instructions (ie. when I did use the rvm readline package - 'rvm pkg install readline && rvm install 1.9.2 --with-readline-dir=$rvm_path/usr').

I'd previously followed the rvm readline instructions many times on snow leopard and so assumed that the problem is new to lion.

There was no compilation error if I just 'rvm install 1.9.2' but the version of readline that gets used on mac os x in this case doesn't behave as i'd like it to (ie. I want to configure tab completion to ignore whitespace and complete entire strings rather than whitespace delimited words).

My solution was to specify the version of readline that was installed by brew instead of trying to use the readline rvm package (ie. 'rvm install 1.9.2 --with-readline-dir=/usr/local/Cellar/readline/6.2.1').  I notice that you've added those instructions but I think my problem was unrelated to the readline that was installed by brew.

Thanks for the awesome work.  rvm certainly makes my life much easier.


--
Please visit http://rvm.beginrescueend.com/ for documentation on rvm.
Please visit https://www.pivotaltracker.com/projects/26822 to see what is being worked on currently.
 
You received this message because you are subscribed to the Google
Groups "rvm (Ruby Version Manager)" group.
To post to this group, send email to rubyversi...@googlegroups.com
To unsubscribe from this group, send email to
rubyversionmana...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyversionmanager?hl=en

Deryl R. Doucette

unread,
Aug 21, 2011, 8:23:33 PM8/21/11
to rubyversi...@googlegroups.com
Glad its working. We will consider this issue closed then. :-)

John T

unread,
Aug 22, 2011, 8:59:21 AM8/22/11
to rubyversi...@googlegroups.com
I don't know if it's "working"... I had a very hard time getting Ruby 1.9.2-p290 installed on Lion. I installed readline via rvm, but it would still fail (there is a whole thread about this).

It ended up being an issue with the install / build of readline. RVM installs both 5.2 and 6.0 of readline. There is a patch file that is applied, for 5.2 ONLY that does not take Lion / Darwin 11 into account, so the patch fails, and the build of readline (silently) fails - even though it says readline was successfully installed - it wasn't. I hand edited the scripts/pkg file (I believe that's it) to take Darwin 11 into account. That let readline 5.2 compile and subsequently ruby to install. Readline 6.0 did not compile (it also silently fails), but there is not patch for readline 6, so there was nothing to hack and fix.

I was going to try and submit a fix, but got lost on the whole git - patch, stuff...

John T

unread,
Aug 31, 2011, 10:45:43 PM8/31/11
to rubyversi...@googlegroups.com
Well a fix has been submitted and seems to work to compile readline and install RVM on Lion.

This patch:


is the fix.

Hopefully the devs will add it for an upcoming update.

Deryl R. Doucette

unread,
Sep 1, 2011, 9:15:52 AM9/1/11
to rubyversi...@googlegroups.com
I tried it here myself and it works correctly. I'm merging. Should it present an issue, Wayne will back it out.

Stewart

unread,
Sep 14, 2011, 5:05:59 AM9/14/11
to rvm (Ruby Version Manager)
Did this patch make it in to 1.8.3 of RVM? I updated today and still
have this issue on Lion.

John T

unread,
Sep 14, 2011, 8:42:26 AM9/14/11
to rubyversi...@googlegroups.com
I thought I saw that it did... could be wrong though...

Stewart

unread,
Sep 14, 2011, 5:45:18 PM9/14/11
to rvm (Ruby Version Manager)
Hey John,

Thanks for the quick response. Is there anyway I can apply your patch
to my working version? Would it just be worth compiling readline
myself?

John T

unread,
Sep 15, 2011, 9:45:12 AM9/15/11
to rubyversi...@googlegroups.com
These were the instructions that was sent to me:

I provided a fix for building readline 6.2 on Lion using RVM.  It uses
a well thought out patch from the MacPorts guys.


I submitted a pull request to the RVM developers, so hopefully it gets
incorporated into the official source soon.  Could you also give it a
test run?

1. revert to sytem ruby `rvm use system`
2. backup your original ~/.rvm directory (ie rename it to "~/.rvm-
original")
4. unzip, cd, and run `./install`
5. restart terminal
6. the usual `rvm pkg install readline` followed by `rvm install 1.9.2
--with-readline-dir=$rvm_path/usr` should now work :)

To get back to your original installation just replace ~/.rvm with
~/.rvm-original.  No need to mess with your .bash_profile again.

Let me know how it goes,

Michael

John T

unread,
Sep 15, 2011, 9:46:57 AM9/15/11
to rubyversi...@googlegroups.com
I do remember looking at the git repository of RVM recently, to see if these patches were in there, as I do believe it was all there. You may just have to remove Ruby and Readline (rvm remove 1.9.2 and rvm pkg uninstall readline [or something like that] ) and reinstall.

Stewart Matheson

unread,
Sep 15, 2011, 9:07:45 PM9/15/11
to rubyversi...@googlegroups.com
I updated rvm and then installed the readline package yesterday and was still getting the error. I ended up compiling readline my self and now it works. I am writing a blog post on it.

On Thu, Sep 15, 2011 at 11:46 PM, John T <john...@gmail.com> wrote:
I do remember looking at the git repository of RVM recently, to see if these patches were in there, as I do believe it was all there. You may just have to remove Ruby and Readline (rvm remove 1.9.2 and rvm pkg uninstall readline [or something like that] ) and reinstall.

--

Stewart

unread,
Sep 21, 2011, 10:36:10 PM9/21/11
to rvm (Ruby Version Manager)
I ended up posting a fix for this issue. See
http://rtmatheson.com/2011/09/installing-ruby-1-9-2-on-mac-os-x-10-7-lion/
for the fix. However as there is already a patch in the works I would
suggest this issue will be fixed soon.

On Sep 15, 9:07 pm, Stewart Matheson <stewart.mathe...@gmail.com>
wrote:
> I updated rvm and then installed the readline package yesterday and was
> still getting the error. I ended up compiling readline my self and now it
> works. I am writing a blog post on it.
>
>
>
>
>
>
>
> On Thu, Sep 15, 2011 at 11:46 PM, John T <johnt...@gmail.com> wrote:
> > I do remember looking at the git repository of RVM recently, to see if
> > these patches were in there, as I do believe it was all there. You may just
> > have to remove Ruby and Readline (rvm remove 1.9.2 and rvm pkg uninstall
> > readline [or something like that] ) and reinstall.
>
> > --
> > Please visithttp://rvm.beginrescueend.com/for documentation on rvm.
> > Please visithttps://www.pivotaltracker.com/projects/26822to see what is

John T

unread,
Sep 22, 2011, 11:19:35 AM9/22/11
to rubyversi...@googlegroups.com
As far as I know from looking at the RVM sources at GitHub, the fix is already in the latest versions. I could be wrong...
Reply all
Reply to author
Forward
0 new messages