LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-18-2005, 11:24 PM   #1
aladin
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Rep: Reputation: 0
How to change the gcc compiler's default version?


hello everyone
I have a system of FC4, I want to change the default gcc compiler to gcc3.2 not gcc4.0 for installing mplayer,how should I do?
Thanks!

Aldin
 
Old 08-19-2005, 03:54 AM   #2
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
./configure CC=/path/to/gcc/of/your/choice
 
Old 09-11-2005, 10:16 AM   #3
RottenMutt
Member
 
Registered: Jul 2003
Location: dfw
Distribution: Latest Fedora Release
Posts: 186

Rep: Reputation: 30
can i install another version of gcc with gcc 4 installed?
I'm trying to instal mplayer and it wants gcc 2.95.x or 3.2.x

Code:
 rpm -q -a | grep gcc
gcc-gfortran-4.0.1-4.fc4
gcc-c++-4.0.1-4.fc4
gcc-4.0.1-4.fc4
gcc-java-4.0.1-4.fc4
libgcc-4.0.1-4.fc4
where do i get a rpm of gcc 3.2 and do i just install it as "rpm -ivh"?
thanks for the help

Last edited by RottenMutt; 09-11-2005 at 10:27 AM.
 
Old 09-11-2005, 12:16 PM   #4
RottenMutt
Member
 
Registered: Jul 2003
Location: dfw
Distribution: Latest Fedora Release
Posts: 186

Rep: Reputation: 30
help please
 
Old 09-11-2005, 01:45 PM   #5
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
sory i use slackware so i can only gues

to install other versions of gcc just do this

rpm gcc-version --prefix=/opt/gcc-version



then to use this gcc for compiling

./configure CC=/opt/gcc-version/bin/gcc
 
Old 09-12-2005, 09:43 PM   #6
RottenMutt
Member
 
Registered: Jul 2003
Location: dfw
Distribution: Latest Fedora Release
Posts: 186

Rep: Reputation: 30
Quote:
Originally posted by thermite_1033
to install other versions of gcc just do this
rpm gcc-version --prefix=/opt/gcc-versionc
I tried but it didn't install. nothing in "/opt/ gcc-3.4.2-6" and rpm -q -a | grep gcc yeilds version 4
 
Old 09-13-2005, 08:58 AM   #7
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
have you tried it with the option "rpm --root=/opt" ?
 
Old 09-13-2005, 10:08 AM   #8
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,278

Rep: Reputation: 1087Reputation: 1087Reputation: 1087Reputation: 1087Reputation: 1087Reputation: 1087Reputation: 1087Reputation: 1087
You can control the version of GCC that is invoked with the GCC_EXEC_PREFIX environment-variable. Refer to info gcc for more details.

It is actually quite common to have more than one version of a compiler installed on the system at the same time. People who are "cross-compiling" applications (running a compiler on machine-X that generates code for machine-Y) do this all the time.

It can also be useful to read the section about specs files. The info node under "spec files" says this:
Quote:
gcc is a driver program. It performs its job by invoking a sequence of other programs to do the work of compiling, assembling and linking. GCC interprets its command-line parameters and uses these to deduce which programs it should invoke, and which command-line options it ought to place on their command lines. This behavior is controlled by "spec strings." In most cases there is one spec string for each program that GCC can invoke, but a few programs have multiple spec strings to control their behavior. The spec strings built into GCC can be overridden by using the -specs= command-line switch to specify a spec file.

"Spec files" are plaintext files that are used to construct spec strings. They consist of a sequence of directives separated by blank lines....

Last edited by sundialsvcs; 09-13-2005 at 10:17 AM.
 
Old 10-09-2005, 08:07 PM   #9
RottenMutt
Member
 
Registered: Jul 2003
Location: dfw
Distribution: Latest Fedora Release
Posts: 186

Rep: Reputation: 30
I have tried to install but no luck... I'm trying to install gcc-3.4 so i can compile mplayer.

rpm -ivh --prefix /opt/gcc-3.4.2-6 gcc-3.4.2-6.fc3.src.rpm

the above don't work
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM
How to change system default dbus to version 0.23??? okeyla Linux - Newbie 0 10-27-2005 02:31 AM
redhat fedora gcc version (compiled for 2.4.20) doesn't match kernel version 2.4.22 start1000 Linux - Software 0 03-16-2004 08:17 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 12:07 AM
Sample Driver Module incompatibility with Kernel version (or gcc version) jvs Linux - General 1 06-07-2002 01:40 AM


All times are GMT -5. The time now is 12:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration