[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Trouble with Readline and Building Ruby 1.9

James Herdman

12/24/2007 7:57:00 PM

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.

14 Answers

gmurray

12/24/2007 11:39:00 PM

0

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

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

Han Kessels

12/25/2007 3:58:00 AM

0

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.

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

Cheers,

Han

yudi

12/26/2007 7:02:00 AM

0

[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/sm0...

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.

Han Kessels

12/26/2007 10:00:00 AM

0

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/sm0...
>
> 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 @@
;;

# 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

Tadatoshi Takahashi

12/27/2007 2:13:00 AM

0

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/sm0...
>
> > 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 @@
> ;;
>
> # 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

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

Raul Raul

12/27/2007 2:42:00 AM

0

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-....

Tadatoshi Takahashi

12/27/2007 2:57:00 AM

0

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-....

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.)

Han Kessels

12/27/2007 9:26:00 AM

0

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-....
>
> 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


yudi

12/27/2007 3:38:00 PM

0

[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.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-....
> >
> > 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.

Tadatoshi Takahashi

12/27/2007 10:45:00 PM

0

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-....
>
> > > 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.

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