LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2012, 11:45 AM   #1
kareempj
LQ Newbie
 
Registered: Mar 2012
Posts: 18

Rep: Reputation: Disabled
Trying to go back to old version of gcc


Hey guys I have a very serious problem, I was currently building a cross compiler with gcc and gcc did not build correctly however I already had a previous version of gcc on the system (gcc 4.5.3) which was completely functional, now after my build failed with gcc 4.7.0, my old gcc compiler seems not to work any more since my targets and paths all point to the broken gcc. If I issue the gcc -v command I get the following message:

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: ../sources/gcc-4.7.0/configure --target= --prefix= --without-headers --with-newlib -v
Thread model: posix
gcc version 4.7.0 (GCC)

The sources folder with gcc 4.7.0 no longer exists, I am wondering if there is any way to go back to the previous working version of gcc and remove all traces of the broken one!

Please any help will be appreciated!
 
Old 04-16-2012, 12:07 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Generally : You can have as many versions of gcc as you want,
installed at the same time.
( If they all are in e.g. /usr/, the option '--program-suffix='
must to be used. Example: --program-suffix=47 will provide gcc47, g++47).

Only the binaries can have convergent names / locations.
(gcc cc g++ c++ libgcc_s*).
All other files have unique locations like /usr/lib/gcc/<??>/4.7.0/<?>

A reinstall of any previous version will overwrite the gcc-4.7.0 binaries.
If the same '--prefix=$PREFIX' is used again, e.g. --prefix=/usr/

.
 
  


Reply



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
Install back version of gcc ufmale Linux - Newbie 5 05-01-2010 04:38 PM
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM
Installed GCC version doesn't match the version the kernel was compiled with AlucardZero Linux - Software 2 02-07-2008 10:24 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:19 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration