Compiling ruby on red hat linux

Hi,

I'm having no luck compiling Ruby - getting the
following error:

make[1]: Entering directory
`/usr/local/src/ruby/ext/iconv'
gcc -fPIC -g -O2 -I. -I../.. -I../../.
-I../.././ext/iconv -DICONV_INPTR_CAST="(char **)" -c
iconv.c
gcc323: **): No such file or directory
iconv.c: In function `iconv_try':
iconv.c:246: parse error before "inptr"
make[1]: *** [iconv.o] Error 1
make[1]: Leaving directory
`/usr/local/src/ruby/ext/iconv'
make: *** [all] Error 1

Any ideas?

-Philip

Did you run the configure script?

···

On 9/8/05, Philip J. Mikal <philip_mikal@yahoo.com> wrote:

Hi,

I'm having no luck compiling Ruby - getting the
following error:

make[1]: Entering directory
`/usr/local/src/ruby/ext/iconv'
gcc -fPIC -g -O2 -I. -I../.. -I../../.
-I../.././ext/iconv -DICONV_INPTR_CAST="(char **)" -c
iconv.c
gcc323: **): No such file or directory
iconv.c: In function `iconv_try':
iconv.c:246: parse error before "inptr"
make[1]: *** [iconv.o] Error 1
make[1]: Leaving directory
`/usr/local/src/ruby/ext/iconv'
make: *** [all] Error 1

Any ideas?

-Philip

~ > tar xvfz ruby.tgz
   ~ > cd ruby/
   ~ > export prefix=/full/path/to/where/you/want/to/install # eg. /usr/local/
   ~ > export LD_RUN_PATH=$prefix
   ~ > export LD_LIBRARY_PATH=$prefix
   ~ > ./configure --prefix=$prefix && make && sudo make install

hth.

-a

···

On Fri, 9 Sep 2005, Philip J. Mikal wrote:

Hi,

I'm having no luck compiling Ruby - getting the
following error:

make[1]: Entering directory
`/usr/local/src/ruby/ext/iconv'
gcc -fPIC -g -O2 -I. -I../.. -I../../.
-I../.././ext/iconv -DICONV_INPTR_CAST="(char **)" -c
iconv.c
gcc323: **): No such file or directory
iconv.c: In function `iconv_try':
iconv.c:246: parse error before "inptr"
make[1]: *** [iconv.o] Error 1
make[1]: Leaving directory
`/usr/local/src/ruby/ext/iconv'
make: *** [all] Error 1

Any ideas?

-Philip

--

email :: ara [dot] t [dot] howard [at] noaa [dot] gov
phone :: 303.497.6469
Your life dwells amoung the causes of death
Like a lamp standing in a strong breeze. --Nagarjuna

===============================================================================

Hi,

At Fri, 9 Sep 2005 04:25:29 +0900,
Philip J. Mikal wrote in [ruby-talk:155369]:

I'm having no luck compiling Ruby - getting the
following error:

It works for me, with gcc 3.4.2 on Redhat.

make[1]: Entering directory
`/usr/local/src/ruby/ext/iconv'
gcc -fPIC -g -O2 -I. -I../.. -I../../.
-I../.././ext/iconv -DICONV_INPTR_CAST="(char **)" -c
iconv.c
gcc323: **): No such file or directory

What's this gcc323? Why does it differ from the command called
by make?

···

--
Nobu Nakada

Yes!

···

--- Joe Van Dyk <joevandyk@gmail.com> wrote:

Did you run the configure script?

On 9/8/05, Philip J. Mikal <philip_mikal@yahoo.com> > wrote:
> Hi,
>
> I'm having no luck compiling Ruby - getting the
> following error:
>
> make[1]: Entering directory
> `/usr/local/src/ruby/ext/iconv'
> gcc -fPIC -g -O2 -I. -I../.. -I../../.
> -I../.././ext/iconv -DICONV_INPTR_CAST="(char **)"
-c
> iconv.c
> gcc323: **): No such file or directory
> iconv.c: In function `iconv_try':
> iconv.c:246: parse error before "inptr"
> make[1]: *** [iconv.o] Error 1
> make[1]: Leaving directory
> `/usr/local/src/ruby/ext/iconv'
> make: *** [all] Error 1
>
> Any ideas?
>
> -Philip
>
>
>

Thanks for the suggestion, but same results as before:

compiling iconv
make[1]: Entering directory
`/usr/local/src/ruby-1.8.2/ext/iconv'
gcc -fPIC -g -O2 -I. -I../.. -I../../.
-I../.././ext/iconv -DICONV_INPTR_CAST="(char **)" -c
iconv.c
gcc323: **): No such file or directory
iconv.c: In function `iconv_try':
iconv.c:231: parse error before "inptr"
make[1]: *** [iconv.o] Error 1
make[1]: Leaving directory
`/usr/local/src/ruby-1.8.2/ext/iconv'
make: *** [all] Error 1
[root@misha-server2 ruby-1.8.2]#

