> Dear all,
> I have RedHat 4.2 on my Pro Box. Now, I need to have gcc and g77
> properly installed. gcc is obviously already there:
> > gcc -v
> > Reading specs from /usr/lib/gcc-lib/i386-linux/2.7.2.1/specs
> > gcc version 2.7.2.1
> Anyhow, I have the following compilation problem:
> > gcc -Dpentium_linux -fno_second_underscore bitops.c
> > cc1: Invalid option `-fno_second_underscore'
> I tried keep working...
> I downloaded g77-0_5_19_1-bin_tar.gz, and from / I tar zxpvf the .gz
> file.
> To have g77 linking, I had to cp the libgcc.a library to /usr/lib from
> /usr/lib/gcc-lib/i386-linux/2.7.2.1 Now g77 seems to work (I only
> compiled hello_world.f), anyhow, now I can't use anymore the gcc
> compiler.
> > gcc -Dpentium_linux -fno_second_underscore bitops.c
> > gcc: installation problem, cannot exec `cpp': No such file or directory
> and:
> > gcc -v
> > gcc version 2.7.2.1.f.1
> without any reading specs specifications.....
> Clearly the g77 installation wasn't performed properly...
> Any and all suggestions appreciated. (also for the gcc second_underscore
> problem)
> Luigi
First insert the redhat cdrom, and reinstall gcc + development,
so that it is in working condition. i.e. : rpm -i --force *gcc*
Get the following files from the CDROM which contains gnu stuff :
-rw-rw-r-- 1 stock users 1010463 Sep 13 16:45 g77-0.5.18.tar.gz
-rw-rw-r-- 1 stock users 7132291 Sep 13 16:55
gcc-2.7.2.1.tar.gz
And perform literally the following commands :
sh[ 1]# `cd /usr/src'
sh[ 2]# `gunzip -c < /usr/FSF/gcc-2.7.2.1.tar.gz | tar xf -'
[Might say "Broken pipe"...that is normal on some systems.]
sh[ 3]# `gunzip -c < /usr/FSF/g77-0.5.18.tar.gz | tar xf -'
["Broken pipe" again possible.]
sh[ 4]# `ln -s gcc-2.7.2.1 gcc'
sh[ 5]# `ln -s g77-0.5.18 g77'
sh[ 6]# `mv -i g77/* gcc'
[No questions should be asked by mv here; or, you made a mistake.]
sh[ 7]# `patch -p1 -V t -d gcc-2.7.2.1 <
gcc-2.7.2.1/f/gbe/2.7.2.diff'
[Unless patch complains about rejected patches, this step worked.]
sh[ 8]# `cd gcc'
sh[ 9]# `touch f77-install-ok'
[Do not do the above if your system already has an f77
command, unless you've checked that overwriting it
is okay.]
sh[10]# `touch f2c-install-ok'
[Do not do the above if your system already has an f2c
command, unless you've checked that overwriting it
is okay. Else, `touch f2c-exists-ok'.]
sh[11]# `./configure --prefix=/usr'
[Do not do the above if gcc is not installed in /usr/bin.
You might need a different `--prefix=...', as
described below.]
sh[12]# `make bootstrap'
[This takes a long time, and is where most problems occur.]
sh[13]# `rm -fr stage1'
sh[14]# `make -k install'
[The actual installation.]
sh[15]# `g77 -v'
[Verify that g77 is installed, obtain version info.]
sh[16]#
Goodluck. On My dual PPro 200 system this was done in 15 minutes.
Robert
Quote:> P.S. I have the Infomagic 6CDs set at hand.
> Luigi Cavallo
> Dept. of Chemistry
> Univ. of Naples
> Naples, ITALY
> --------------------
--
++---------------------------++----------------------------------------++
|| R.M. Stockmann || InfoMagic Nederland VOF
||
||
|| http://www.infomagic.nl || The Netherlands ||
++---------------------------++----------------------------------------++
250-Linux: A copylefted Unix-like operating system for 80[3456]86,
250- DEC Alpha, Sun SPARC, Sun UltraSPARC, Motorola 68k,
250- PowerPC/PowerMac, ARM, Mips R[3,4]x00, Fujitsu AP/1000+
250- and more to come.