Link to home
Start Free TrialLog in
Avatar of Ted22
Ted22

asked on

Fedora gcc


I installed fedora core #4 and gcc will not compile many things I use.
Is there a way that I can install an older version of gcc in addition to version that comes with  fedora core #4.
I'm going to need good instructions on how to do this.
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

1. Go to http://gcc.gnu.org/ and download the version you want.
2. tar zxf gcc-xxx.tar.gz  or   tar jzf gcc-xxx.tar.bz2  to uncompress and untar the gcc source code. (xxx is version number)
3. as root
mkdir -p /usr/local/gnu
cd gcc-xxx
./configure --prefix=/usr/local/gnu/gccxxx   #<=== xxx is version number. For 3.2.2, xxx=322
make
make install
ln -s /usr/local/gnu/gcc322/bin/gcc /usr/local/bin/gcc
ln -s /usr/local/gnu/gcc322/bin/gcc /usr/bin/gcc322

So you can use /usr/bin/gcc322 or /usr/local/bin/gcc, which are point to the same gcc (usr/local/gnu/gcc322/bin/gcc)
Avatar of Ted22
Ted22

ASKER

Question:

What are all these?
What do I need?
File: gcc-3.3.4.tar.bz2        22785 KB        06/01/2004        12:00:00 AM
File: gcc-3.3.4.tar.gz       30059 KB       06/01/2004       12:00:00 AM
File: gcc-ada-3.3.4.tar.bz2       3436 KB       06/01/2004       12:00:00 AM
File: gcc-ada-3.3.4.tar.gz       4870 KB       06/01/2004       12:00:00 AM
File: gcc-core-3.3.4.tar.bz2       11300 KB       06/01/2004       12:00:00 AM
File: gcc-core-3.3.4.tar.gz       14835 KB       06/01/2004       12:00:00 AM
File: gcc-g++-3.3.4.tar.bz2       2031 KB       06/01/2004       12:00:00 AM
File: gcc-g++-3.3.4.tar.gz       2807 KB       06/01/2004       12:00:00 AM
File: gcc-g77-3.3.4.tar.bz2       1110 KB       06/01/2004       12:00:00 AM
File: gcc-g77-3.3.4.tar.gz       1445 KB       06/01/2004       12:00:00 AM
File: gcc-java-3.3.4.tar.bz2       3549 KB       06/01/2004       12:00:00 AM
File: gcc-java-3.3.4.tar.gz       4502 KB       06/01/2004       12:00:00 AM
File: gcc-objc-3.3.4.tar.bz2       202 KB       06/01/2004       12:00:00 AM
File: gcc-objc-3.3.4.tar.gz       249 KB       06/01/2004       12:00:00 AM
Avatar of Ted22

ASKER

Gnu make will have to use the older version of gcc.
I don't know how to make the connection unless I link gcc to the older version of gcc.
Avatar of Ted22

ASKER

I downloaded gcc-3.3.4.tar.gz
./configure
make
this is what happens
gcc-4.0.0-8 gives an error when compiling  gcc-3.3.4


fatal error: system.ads is incorrectly formatted
missing line for parameter: Configurable_Run_Time
fatal error: system.ads is incorrectly formatted
missing line for parameter: Duration_32_Bits
fatal error: system.ads is incorrectly formatted
missing line for parameter: Exit_Status_Supported
fatal error: system.ads is incorrectly formatted
missing line for parameter: Preallocated_Stacks
fatal error: system.ads is incorrectly formatted
missing line for parameter: Support_64_Bit_Divides
fatal error: system.ads is incorrectly formatted
missing line for parameter: Support_Aggregates
fatal error: system.ads is incorrectly formatted
missing line for parameter: Support_Composite_Assign
fatal error: system.ads is incorrectly formatted
missing line for parameter: Support_Composite_Compare
fatal error: system.ads is incorrectly formatted
missing line for parameter: Support_Long_Shifts
fatal error: system.ads is incorrectly formatted
missing line for parameter: Suppress_Standard_Library
compilation abandoned
make[1]: *** [ada/ada.o] Error 1
make[1]: Leaving directory `/opt/gcc-3.3.4/gcc'
make: *** [all-gcc] Error 2
Please do as my first post
./configure --prefix=/usr/local/gnu/gcc334  
Otherwise you will conflicg with your current gcc (4.0) version.
Avatar of Ted22

ASKER

Sorry for not following the directions the first time.
I still get errors. Tried several versions of gcc.

fatal error: system.ads is incorrectly formatted
missing line for parameter: Preallocated_Stacks
compilation abandoned
make[1]: *** [ada/ada.o] Error 1
make[1]: Leaving directory `/opt/gcc-3.4.4/gcc'
make: *** [all-gcc] Error 2
Avatar of Ted22

ASKER

./configure --prefix=/usr/local/gnu/gcc-3.4.4
amke
Fedora Core 4 just came out. I didn't have FC4 on hand.
I suspect that old gcc may not work on the FC4.
Could you provide the output of
/usr/bin/gcc -v
Avatar of Ted22

ASKER

[root@localhost /]# /usr/bin/gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050519 (Red Hat 4.0.0-8)
Avatar of Ted22

ASKER

I added the line

Preallocated_Stacks       : constant Boolean := False;

/opt/gcc-3.4.4/gcc/ada/system.ads

but I just get another error
Avatar of Ted22

ASKER

Look what I just found

16 June 2005

Some applications will NOT compile in GCC 4.0. You can install GCC 3.2
to allow compiling applications which do not yet support GCC 4.0. Make sure
to have the following RPM's installed. These are included with the CD's or
DVD or online. Running 'yum install' on these names will also work.

compat-gcc-32            (on CD-disk3)
compat-gcc-32-c++      (on CD-disk4)

To use either, run 'gcc32' or 'g++32'.
ASKER CERTIFIED SOLUTION
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial