# Trouble with Readline and Building Ruby 1.9

**URL:** <https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267>\
**Category:** ruby-talk\
**Created:** [24 December 2007 19:57 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267 "2007-12-24T19:57:28Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_H](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@James\_H](https://rubytalk.org/u/James_H)\
**Post date:** [24 December 2007 19:57 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/1 "2007-12-24T19:57:28Z")

</div>

I'm having a little trouble building Ruby 1.9. I'm building on  
Leopard and using "--prefix=/usr/local/ruby1.9" when running config,  
but I'm getting the following output after running 'make':

gcc -I. -I../../.ext/include/i686-darwin9.1.0 -I../.././include  
-I../.././ext/readline -DRUBY\_EXTCONF\_H=\"extconf.h\" -fno-common  
-g -O2 -pipe -fno-common -o readline.o -c readline.c  
readline.c: In function 'filename\_completion\_proc\_call':  
readline.c:659: error: 'filename\_completion\_function' undeclared  
(first use in this function)  
readline.c:659: error: (Each undeclared identifier is reported only once  
readline.c:659: error: for each function it appears in.)  
readline.c:659: warning: assignment makes pointer from integer without a cast  
readline.c: In function 'username\_completion\_proc\_call':  
readline.c:684: error: 'username\_completion\_function' undeclared  
(first use in this function)  
readline.c:684: warning: assignment makes pointer from integer without a cast  
make[1]: \*\*\* [readline.o] Error 1  
make: \*\*\* [all] Error 1

Any ideas on what's wrong?

James H.

---

<div class="post-metadata">

**Author:** ![Gerald\_Murray](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@Gerald\_Murray](https://rubytalk.org/u/Gerald_Murray)\
**Post date:** [24 December 2007 23:39 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/2 "2007-12-24T23:39:58Z")

</div>

grep for the functions showed they were declared in /usr/include/  
readline/readline.h (32-bit readline)  
find readline.h in your computer and check for its declaration there.  
If you are using packages you may need the \*-dev for readline.  
The includes in the above look peculiar: "/.ext" and "-I../.././  
include" may be typo or an indication that the includes are just  
wrong ?

Gerald

> **···**
>
> On Dec 24, 1:57 pm, James Herdman \<james.herd...@gmail.com\> wrote:
> 
> > gcc -I. -I../../.ext/include/i686-darwin9.1.0 -I../.././include  
> > -I../.././ext/readline -DRUBY\_EXTCONF\_H=\"extconf.h\" -fno-common

---

<div class="post-metadata">

**Author:** ![Han\_Kessels](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@Han\_Kessels](https://rubytalk.org/u/Han_Kessels)\
**Post date:** [25 December 2007 04:00 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/3 "2007-12-25T04:00:02Z")

</div>

Install the latest readline (5.2) in /usr/local and rerun ./configure:  
./configure --prefix=/usr/local --with-readline-dir=/usr/local

Cheers,

Han

> **···**
>
> On Dec 25, 4:57 am, James Herdman \<james.herd...@gmail.com\> wrote:
> 
> > I'm having a little trouble building Ruby 1.9. I'm building on  
> > Leopard and using "--prefix=/usr/local/ruby1.9" when running config,  
> > but I'm getting the following output after running 'make':
> > 
> > gcc -I. -I../../.ext/include/i686-darwin9.1.0 -I../.././include  
> > -I../.././ext/readline -DRUBY\_EXTCONF\_H=\"extconf.h\" -fno-common  
> > -g -O2 -pipe -fno-common -o readline.o -c readline.c  
> > readline.c: In function 'filename\_completion\_proc\_call':  
> > readline.c:659: error: 'filename\_completion\_function' undeclared  
> > (first use in this function)  
> > readline.c:659: error: (Each undeclared identifier is reported only once  
> > readline.c:659: error: for each function it appears in.)  
> > readline.c:659: warning: assignment makes pointer from integer without a cast  
> > readline.c: In function 'username\_completion\_proc\_call':  
> > readline.c:684: error: 'username\_completion\_function' undeclared  
> > (first use in this function)  
> > readline.c:684: warning: assignment makes pointer from integer without a cast  
> > make[1]: \*\*\* [readline.o] Error 1  
> > make: \*\*\* [all] Error 1
> > 
> > Any ideas on what's wrong?
> > 
> > James H.

---

<div class="post-metadata">

**Author:** ![yudi](https://avatars.discourse-cdn.com/v4/letter/y/34f0e0/32.png) [@yudi](https://rubytalk.org/u/yudi)\
**Post date:** [26 December 2007 07:01 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/4 "2007-12-26T07:01:33Z")

</div>

I had exactly the same problem.installing readline with ./configure  
--prefix=/usr/local --with-readline-dir=/usr/local  
shows a incompatibility with dynamic library, then I followed here:  
[http://www.weblogs.uhi.ac.uk/sm00sm/?p=291](http://www.weblogs.uhi.ac.uk/sm00sm/?p=291)

with make static and sudo make static-install

With readline 'properly' installed, the same error still pop up. (readline.o  
)  
I assume it's the problem with gcc ?

Yudi

> **···**
>
> On Dec 24, 2007 10:00 PM, Han Kessels \<han.kessels@gmail.com\> wrote:
> 
> > On Dec 25, 4:57am, James Herdman \<james.herd...@gmail.com\> wrote:  
> > \> I'm having a little trouble building Ruby 1.9. I'm building on  
> > \> Leopard and using "--prefix=/usr/local/ruby1.9" when running config,  
> > \> but I'm getting the following output after running 'make':  
> > \>  
> > \> gcc -I. -I../../.ext/include/i686-darwin9.1.0 -I../.././include  
> > \> -I../.././ext/readline -DRUBY\_EXTCONF\_H=\"extconf.h\" -fno-common  
> > \> -g -O2 -pipe -fno-common -o readline.o -c readline.c  
> > \> readline.c: In function 'filename\_completion\_proc\_call':  
> > \> readline.c:659: error: 'filename\_completion\_function' undeclared  
> > \> (first use in this function)  
> > \> readline.c:659: error: (Each undeclared identifier is reported only once  
> > \> readline.c:659: error: for each function it appears in.)  
> > \> readline.c:659: warning: assignment makes pointer from integer without a  
> > cast  
> > \> readline.c: In function 'username\_completion\_proc\_call':  
> > \> readline.c:684: error: 'username\_completion\_function' undeclared  
> > \> (first use in this function)  
> > \> readline.c:684: warning: assignment makes pointer from integer without a  
> > cast  
> > \> make[1]: \*\*\* [readline.o] Error 1  
> > \> make: \*\*\* [all] Error 1  
> > \>  
> > \> Any ideas on what's wrong?  
> > \>  
> > \> James H.
> > 
> > Install the latest readline (5.2) in /usr/local and rerun ./configure:  
> > ./configure --prefix=/usr/local --with-readline-dir=/usr/local
> > 
> > Cheers,
> > 
> > Han
> 
> --  
> Do not be afraid of Change.

---

<div class="post-metadata">

**Author:** ![Han\_Kessels](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@Han\_Kessels](https://rubytalk.org/u/Han_Kessels)\
**Post date:** [26 December 2007 10:04 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/5 "2007-12-26T10:04:58Z")

</div>

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 @@  
&nbsp;&nbsp;&nbsp;;;

# Darwin/MacOS X  
-darwin8\*)  
+darwin89\*)  
&nbsp;&nbsp;&nbsp;SHOBJ\_STATUS=supported  
&nbsp;&nbsp;&nbsp;SHLIB\_STATUS=supported

@@ -171,7 +171,7 @@  
&nbsp;&nbsp;&nbsp;SHLIB\_LIBSUFF='dylib'

&nbsp;&nbsp;&nbsp;case "${host\_os}" in  
- darwin[78]\*) SHOBJ\_LDFLAGS=''  
+ darwin[789]\*) SHOBJ\_LDFLAGS=''  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SHLIB\_XLDFLAGS='-dynamiclib -arch\_only `/usr/bin/arch` -  
install\_name $(libdir)/$@ -current\_version $(SHLIB\_MAJOR)$  
(SHLIB\_MINOR) -compatibility\_version $(SHLIB\_MAJOR) -v'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;  
&nbsp;&nbsp;&nbsp;\*) SHOBJ\_LDFLAGS='-dynamic'

Cheers,

Han

> **···**
>
> On Dec 26, 4:01 pm, yudi \<yudi....@gmail.com\> wrote:
> 
> > [Note: parts of this message were removed to make it a legal post.]
> > 
> > I had exactly the same problem.installing readline with ./configure  
> > --prefix=/usr/local --with-readline-dir=/usr/local  
> > shows a incompatibility with dynamic library, then I followed here:[http://www.weblogs.uhi.ac.uk/sm00sm/?p=291](http://www.weblogs.uhi.ac.uk/sm00sm/?p=291)
> > 
> > with make static and sudo make static-install
> > 
> > With readline 'properly' installed, the same error still pop up. (readline.o  
> > )  
> > I assume it's the problem with gcc ?
> > 
> > Yudi
> > 
> > On Dec 24, 2007 10:00 PM, Han Kessels \<han.kess...@gmail.com\> wrote:
> > 
> > \> On Dec 25, 4:57am, James Herdman \<james.herd...@gmail.com\> wrote:  
> > \> \> I'm having a little trouble building Ruby 1.9. I'm building on  
> > \> \> Leopard and using "--prefix=/usr/local/ruby1.9" when running config,  
> > \> \> but I'm getting the following output after running 'make':
> > 
> > \> \> gcc -I. -I../../.ext/include/i686-darwin9.1.0 -I../.././include  
> > \> \> -I../.././ext/readline -DRUBY\_EXTCONF\_H=\"extconf.h\" -fno-common  
> > \> \> -g -O2 -pipe -fno-common -o readline.o -c readline.c  
> > \> \> readline.c: In function 'filename\_completion\_proc\_call':  
> > \> \> readline.c:659: error: 'filename\_completion\_function' undeclared  
> > \> \> (first use in this function)  
> > \> \> readline.c:659: error: (Each undeclared identifier is reported only once  
> > \> \> readline.c:659: error: for each function it appears in.)  
> > \> \> readline.c:659: warning: assignment makes pointer from integer without a  
> > \> cast  
> > \> \> readline.c: In function 'username\_completion\_proc\_call':  
> > \> \> readline.c:684: error: 'username\_completion\_function' undeclared  
> > \> \> (first use in this function)  
> > \> \> readline.c:684: warning: assignment makes pointer from integer without a  
> > \> cast  
> > \> \> make[1]: \*\*\* [readline.o] Error 1  
> > \> \> make: \*\*\* [all] Error 1
> > 
> > \> \> Any ideas on what's wrong?
> > 
> > \> \> James H.
> > 
> > \> Install the latest readline (5.2) in /usr/local and rerun ./configure:  
> > \> ./configure --prefix=/usr/local --with-readline-dir=/usr/local
> > 
> > \> Cheers,
> > 
> > \> Han
> > 
> > --  
> > Do not be afraid of Change.

---

<div class="post-metadata">

**Author:** ![Tadatoshi\_Takahashi1](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@Tadatoshi\_Takahashi1](https://rubytalk.org/u/Tadatoshi_Takahashi1)\
**Post date:** [27 December 2007 02:14 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/6 "2007-12-27T02:14:59Z")

</div>

I'm having the same problem.  
After I modified support/shobj-conf for readline following Han's  
instruction, the problem still persists.

There is no post on this thread after Han's post.  
Does it mean that everybody was able to install Ruby 1.9?  
If so, could anybody post the steps to take?

Thank you in advance.  
Tadatoshi

> **···**
>
> On Dec 26, 5:00 am, Han Kessels \<han.kess...@gmail.com\> wrote:
> 
> > On Dec 26, 4:01 pm, yudi \<yudi....@gmail.com\> wrote:
> > 
> > \> [Note: parts of this message were removed to make it a legal post.]
> > 
> > \> I had exactly the same problem.installing readline with ./configure  
> > \> --prefix=/usr/local --with-readline-dir=/usr/local  
> > \> shows a incompatibility with dynamic library, then I followed here:[http://www.weblogs.uhi.ac.uk/sm00sm/?p=291](http://www.weblogs.uhi.ac.uk/sm00sm/?p=291)
> > 
> > \> with make static and sudo make static-install
> > 
> > \> With readline 'properly' installed, the same error still pop up. (readline.o  
> > \> )  
> > \> I assume it's the problem with gcc ?
> > 
> > \> Yudi
> > 
> > \> On Dec 24, 2007 10:00 PM, Han Kessels \<han.kess...@gmail.com\> wrote:
> > 
> > \> \> On Dec 25, 4:57am, James Herdman \<james.herd...@gmail.com\> wrote:  
> > \> \> \> I'm having a little trouble building Ruby 1.9. I'm building on  
> > \> \> \> Leopard and using "--prefix=/usr/local/ruby1.9" when running config,  
> > \> \> \> but I'm getting the following output after running 'make':
> > 
> > \> \> \> gcc -I. -I../../.ext/include/i686-darwin9.1.0 -I../.././include  
> > \> \> \> -I../.././ext/readline -DRUBY\_EXTCONF\_H=\"extconf.h\" -fno-common  
> > \> \> \> -g -O2 -pipe -fno-common -o readline.o -c readline.c  
> > \> \> \> readline.c: In function 'filename\_completion\_proc\_call':  
> > \> \> \> readline.c:659: error: 'filename\_completion\_function' undeclared  
> > \> \> \> (first use in this function)  
> > \> \> \> readline.c:659: error: (Each undeclared identifier is reported only once  
> > \> \> \> readline.c:659: error: for each function it appears in.)  
> > \> \> \> readline.c:659: warning: assignment makes pointer from integer without a  
> > \> \> cast  
> > \> \> \> readline.c: In function 'username\_completion\_proc\_call':  
> > \> \> \> readline.c:684: error: 'username\_completion\_function' undeclared  
> > \> \> \> (first use in this function)  
> > \> \> \> readline.c:684: warning: assignment makes pointer from integer without a  
> > \> \> cast  
> > \> \> \> make[1]: \*\*\* [readline.o] Error 1  
> > \> \> \> make: \*\*\* [all] Error 1
> > 
> > \> \> \> Any ideas on what's wrong?
> > 
> > \> \> \> James H.
> > 
> > \> \> Install the latest readline (5.2) in /usr/local and rerun ./configure:  
> > \> \> ./configure --prefix=/usr/local --with-readline-dir=/usr/local
> > 
> > \> \> Cheers,
> > 
> > \> \> Han
> > 
> > \> --  
> > \> Do not be afraid of Change.
> > 
> > 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 @@  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;
> > 
> > # Darwin/MacOS X  
> > -darwin8\*)  
> > +darwin89\*)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SHOBJ\_STATUS=supported  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SHLIB\_STATUS=supported
> > 
> > @@ -171,7 +171,7 @@  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SHLIB\_LIBSUFF='dylib'
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "${host\_os}" in  
> > - darwin[78]\*) SHOBJ\_LDFLAGS=''  
> > + darwin[789]\*) SHOBJ\_LDFLAGS=''  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SHLIB\_XLDFLAGS='-dynamiclib -arch\_only `/usr/bin/arch` -  
> > install\_name $(libdir)/$@ -current\_version $(SHLIB\_MAJOR)$  
> > (SHLIB\_MINOR) -compatibility\_version $(SHLIB\_MAJOR) -v'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\*) SHOBJ\_LDFLAGS='-dynamic'
> > 
> > Cheers,
> > 
> > Han

