Problem Configuring Ruby Source in Linux

Hi all,

I’m new to Ruby, and I am trying to install Ruby-1.8.5
in my linux box.

However upon configuring it, I encounter
the following problem:

Checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
checking for gcc… gcc
checking for C compiler default output file name… configure: error: C
compiler cannot create executables
See `config.log’ for more details.

And GCC versin is: gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)

Can anybody suggest the right Ruby version
I can install in my Linux?
(I’ve also attached the config.log file).

I’m planning to use Ruby On Rail with Ruby.
Hope to hear from you again.


Edward

------------ Institute For Infocomm Research - Disclaimer -------------
This email is confidential and may be privileged. If you are not the
intended recipient, please delete it and notify us immediately. Please
do not copy or use it for any purpose, or disclose its contents to any
other person. Thank you.

On Mar 1, 2007, at 24:08, Edward WIJAYA wrote:

checking for C compiler default output file name… configure:
Hope to hear from you again.
fix your CFLAG (or whatever) environment variable or mkdir ~/.ocaml/
include:

configure:2005: gcc I/home/ewijaya/.ocaml/include -I/home/
ewijaya/.libstree/include -I/home/ewijaya/.gsl/include -I/home/
ewijaya/.swish/include -I/home/ewijaya/.lapack/include -I/home/
ewijaya/.berkeley_db/include -I/home/ewijaya/.libgd/include -I/home/
ewijaya/.graphviz/include -L/home/ewijaya/.ocaml/lib -L/home/
ewijaya/.libstree/lib -L/home/ewijaya/.ghc/lib -L/home/ewijaya/.gsl/
lib -L/home/ewijaya/.lapack/lib -L/home/ewijaya/.swish/lib -L/home/
ewijaya/.berkeley_db/lib -L/home/ewijaya/.libgd/lib -L/home/
ewijaya/.graphviz/lib conftest.c >&5
gcc: I/home/ewijaya/.ocaml/include: No such file or directory

On Thu, Mar 01, 2007 at 05:08:05PM +0900, Edward WIJAYA wrote:

Checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
checking for gcc… gcc
checking for C compiler default output file name… configure: error: C
compiler cannot create executables
See `config.log’ for more details.

which says, at the point where gcc tries to compile its first program:


configure:2005: gcc I/home/ewijaya/.ocaml/include
±I/home/ewijaya/.libstree/include -I/home/ewijaya/.gsl/include
±I/home/ewijaya/.swish/include -I/home/ewijaya/.lapack/include
±I/home/ewijaya/.berkeley_db/include -I/home/ewijaya/.libgd/include
±I/home/ewijaya/.graphviz/include -L/home/ewijaya/.ocaml/lib
±L/home/ewijaya/.libstree/lib -L/home/ewijaya/.ghc/lib
-L/home/ewijaya/.gsl/lib±L/home/ewijaya/.lapack/lib
-L/home/ewijaya/.swish/lib
±L/home/ewijaya/.berkeley_db/lib -L/home/ewijaya/.libgd/lib
±L/home/ewijaya/.graphviz/lib conftest.c >&5
gcc: I/home/ewijaya/.ocaml/include: No such file or directory
configure:2008: $? = 1
configure: failed program was:

Which means you have some junk in your environment. It looks like you
meant
to set
CFLAGS="-I/home/ewijaya/.ocaml/include …"
but you actually have set is
CFLAGS=“I/home/ewijaya/.ocaml/include …”

The safest thing is to get rid of any environment variables like this
which
could affect compilation (CFLAGS, LDFLAGS, LD_RUN_PATH etc). Remove them
from .profile or .bash_profile or wherever else it is that you set them,
then logout and login again.

Or, being a bit more drastic, try:

env -i ./configure …

And GCC versin is: gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)

Can anybody suggest the right Ruby version
I can install in my Linux?

Well you didn’t say what Linux distribution you have, nor what version,
but
I expect ruby-1.8.5 will be fine.

Of course, if you’re not comfortable compiling from source, then maybe
you
would be better off getting a pre-packaged ruby binary for whatever
Linux
distribution you have.

Brian.

On 3/1/07, Edward WIJAYA [email protected] wrote:

Checking build system type… i686-pc-linux-gnu
I can install in my Linux?
(I’ve also attached the config.log file).

I’m planning to use Ruby On Rail with Ruby.
Hope to hear from you again.


Edward

It looks like you’re running RedHat or maybe Fedora? It’s been a while
since I’ve been in Fedora/RH, but can you install it via yum?

ie.

yum install ruby

I am pretty sure I did that when I was trying to learn python a few
years
ago…


Samantha

http://www.babygeek.org/

“Beware when the great God lets loose a thinker on this planet. Then all
things are at risk.”
–Ralph Waldo Emerson

Edward WIJAYA wrote:

checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
checking for gcc… gcc
checking for C compiler default output file name… configure: error:
C compiler cannot create executables
See `config.log’ for more details.
Please post the contents of this log file. What has happened is that the
C compiler crashed during “configure” and this log file will have that
error message. Thanks!


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.