Wednesday, May 06, 2009

If You're Not A Gentoo User, Move Along...

Whenever I spend time sifting through Internet forums looking for the solution to a technical problem, I like to post a description of the problem along with the solution in a straightforward manner, so that the next person who has the same problem will be able to find my post when they search. This is one such posts. I ran into a frustrating error when updating the software on a Gentoo Linux system that hadn't been updated in a while. I started with:
emerge --sync && emerge -avuDN world
And when that was (finally) done, I ran:
emerge -av --depclean
Which uninstalled a bunch of packages. The problem came when I ran:
revdep-rebuild -- -av
Nothing would emerge. Nothing. Every package I tried to emerge would end in the error:
configure: error: C compiler cannot create executables
The root problem turned out to be a bug with the way that the gcc ebuild updates from certain versions. Portage was configured to use a compiler version that no longer existed on the system. The solution was to run:
binutils-config -l binutils-config num gcc-config -l gcc-config num
Where num above is the numerical selection of one of the items on the list output by the previous command. My gcc-config selection told me when I selected it that it had a bug with GCC_SPECS and to re-emerge it, so I did that. I probably didn't have to, but it's good to be cautious and I had a few hours to kill (this is a 1GHz Pentium III system). After that, I was good to go.

No comments:

Post a Comment