---

<div class="post-metadata">

**Author:** ![Raul\_Parolari](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@Raul\_Parolari](https://rubytalk.org/u/Raul_Parolari)\
**Post date:** [27 December 2007 02:42 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/7 "2007-12-27T02:42:03Z")

</div>

Tadatoshi Takahashi wrote:

> After I modified support/shobj-conf for readline following Han's  
> instruction, the problem still persists.

There were 2 different corrections to the problem:  
1) generate readline in the way indicated by Yudi (..make  
static-install) above  
2) correct the test on the OS version as indicated by Han.

I am still using MacOsX 10.4.11, and I cannot confirm that the 2 actions  
fix the problem for Leopard. But they (in my case, just the first alone)  
allowed me to (finally..) generate ruby 1.9.

I wrote this just in case you overlooked the first correction.

And by the way, thanks to Yudi and Han

Raul

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Tadatoshi\_Takahashi1](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@Tadatoshi\_Takahashi1](https://rubytalk.org/u/Tadatoshi_Takahashi1)\
**Post date:** [27 December 2007 02:59 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/8 "2007-12-27T02:59:59Z")

</div>

Thank you for your reply, Raul.

Actually, just to install readline itself required the first  
correction.  
Then I went on to execute make for Ruby 1.9.  
At that time, I got the same error as James originally posted.  
So I followed Han's instruction.  
But the problem still persisted.  
(I'm using Mac OS X 10.5.1 Leopard.)

> **···**
>
> On Dec 26, 9:42 pm, Raul Parolari \<raulparol...@gmail.com\> wrote:
> 
> > Tadatoshi Takahashi wrote:  
> > \> After I modified support/shobj-conf for readline following Han's  
> > \> instruction, the problem still persists.
> > 
> > There were 2 different corrections to the problem:  
> > 1) generate readline in the way indicated by Yudi (..make  
> > static-install) above  
> > 2) correct the test on the OS version as indicated by Han.
> > 
> > I am still using MacOsX 10.4.11, and I cannot confirm that the 2 actions  
> > fix the problem for Leopard. But they (in my case, just the first alone)  
> > allowed me to (finally..) generate ruby 1.9.
> > 
> > I wrote this just in case you overlooked the first correction.
> > 
> > And by the way, thanks to Yudi and Han
> > 
> > Raul  
> > --  
> > Posted viahttp://www.ruby-forum.com/.

