# Compiling ruby on red hat linux

**URL:** <https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696>\
**Category:** ruby-talk\
**Created:** [8 September 2005 19:25 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696 "2005-09-08T19:25:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philip\_J\_Mikal](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Philip\_J\_Mikal](https://rubytalk.org/u/Philip_J_Mikal)\
**Post date:** [8 September 2005 19:25 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/1 "2005-09-08T19:25:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![J-Van](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@J-Van](https://rubytalk.org/u/J-Van)\
**Post date:** [8 September 2005 19:49 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/2 "2005-09-08T19:49:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ara.T.Howard6](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Ara.T.Howard6](https://rubytalk.org/u/Ara.T.Howard6)\
**Post date:** [8 September 2005 19:55 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/3 "2005-09-08T19:55:35Z")

</div>

~ \> tar xvfz ruby.tgz  
&nbsp;&nbsp;&nbsp;~ \> cd ruby/  
&nbsp;&nbsp;&nbsp;~ \> export prefix=/full/path/to/where/you/want/to/install # eg. /usr/local/  
&nbsp;&nbsp;&nbsp;~ \> export LD\_RUN\_PATH=$prefix  
&nbsp;&nbsp;&nbsp;~ \> export LD\_LIBRARY\_PATH=$prefix  
&nbsp;&nbsp;&nbsp;~ \> ./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
> 
> ===============================================================================

---

<div class="post-metadata">

**Author:** ![Nobuyoshi\_Nakada](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nobuyoshi\_Nakada](https://rubytalk.org/u/Nobuyoshi_Nakada)\
**Post date:** [9 September 2005 02:08 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/4 "2005-09-09T02:08:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Philip\_J\_Mikal](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Philip\_J\_Mikal](https://rubytalk.org/u/Philip_J_Mikal)\
**Post date:** [8 September 2005 19:53 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/5 "2005-09-08T19:53:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Philip\_J\_Mikal](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Philip\_J\_Mikal](https://rubytalk.org/u/Philip_J_Mikal)\
**Post date:** [8 September 2005 20:03 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/6 "2005-09-08T20:03:15Z")

</div>

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:
> 
> > &nbsp;&nbsp;&nbsp;~ \> tar xvfz ruby.tgz  
> > &nbsp;&nbsp;&nbsp;~ \> cd ruby/  
> > &nbsp;&nbsp;&nbsp;~ \> export  
> > prefix=/full/path/to/where/you/want/to/install #  
> > eg. /usr/local/  
> > &nbsp;&nbsp;&nbsp;~ \> export LD\_RUN\_PATH=$prefix  
> > &nbsp;&nbsp;&nbsp;~ \> export LD\_LIBRARY\_PATH=$prefix  
> > &nbsp;&nbsp;&nbsp;~ \> ./configure --prefix=$prefix && make && sudo  
> > make install
> > 
> > hth.
> > 
> > -a  
> > --

---

<div class="post-metadata">

**Author:** ![Philip\_J\_Mikal](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Philip\_J\_Mikal](https://rubytalk.org/u/Philip_J_Mikal)\
**Post date:** [9 September 2005 02:12 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/7 "2005-09-09T02:12:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![John\_Brookes](https://avatars.discourse-cdn.com/v4/letter/j/aca169/32.png) [@John\_Brookes](https://rubytalk.org/u/John_Brookes)\
**Post date:** [8 September 2005 20:07 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/8 "2005-09-08T20:07:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nobuyoshi\_Nakada](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nobuyoshi\_Nakada](https://rubytalk.org/u/Nobuyoshi_Nakada)\
**Post date:** [9 September 2005 02:19 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/9 "2005-09-09T02:19:04Z")

</div>

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:

&nbsp;&nbsp;type -a gcc  
&nbsp;&nbsp;file `type -p gcc`

> **···**
>
> --  
> Nobu Nakada

---

<div class="post-metadata">

**Author:** ![Curt\_Hibbs2](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@Curt\_Hibbs2](https://rubytalk.org/u/Curt_Hibbs2)\
**Post date:** [9 September 2005 00:05 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/10 "2005-09-09T00:05:31Z")

</div>

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/\](http://freeride.rubyforge.org/%5C)), perhaps

---

<div class="post-metadata">

**Author:** ![Philip\_J\_Mikal](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Philip\_J\_Mikal](https://rubytalk.org/u/Philip_J_Mikal)\
**Post date:** [9 September 2005 03:57 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/11 "2005-09-09T03:57:26Z")

</div>

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  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#Use the compat gcc  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exec /usr/bin/gcc296 $@  
elif [-n "$GCC296"]; then  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Use the compat gcc  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exec /usr/bin/gcc296 $@  
else  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Use the standard gcc  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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:
> > 
> > &nbsp;&nbsp;type -a gcc  
> > &nbsp;&nbsp;file `type -p gcc`
> > 
> > --  
> > Nobu Nakada

---

<div class="post-metadata">

**Author:** ![Nobuyoshi\_Nakada](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nobuyoshi\_Nakada](https://rubytalk.org/u/Nobuyoshi_Nakada)\
**Post date:** [9 September 2005 07:48 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/12 "2005-09-09T07:48:36Z")

</div>

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  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#Use the compat gcc  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exec /usr/bin/gcc296 $@  
> elif [-n "$GCC296"]; then  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Use the compat gcc  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exec /usr/bin/gcc296 $@  
> else  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Use the standard gcc  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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?

&nbsp;&nbsp;rpm -qif /usr/bin/gcc

> **···**
>
> --  
> Nobu Nakada

---

<div class="post-metadata">

**Author:** ![John\_Brookes](https://avatars.discourse-cdn.com/v4/letter/j/aca169/32.png) [@John\_Brookes](https://rubytalk.org/u/John_Brookes)\
**Post date:** [9 September 2005 13:54 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/13 "2005-09-09T13:54:54Z")

</div>

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/\](http://freeride.rubyforge.org/%5C)), perhaps
> 
> you could contribute to improving it instead of starting from scratch. It  
> uses the FXRuby/FOX GUI library.
> 
> Curt

---

<div class="post-metadata">

**Author:** ![Curt\_Hibbs2](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@Curt\_Hibbs2](https://rubytalk.org/u/Curt_Hibbs2)\
**Post date:** [9 September 2005 15:20 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/14 "2005-09-09T15:20:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Philip\_J\_Mikal](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Philip\_J\_Mikal](https://rubytalk.org/u/Philip_J_Mikal)\
**Post date:** [9 September 2005 16:05 UTC](https://rubytalk.org/t/compiling-ruby-on-red-hat-linux/20696/15 "2005-09-09T16:05:10Z")

</div>

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](http://bugzilla.redhat.com/bugzilla&gt);  
URL : [http://gcc.gnu.org](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?
> > 
> > &nbsp;&nbsp;rpm -qif /usr/bin/gcc
> > 
> > --  
> > Nobu Nakada
