Fedora Linux Support Community & Resources Center
  #1  
Old 7th July 2009, 05:59 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
Revert to original c++ compiler

I accidentally over wrote the default c++ that ships with F11 when I compiled the svn version of gcc. Is there a way I can set everything back to defaults? That is, reinstall gcc and set environment variables back to normal?

Thanks,
Dave
Reply With Quote
  #2  
Old 7th July 2009, 07:47 PM
John5342 Offline
Registered User
 
Join Date: Jan 2008
Location: /dev/darkness
Posts: 103
Because the version of gcc you installed is not tracked in any way its going to be difficult to uninstall. Some automake projects allow uninstalling with:
Code:
make uninstall
After that you can:
Code:
yum reinstall "gcc*"
aswell as any other packages your install may have over written and then hope there aren't any leftover files waiting to trip you up. After that if things don't work you will probably have to do an audit based on rpm file lists to see what files might have been left over from you install.
__________________
F15 x86_64 - AMD FX60 - 4GB DDR - 4x 1TB RAID0 - 2x 9800GX2
F15 x86_64 - AMD64 X2 3800+ - 1GB DDR - 2x 750GB - 7800GT
OOKernel OS - AG2 GCU - 32TB ARAM - 1TB PRAM - AG1 TCU
Reply With Quote
  #3  
Old 7th July 2009, 08:07 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
ok - figured yum reinstall gcc* was a bad idea, but I'll try it . One time I tried to reinstall perl and my whole system got hosed...
Reply With Quote
  #4  
Old 7th July 2009, 10:01 PM
John5342 Offline
Registered User
 
Join Date: Jan 2008
Location: /dev/darkness
Posts: 103
Quote:
Originally Posted by daviddoria View Post
ok - figured yum reinstall gcc* was a bad idea, but I'll try it .
I don't exactly like yum reinstall myself but if you want your old version of gcc back then you don't have much choice. I have however for various reasons had to use it myself a number of times and so far i havent had any issues caused by the reinstalling.

Quote:
Originally Posted by daviddoria View Post
One time I tried to reinstall perl and my whole system got hosed...
Perl has a lot more configuration files and the like that can get messed up and a yum reinstall doesn't touch configuration files unless you delete them first. Another issue that can apply to perl. It uses directories to store modules. If a module just loads all modules in a given directory then it could also load any additional leftover files which may be in compatible. Thats an issue that doesnt generally apply to C/C++.

After a quick look at the gcc spec file it doesn't seem to have any configuration files so it should in theory just work afterwards.

Fingers crossed.
__________________
F15 x86_64 - AMD FX60 - 4GB DDR - 4x 1TB RAID0 - 2x 9800GX2
F15 x86_64 - AMD64 X2 3800+ - 1GB DDR - 2x 750GB - 7800GT
OOKernel OS - AG2 GCU - 32TB ARAM - 1TB PRAM - AG1 TCU
Reply With Quote
  #5  
Old 10th July 2009, 04:52 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
Hmm after reinstalling I get:

Code:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
when I try to run gcc. Any more thoughts ??

I found online to also reinstall glibc* and gdb* - I did that and saw no change!

Last edited by daviddoria; 10th July 2009 at 05:44 PM.
Reply With Quote
  #6  
Old 10th July 2009, 08:36 PM
John5342 Offline
Registered User
 
Join Date: Jan 2008
Location: /dev/darkness
Posts: 103
cc1plus is part of the package gcc-c++

Just to make sure you have it installed:
Code:
yum install gcc-c++
If it is installed but still no luck then there it is probably failing to replace your custom g++ which may be pointing to a different cc1plus. Try deleting /usr/bin/gcc and /usr/bin/g++ before reinstalling again:
Code:
yum reinstall gcc\*
Other than that i am running out of ideas besides an audit. If you are out of luck with the above then let me know and i will try and remember the appropriate incantations to get the list of out of place files.
__________________
F15 x86_64 - AMD FX60 - 4GB DDR - 4x 1TB RAID0 - 2x 9800GX2
F15 x86_64 - AMD64 X2 3800+ - 1GB DDR - 2x 750GB - 7800GT
OOKernel OS - AG2 GCU - 32TB ARAM - 1TB PRAM - AG1 TCU
Reply With Quote
  #7  
Old 10th July 2009, 08:44 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
phew - it's working!

I deleted the /usr/lib/ccache folder and then did
yum reinstall "gcc*"

I noticed a bunch of errors complaining about trying to make symlinks to /usr/lib/ccache. So I did
yum reinstall "ccache*"

then

yum reinstall "gcc*"

and it is working!

Very odd... I guess like you said some link was not getting updated properly, but when the thing it was linking to was deleted, it added it and updated the link.

what is cc1plus anyway?? Since it is part of ccache, I'm assuming it has something to do with the cached compiling speed-up thing?

Thanks for all the help!

Dave
Reply With Quote
  #8  
Old 10th July 2009, 08:52 PM
John5342 Offline
Registered User
 
Join Date: Jan 2008
Location: /dev/darkness
Posts: 103
cc1plus is actually the c++ compiler. gcc is simply a driver program that calls the right combination of programs (cc1plus, cc1, linkers, etc).

Given how you solved it i would say the problem was that ccache stores precompiled object files so that if the same combination of sources and option flags etc are called again instead of compiling all over again it just returns the precompiled objects. It would appear that ccache also remembers the compilers that were used so when you changed the compiler it got confused. Clearing out the cache may well have fixed it.
__________________
F15 x86_64 - AMD FX60 - 4GB DDR - 4x 1TB RAID0 - 2x 9800GX2
F15 x86_64 - AMD64 X2 3800+ - 1GB DDR - 2x 750GB - 7800GT
OOKernel OS - AG2 GCU - 32TB ARAM - 1TB PRAM - AG1 TCU
Reply With Quote
  #9  
Old 10th July 2009, 08:53 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
So how would I clear the cache? Just delete the /usr/lib/ccache folder? It seems to contain exectuables like gcc, g++, etc?
Reply With Quote
  #10  
Old 10th July 2009, 08:58 PM
John5342 Offline
Registered User
 
Join Date: Jan 2008
Location: /dev/darkness
Posts: 103
When compiling as a user ccache stores the precompiled objects in your home dir under ~/.ccache so deleting this folder should clear the cache.
Code:
rm -Rvf ~/.ccache
__________________
F15 x86_64 - AMD FX60 - 4GB DDR - 4x 1TB RAID0 - 2x 9800GX2
F15 x86_64 - AMD64 X2 3800+ - 1GB DDR - 2x 750GB - 7800GT
OOKernel OS - AG2 GCU - 32TB ARAM - 1TB PRAM - AG1 TCU
Reply With Quote
Reply

Tags
compiler, original, revert

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiler Option GCC, Intel Compiler, PathScale mounterriver Using Fedora 2 8th November 2009 02:31 PM
Revert to original desktop effects pescobar Using Fedora 1 9th May 2009 11:52 PM
revert to FC6 > from F7 Wangberg EOL (End Of Life) Versions 7 1st July 2007 06:21 AM
Revert to old icons wesamel Using Fedora 0 24th November 2006 03:11 AM


Current GMT-time: 13:40 (Monday, 01-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat