From: Joseph Pecoraro Date: 2008-01-28T12:11:21+09:00 Subject: Re: I Get A Ruby Trunk Make Error On Readline Maybe I should have posted this in Ruby Core. Also it may be the same as this bug: http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=1883 Also I just found this in Google Groups (I don't know how I missed it in the first place, its actually embarrassing that I missed this cause now you guys will think I didn't research this) and sure enough this has the solution: http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/b35a326bf65f8aa5 I'll layout the steps here to solve this problem to build Ruby 1.9 on Mac OS X Leopard 10.5.1 FIRST: Install the newest readline (version 5.2) and use Han Kessels' solution to correct a Leopard bug with gcc . So here is what you need to do: 1) download readline from somewhere like here: http://www.icewalkers.com/Linux/Software/515340/readline.html 2) Make Han Kessels' changes to support/shobj-conf (in the download you just did). Here was his words: Building readline5.2 on Leopard is broken. It checks for the OS explicitly, but this check does not exclude darwin9 (Leopard). It is easily fixed though, by patching support/shobj-conf: --- support/shobj-conf 2007-12-26 18:30:46.000000000 +0900 +++ support/shobj-conf.new 2007-12-26 18:30:39.000000000 +0900 @@ -142,7 +142,7 @@ ;; # Darwin/MacOS X -darwin8*) +darwin89*) SHOBJ_STATUS=supported SHLIB_STATUS=supported @@ -171,7 +171,7 @@ SHLIB_LIBSUFF='dylib' case "${host_os}" in - darwin[78]*) SHOBJ_LDFLAGS='' + darwin[789]*) SHOBJ_LDFLAGS='' SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` - install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$ (SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' ;; *) SHOBJ_LDFLAGS='-dynamic' Cheers, Han 3) Now because of the gcc bug (Noticed by Sean at http://www.weblogs.uhi.ac.uk/sm00sm/?p=291) you must do a "make static" and "make static-install". If you already tried just "make" then you can do "make clean" and start over with make static. If make static-install doesn't work then just "make install" should be fine. SECOND: Once you have the new readline installed you can make Ruby 1.9. This still requires you to give some hints to the configure. Here is what you need to do now: 1) Go into the ruby directory [see first post if you want to know how to get here from checking out the trunk]. If you already tryed a make clean things up with "make clean" 2) Use the following configure command: [Thanks to Hans for this] ./configure --prefix=/usr/local --with-readline-dir=/usr/local Now --prefix=/usr/local is the normal installation destination. The only trick here is that you're telling configure where the readline-dir is. It will be using your newly built readline. 3) Once configure ends you can just do "make" and "sudo make install" ------------- I really hope this helps someone out if they want to install Ruby 1.9. If you have any questions about any of this you can post a reply, I have email notifications so I'll get notified, and I'll see what I can do to help. Thanks, Joseph Pecoraro -- Posted via http://www.ruby-forum.com/.