[SOLVED] Upgraded GCC on Gentoo, different GCC version used when not root.
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495
Rep:
Upgraded GCC on Gentoo, different GCC version used when not root.
On my Gentoo system, I had upgraded the gcc to match the version of gcc on another computer that would be a helper computer with distcc. I followed the Official Gentoo Docs on upgrading GCC. I recompiled libtool. Why am I using a different gcc version when I am my user than when I'm root? Even if run gcc-config -l as my user and not the root user, it shows the newer gcc selected, but that is not really the one being used.
Well, I have the same configuration on my distcc system, and except very few packages, everything compiles and runs fine, despite the gcc version mismatch.
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495
Original Poster
Rep:
I ran an emerge --depclean, and it removed the older gcc version and left just the new one. So now when I type gcc -v as non root, it shows the same new version that is shown when I typed gcc -v as root.
BTW, It's highly discouraged to use gcc versions that aren't the same with distcc. Everywhere I've read about distcc, it has said that. However, I have also read that it is ok to be off by one point release eg. if your versions are both 4.5.x eg. one is 4.5.6 and the other is 4.5.8. I suggest you look at the system with the older gcc version, and then upgrade it to be the same as the system with the newer version. For me, I did added this, and then upgraded my gcc. Be sure to read the Gentoo's Upgrading GCC guide. You will need to rebuild libtool and depending on your gcc version, you may need to do a few additional steps. I've had absolutely no problems with any of this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.