LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   installing another version of gcc (https://www.linuxquestions.org/questions/linux-newbie-8/installing-another-version-of-gcc-335727/)

kulmis 06-21-2005 08:16 AM

installing another version of gcc
 
Hi,

How can I install another version of gcc without deleting the current version on my computer? What I want to do is to compile a kernel module which should be done with the same gcc version with which the kernel was compiled. I have updated the system after installing so now the gcc is newer than the version used to compile the kernel.
I wouldn't want to downgrade my current gcc nor update my kernel.

I'm running Fedora Core 3.

PTrenholme 06-21-2005 08:40 AM

First, check to see what you have installed:
Code:

$ gcc<tab>tab>
on my systems shows
Code:

gcc              gcc32            gccmakedep-i386
gcc3            gccmakedep
$ gcc --version
gcc (GCC) 4.0.0 20050606 (Red Hat 4.0.0-11)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc3 --version
gcc3 (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-47.fc4)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc32 --version
gcc32 (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-47.fc4)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Often installing a new compiler version leaves the old one available.

kulmis 06-21-2005 09:32 AM

Quote:

Originally posted by PTrenholme

Often installing a new compiler version leaves the old one available.

I have only one version installed.

foo_bar_foo 06-21-2005 01:24 PM

it depends a bit on what version you are looking to add
basically you put them in the /opt directory
since it's a bit hard to explain in detain without knowing exactly what you are doing
the best thing is to get a copy of the lateset
Beyond Linux from Scratch book from cvs and in there are instructions for compiling
GCC-3.4.1
GCC-2.95.3
GCC-3.3.4
(these are kind of the standard ones)
complete with patches configure and details so they will work right


All times are GMT -5. The time now is 09:27 PM.