···

--- "Ara.T.Howard" <Ara.T.Howard@noaa.gov> wrote:

   ~ > tar xvfz ruby.tgz
   ~ > cd ruby/
   ~ > export
prefix=/full/path/to/where/you/want/to/install #
eg. /usr/local/
   ~ > export LD_RUN_PATH=$prefix
   ~ > export LD_LIBRARY_PATH=$prefix
   ~ > ./configure --prefix=$prefix && make && sudo
make install

hth.

-a
--

Hi Nobu,

It looks like my gcc is bombing out on:

-DICONV_INPTR_CAST="(char **)"

Any ideas?

Thanks,

Philip

···

--- nobu.nokada@softhome.net wrote:

Hi,

At Fri, 9 Sep 2005 04:25:29 +0900,
Philip J. Mikal wrote in [ruby-talk:155369]:
> I'm having no luck compiling Ruby - getting the
> following error:

It works for me, with gcc 3.4.2 on Redhat.

> make[1]: Entering directory
> `/usr/local/src/ruby/ext/iconv'
> gcc -fPIC -g -O2 -I. -I../.. -I../../.
> -I../.././ext/iconv -DICONV_INPTR_CAST="(char **)"
-c
> iconv.c
> gcc323: **): No such file or directory

What's this gcc323? Why does it differ from the
command called
by make?

--
Nobu Nakada

I am interested in writing a debugger that single-steps, highlights lines, displays variables, etc.

Any Recommendations for a GUI to work in? Should be simple, I hope. Rails?

JB

Hi,

At Fri, 9 Sep 2005 11:12:52 +0900,
Philip J. Mikal wrote in [ruby-talk:155397]:

It looks like my gcc is bombing out on:

-DICONV_INPTR_CAST="(char **)"

What is `your gcc'? Maybe a wrapper script?
Try:

  type -a gcc
  file `type -p gcc`

···

--
Nobu Nakada

you could contribute to improving it instead of starting from scratch. It
uses the FXRuby/FOX GUI library.

Curt

···

On 9/8/05, speechexpert <speechexpert@sbcglobal.net> wrote:

I am interested in writing a debugger that single-steps, highlights lines,
displays variables, etc.

Any Recommendations for a GUI to work in? Should be simple, I hope. Rails?

There is already one in FreeRIDE (http://freeride.rubyforge.org/\), perhaps

Hi Nobu,

Yes, it looks like a wrapper script.

[root@server2 src]# type -a gcc
gcc is /usr/bin/gcc
[root@server2 src]# file `type -p gcc`
/usr/bin/gcc: Bourne shell script text executable

Here is the script:

#!/bin/sh

if id | grep -q gcc296; then
        #Use the compat gcc
        exec /usr/bin/gcc296 $@
elif [ -n "$GCC296" ]; then
        # Use the compat gcc
        exec /usr/bin/gcc296 $@
else
        # Use the standard gcc
        exec /usr/bin/gcc323 $@
fi

I symlinked gcc to gcc323 and now it works!

I've run into this problem on a few boxes and they are
all Red Hat 9. I'm suprised this problem hasn't shown
up before.

Maybe there is a better way to set up the -D arg to
iconv to support legacy distros with this shell
wrapper?

Thanks for your help!

-Philip

···

--- nobu.nokada@softhome.net wrote:

Hi,

At Fri, 9 Sep 2005 11:12:52 +0900,
Philip J. Mikal wrote in [ruby-talk:155397]:
> It looks like my gcc is bombing out on:
>
> -DICONV_INPTR_CAST="(char **)"

What is `your gcc'? Maybe a wrapper script?
Try:

  type -a gcc
  file `type -p gcc`

--
Nobu Nakada

Hi,

At Fri, 9 Sep 2005 12:57:26 +0900,
Philip J. Mikal wrote in [ruby-talk:155413]:

Here is the script:

#!/bin/sh

if id | grep -q gcc296; then
        #Use the compat gcc
        exec /usr/bin/gcc296 $@
elif [ -n "$GCC296" ]; then
        # Use the compat gcc
        exec /usr/bin/gcc296 $@
else
        # Use the standard gcc
        exec /usr/bin/gcc323 $@
fi

They must be "$@" instead of mere $@.

I've run into this problem on a few boxes and they are
all Red Hat 9. I'm suprised this problem hasn't shown
up before.

What package contains the script? What does following command
show?

  rpm -qif /usr/bin/gcc

···

--
Nobu Nakada

Thanks Curt - My mission is a bit more complicated han a Ruby debugger though -
I am looking at a debugger for an interpreter written in Ruby for another language.
But the FreeRIDE debugger could be modified, since it will debug Ruby code.
The trick is getting it to stop only on certain statements and display variables in the original language. hmmmm

Do you use FreeRIDE?
curious,
John B

···

----- Original Message ----- From: "Curt Hibbs" <curt.hibbs@gmail.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Thursday, September 08, 2005 5:05 PM
Subject: Re: Windows GUI Suggestions

On 9/8/05, speechexpert <speechexpert@sbcglobal.net> wrote:

I am interested in writing a debugger that single-steps, highlights lines,
displays variables, etc.

Any Recommendations for a GUI to work in? Should be simple, I hope. Rails?

There is already one in FreeRIDE (http://freeride.rubyforge.org/\), perhaps

you could contribute to improving it instead of starting from scratch. It
uses the FXRuby/FOX GUI library.

Curt

I'm one of the original authors of FreeRIDE. If you want to explore the
option of reusing the FreeRIDE debugger, then the best thing would be to
subscribe to the FreeRIDE mailing list and post questions there for Laurent
Julliard -- the guy who wrote the FreeRIDE debugger.

Curt

···

On 9/9/05, speechexpert <speechexpert@sbcglobal.net> wrote:

Thanks Curt - My mission is a bit more complicated han a Ruby debugger
though -
I am looking at a debugger for an interpreter written in Ruby for another
language.
But the FreeRIDE debugger could be modified, since it will debug Ruby
code.
The trick is getting it to stop only on certain statements and display
variables in the original language. hmmmm

Do you use FreeRIDE?
curious,
John B

Hi Nobu,

Name : gcc
Relocations: (not relocateable)
Version : 3.2.2
Vendor: Red Hat, Inc.
Release : 5 Build
Install Date: Wed 01 Dec 2004 04:57:40 PM PST
Build Host: stripples.devel.redhat.com
Group : Development/Languages Source
RPM: gcc-3.2.2-5.src.rpm
Size : 11592745
License: GPL
Signature : DSA/SHA1, Tue 25 Feb 2003 07:04:13 AM
PST, Key ID 219180cddb42a60e
Packager : Red Hat, Inc.
<http://bugzilla.redhat.com/bugzilla&gt;
URL : http://gcc.gnu.org
Summary : The GNU cc and gcc C compilers.
Description :
The gcc package includes the cc and gcc GNU compilers
for compiling C
code.

-Philip

···

Date: Tue 25 Feb 2003 05:53:15 AM PST

--- nobu.nokada@softhome.net wrote:

Hi,

At Fri, 9 Sep 2005 12:57:26 +0900,
Philip J. Mikal wrote in [ruby-talk:155413]:
> Here is the script:
>
> #!/bin/sh
>
> if id | grep -q gcc296; then
> #Use the compat gcc
> exec /usr/bin/gcc296 $@
> elif [ -n "$GCC296" ]; then
> # Use the compat gcc
> exec /usr/bin/gcc296 $@
> else
> # Use the standard gcc
> exec /usr/bin/gcc323 $@
> fi

They must be "$@" instead of mere $@.

> I've run into this problem on a few boxes and they
are
> all Red Hat 9. I'm suprised this problem hasn't
shown
> up before.

What package contains the script? What does
following command
show?

  rpm -qif /usr/bin/gcc

--
Nobu Nakada