compiling ruby on red hat linux

Discussion in 'Ruby' started by Philip J. Mikal, Sep 8, 2005.

  1. 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=3D"(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
     
    Philip J. Mikal, Sep 8, 2005
    #1
    1. Advertising

  2. Philip J. Mikal

    Joe Van Dyk Guest

    Did you run the configure script?

    On 9/8/05, Philip J. Mikal <> wrote:
    > Hi,
    >=20
    > I'm having no luck compiling Ruby - getting the
    > following error:
    >=20
    > make[1]: Entering directory
    > `/usr/local/src/ruby/ext/iconv'
    > gcc -fPIC -g -O2 -I. -I../.. -I../../.
    > -I../.././ext/iconv -DICONV_INPTR_CAST=3D"(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
    >=20
    > Any ideas?
    >=20
    > -Philip
    >=20
    >=20
    >
     
    Joe Van Dyk, Sep 8, 2005
    #2
    1. Advertising

  3. Yes!

    --- Joe Van Dyk <> wrote:

    > Did you run the configure script?
    >=20
    > On 9/8/05, Philip J. Mikal <>
    > wrote:
    > > Hi,
    > >=20
    > > I'm having no luck compiling Ruby - getting the
    > > following error:
    > >=20
    > > make[1]: Entering directory
    > > `/usr/local/src/ruby/ext/iconv'
    > > gcc -fPIC -g -O2 -I. -I../.. -I../../.
    > > -I../.././ext/iconv -DICONV_INPTR_CAST=3D"(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
    > >=20
    > > Any ideas?
    > >=20
    > > -Philip
    > >=20
    > >=20
    > >

    >=20
    >=20
     
    Philip J. Mikal, Sep 8, 2005
    #3
  4. Philip J. Mikal

    Ara.T.Howard Guest

    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


    ~ > 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
    --
    ===============================================================================
    | 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
    ===============================================================================
     
    Ara.T.Howard, Sep 8, 2005
    #4
  5. 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=3D"(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]#=20


    --- "Ara.T.Howard" <> wrote:

    > ~ > tar xvfz ruby.tgz
    > ~ > cd ruby/
    > ~ > export
    > prefix=3D/full/path/to/where/you/want/to/install #
    > eg. /usr/local/
    > ~ > export LD_RUN_PATH=3D$prefix
    > ~ > export LD_LIBRARY_PATH=3D$prefix
    > ~ > ./configure --prefix=3D$prefix && make && sudo
    > make install
    >=20
    > hth.
    >=20
    > -a
    > --=20
     
    Philip J. Mikal, Sep 8, 2005
    #5
  6. Philip J. Mikal

    speechexpert Guest

    Windows GUI Suggestions

    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
     
    speechexpert, Sep 8, 2005
    #6
  7. Philip J. Mikal

    Curt Hibbs Guest

    Re: Windows GUI Suggestions

    ------=_Part_2164_29055417.1126224329111
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    On 9/8/05, speechexpert <> wrote:
    >=20
    > I am interested in writing a debugger that single-steps, highlights lines=

    ,
    > displays variables, etc.
    >=20
    > Any Recommendations for a GUI to work in? Should be simple, I hope. Rails=

    ?
    >=20
    > There is already one in FreeRIDE (http://freeride.rubyforge.org/), perhap=

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

    Curt

    ------=_Part_2164_29055417.1126224329111--
     
    Curt Hibbs, Sep 9, 2005
    #7
  8. Philip J. Mikal

    Guest

    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
     
    , Sep 9, 2005
    #8
  9. Hi Nobu,

    It looks like my gcc is bombing out on:

    -DICONV_INPTR_CAST=3D"(char **)"

    Any ideas?

    Thanks,

    Philip

    --- wrote:

    > Hi,
    >=20
    > 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:

    >=20
    > It works for me, with gcc 3.4.2 on Redhat.
    >=20
    > > make[1]: Entering directory
    > > `/usr/local/src/ruby/ext/iconv'
    > > gcc -fPIC -g -O2 -I. -I../.. -I../../.
    > > -I../.././ext/iconv -DICONV_INPTR_CAST=3D"(char **)"

    > -c
    > > iconv.c
    > > gcc323: **): No such file or directory

    >=20
    > What's this gcc323? Why does it differ from the
    > command called
    > by make?
    >=20
    > --=20
    > Nobu Nakada
    >=20
    >=20
     
    Philip J. Mikal, Sep 9, 2005
    #9
  10. Philip J. Mikal

    Guest

    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
     
    , Sep 9, 2005
    #10
  11. 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!=20

    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?=20

    Thanks for your help!

    -Philip

    --- wrote:

    > Hi,
    >=20
    > 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:
    > >=20
    > > -DICONV_INPTR_CAST=3D"(char **)"

    >=20
    > What is `your gcc'? Maybe a wrapper script?
    > Try:
    >=20
    > type -a gcc
    > file `type -p gcc`
    >=20
    > --=20
    > Nobu Nakada
    >=20
    >=20
     
    Philip J. Mikal, Sep 9, 2005
    #11
  12. Philip J. Mikal

    Guest

    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
     
    , Sep 9, 2005
    #12
  13. Philip J. Mikal

    speechexpert Guest

    Re: Windows GUI Suggestions

    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" <>
    To: "ruby-talk ML" <>
    Sent: Thursday, September 08, 2005 5:05 PM
    Subject: Re: Windows GUI Suggestions


    On 9/8/05, speechexpert <> 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
     
    speechexpert, Sep 9, 2005
    #13
  14. Philip J. Mikal

    Curt Hibbs Guest

    Re: Windows GUI Suggestions

    ------=_Part_3099_33017575.1126279213318
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    On 9/9/05, speechexpert <> wrote:
    >=20
    > 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=20
    > code.
    > The trick is getting it to stop only on certain statements and display
    > variables in the original language. hmmmm
    >=20
    > Do you use FreeRIDE?
    > curious,
    > John B



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

    Curt

    ------=_Part_3099_33017575.1126279213318--
     
    Curt Hibbs, Sep 9, 2005
    #14
  15. Hi Nobu,

    Name : gcc =20
    Relocations: (not relocateable)
    Version : 3.2.2 =20
    Vendor: Red Hat, Inc.
    Release : 5 Build
    Date: Tue 25 Feb 2003 05:53:15 AM PST
    Install Date: Wed 01 Dec 2004 04:57:40 PM PST =20
    Build Host: stripples.devel.redhat.com
    Group : Development/Languages Source
    RPM: gcc-3.2.2-5.src.rpm
    Size : 11592745 =20
    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>
    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

    --- wrote:

    > Hi,
    >=20
    > At Fri, 9 Sep 2005 12:57:26 +0900,
    > Philip J. Mikal wrote in [ruby-talk:155413]:
    > > Here is the script:
    > >=20
    > > #!/bin/sh
    > >=20
    > > 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

    >=20
    > They must be "$@" instead of mere $@.
    >=20
    > > 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.

    >=20
    > What package contains the script? What does
    > following command
    > show?
    >=20
    > rpm -qif /usr/bin/gcc
    >=20
    > --=20
    > Nobu Nakada
    >=20
    >=20
     
    Philip J. Mikal, Sep 9, 2005
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AJ
    Replies:
    0
    Views:
    398
  2. Ian Macdonald
    Replies:
    0
    Views:
    134
    Ian Macdonald
    Jul 29, 2003
  3. Bill McNeill
    Replies:
    5
    Views:
    311
  4. Angrez
    Replies:
    0
    Views:
    181
    Angrez
    Mar 12, 2007
  5. Jayamurugan Jayakumar

    How to uninstall Ruby 1.9.1p0 in Red Hat Linux

    Jayamurugan Jayakumar, Apr 21, 2009, in forum: Ruby
    Replies:
    1
    Views:
    313
    Robert Klemme
    Apr 21, 2009
Loading...

Share This Page