---

<div class="post-metadata">

**Author:** ![Han\_Kessels](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@Han\_Kessels](https://rubytalk.org/u/Han_Kessels)\
**Post date:** [27 December 2007 09:30 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/9 "2007-12-27T09:30:01Z")

</div>

Once you succeeded in installing readline in /usr/local, did you point  
ruby1.9 at it?  
./configure --prefix=/usr/local/ruby1.9 --with-readline-dir=/usr/local

> **···**
>
> On Dec 27, 11:57 am, Tadatoshi Takahashi \<tadato...@gmail.com\> wrote:
> 
> > On Dec 26, 9:42 pm, Raul Parolari \<raulparol...@gmail.com\> wrote:
> > 
> > \> Tadatoshi Takahashi wrote:  
> > \> \> After I modified support/shobj-conf for readline following Han's  
> > \> \> instruction, the problem still persists.
> > 
> > \> There were 2 different corrections to the problem:  
> > \> 1) generate readline in the way indicated by Yudi (..make  
> > \> static-install) above  
> > \> 2) correct the test on the OS version as indicated by Han.
> > 
> > \> I am still using MacOsX 10.4.11, and I cannot confirm that the 2 actions  
> > \> fix the problem for Leopard. But they (in my case, just the first alone)  
> > \> allowed me to (finally..) generate ruby 1.9.
> > 
> > \> I wrote this just in case you overlooked the first correction.
> > 
> > \> And by the way, thanks to Yudi and Han
> > 
> > \> Raul  
> > \> --  
> > \> Posted viahttp://www.ruby-forum.com/.
> > 
> > Thank you for your reply, Raul.
> > 
> > Actually, just to install readline itself required the first  
> > correction.  
> > Then I went on to execute make for Ruby 1.9.  
> > At that time, I got the same error as James originally posted.  
> > So I followed Han's instruction.  
> > But the problem still persisted.  
> > (I'm using Mac OS X 10.5.1 Leopard.)

---

<div class="post-metadata">

**Author:** ![yudi](https://avatars.discourse-cdn.com/v4/letter/y/34f0e0/32.png) [@yudi](https://rubytalk.org/u/yudi)\
**Post date:** [27 December 2007 15:37 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/10 "2007-12-27T15:37:46Z")

</div>

I did, quite a few times.

> **···**
>
> On Dec 27, 2007 3:30 AM, Han Kessels \<han.kessels@gmail.com\> wrote:
> 
> > On Dec 27, 11:57am, Tadatoshi Takahashi \<tadato...@gmail.com\> wrote:  
> > \> On Dec 26, 9:42 pm, Raul Parolari \<raulparol...@gmail.com\> wrote:  
> > \>  
> > \>  
> > \>  
> > \> \> Tadatoshi Takahashi wrote:  
> > \> \> \> After I modified support/shobj-conf for readline following Han's  
> > \> \> \> instruction, the problem still persists.  
> > \>  
> > \> \> There were 2 different corrections to the problem:  
> > \> \> 1) generate readline in the way indicated by Yudi (..make  
> > \> \> static-install) above  
> > \> \> 2) correct the test on the OS version as indicated by Han.  
> > \>  
> > \> \> I am still using MacOsX 10.4.11, and I cannot confirm that the 2  
> > actions  
> > \> \> fix the problem for Leopard. But they (in my case, just the first  
> > alone)  
> > \> \> allowed me to (finally..) generate ruby 1.9.  
> > \>  
> > \> \> I wrote this just in case you overlooked the first correction.  
> > \>  
> > \> \> And by the way, thanks to Yudi and Han  
> > \>  
> > \> \> Raul  
> > \> \> --  
> > \> \> Posted viahttp://www.ruby-forum.com/.  
> > \>  
> > \> Thank you for your reply, Raul.  
> > \>  
> > \> Actually, just to install readline itself required the first  
> > \> correction.  
> > \> Then I went on to execute make for Ruby 1.9.  
> > \> At that time, I got the same error as James originally posted.  
> > \> So I followed Han's instruction.  
> > \> But the problem still persisted.  
> > \> (I'm using Mac OS X 10.5.1 Leopard.)
> > 
> > Once you succeeded in installing readline in /usr/local, did you point  
> > ruby1.9 at it?  
> > ./configure --prefix=/usr/local/ruby1.9 --with-readline-dir=/usr/local
> 
> --  
> Do not be afraid of Change.

---

<div class="post-metadata">

**Author:** ![Tadatoshi\_Takahashi1](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@Tadatoshi\_Takahashi1](https://rubytalk.org/u/Tadatoshi_Takahashi1)\
**Post date:** [27 December 2007 22:44 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/11 "2007-12-27T22:44:58Z")

</div>

Thank you for your reply, Han.

Yes, I did as well.  
In my case, just like Yudi, ./configure --prefix=/usr/local --with-  
readline-dir=/usr/local

> **···**
>
> On Dec 27, 10:37 am, yudi \<yudi....@gmail.com\> wrote:
> 
> > [Note: parts of this message were removed to make it a legal post.]
> > 
> > I did, quite a few times.
> > 
> > On Dec 27, 2007 3:30 AM, Han Kessels \<han.kess...@gmail.com\> wrote:
> > 
> > \> On Dec 27, 11:57am, Tadatoshi Takahashi \<tadato...@gmail.com\> wrote:  
> > \> \> On Dec 26, 9:42 pm, Raul Parolari \<raulparol...@gmail.com\> wrote:
> > 
> > \> \> \> Tadatoshi Takahashi wrote:  
> > \> \> \> \> After I modified support/shobj-conf for readline following Han's  
> > \> \> \> \> instruction, the problem still persists.
> > 
> > \> \> \> There were 2 different corrections to the problem:  
> > \> \> \> 1) generate readline in the way indicated by Yudi (..make  
> > \> \> \> static-install) above  
> > \> \> \> 2) correct the test on the OS version as indicated by Han.
> > 
> > \> \> \> I am still using MacOsX 10.4.11, and I cannot confirm that the 2  
> > \> actions  
> > \> \> \> fix the problem for Leopard. But they (in my case, just the first  
> > \> alone)  
> > \> \> \> allowed me to (finally..) generate ruby 1.9.
> > 
> > \> \> \> I wrote this just in case you overlooked the first correction.
> > 
> > \> \> \> And by the way, thanks to Yudi and Han
> > 
> > \> \> \> Raul  
> > \> \> \> --  
> > \> \> \> Posted viahttp://www.ruby-forum.com/.
> > 
> > \> \> Thank you for your reply, Raul.
> > 
> > \> \> Actually, just to install readline itself required the first  
> > \> \> correction.  
> > \> \> Then I went on to execute make for Ruby 1.9.  
> > \> \> At that time, I got the same error as James originally posted.  
> > \> \> So I followed Han's instruction.  
> > \> \> But the problem still persisted.  
> > \> \> (I'm using Mac OS X 10.5.1 Leopard.)
> > 
> > \> Once you succeeded in installing readline in /usr/local, did you point  
> > \> ruby1.9 at it?  
> > \> ./configure --prefix=/usr/local/ruby1.9 --with-readline-dir=/usr/local
> > 
> > --  
> > Do not be afraid of Change.

---

<div class="post-metadata">

**Author:** ![JoeP](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@JoeP](https://rubytalk.org/u/JoeP)\
**Post date:** [28 January 2008 03:20 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/12 "2008-01-28T03:20:00Z")

</div>

I really, really, really want to thank Han Kessels for this. Your  
solution saved me a lot of frustration and fixed a number of problems  
I was having. Thanks a ton.

- Joe P

---

<div class="post-metadata">

**Author:** ![Jose\_Ignacio](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@Jose\_Ignacio](https://rubytalk.org/u/Jose_Ignacio)\
**Post date:** [18 November 2008 12:37 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/13 "2008-11-18T12:37:34Z")

</div>

I have the same problems as listed here (Ruby 1.9 + Leopard). I have  
succesfully installed readline 5.2 using make static-install. But when  
compiling Ruby 1.9 I get the same result as Yudi and Tadatoshi. Did you  
finally manage to install Ruby 1.9 in Leopard?

Moreover, ruby 1.9.0-5 's configure doesn't support with-readline-dir  
option. Anyway, i tried both 1.9.0-0 (which seems to support  
with-readline-dir option) and 1.9.0-5 and I get the same result with  
both approaches:

readline.c: In function ‘filename\_completion\_proc\_call’:  
readline.c:659: error: ‘filename\_completion\_function’ undeclared (first  
use in this function)  
readline.c:659: error: (Each undeclared identifier is reported only once  
readline.c:659: error: for each function it appears in.)  
readline.c:659: warning: assignment makes pointer from integer without a  
cast  
readline.c: In function ‘username\_completion\_proc\_call’:  
readline.c:684: error: ‘username\_completion\_function’ undeclared (first  
use in this function)  
readline.c:684: warning: assignment makes pointer from integer without a  
cast

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Jose\_Ignacio](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@Jose\_Ignacio](https://rubytalk.org/u/Jose_Ignacio)\
**Post date:** [20 November 2008 19:48 UTC](https://rubytalk.org/t/trouble-with-readline-and-building-ruby-1-9/43267/14 "2008-11-20T19:48:43Z")

</div>

I managed to install Ruby 1.9 using MacPorts:

$ sudo ports install ruby19

For those interested, I think MacPorts uses the same procedure as shown  
here:

> **[Installing ruby 1.9preview1 on OS X Leopard - Programblings](http://www.programblings.com/2008/11/18/installing-ruby-19preview1-on-os-x-leopard/)**
>
> Tonight I’m trying conciseness. Editor’s note: I failed. I recently decided to test my git\_remote\_branch gem with Ruby 1.9, for the heck …

José Ignacio wrote:

> **···**
>
> > I have the same problems as listed here (Ruby 1.9 + Leopard). I have  
> > succesfully installed readline 5.2 using make static-install. But when  
> > compiling Ruby 1.9 I get the same result as Yudi and Tadatoshi. Did you  
> > finally manage to install Ruby 1.9 in Leopard?
> > 
> > Moreover, ruby 1.9.0-5 's configure doesn't support with-readline-dir  
> > option. Anyway, i tried both 1.9.0-0 (which seems to support  
> > with-readline-dir option) and 1.9.0-5 and I get the same result with  
> > both approaches:
> > 
> > readline.c: In function ‘filename\_completion\_proc\_call’:  
> > readline.c:659: error: ‘filename\_completion\_function’ undeclared (first  
> > use in this function)  
> > readline.c:659: error: (Each undeclared identifier is reported only once  
> > readline.c:659: error: for each function it appears in.)  
> > readline.c:659: warning: assignment makes pointer from integer without a  
> > cast  
> > readline.c: In function ‘username\_completion\_proc\_call’:  
> > readline.c:684: error: ‘username\_completion\_function’ undeclared (first  
> > use in this function)  
> > readline.c:684: warning: assignment makes pointer from integer without a  
> > cast
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
