Doesn't Not Compute

My log of experiences with GNU/Linux and computers in general.

emerge n00b

Lately I’ve been trying out Gentoo Linux. (It’s GNU/Linux, in my view, but that’s a whole different discussion.) For me, someone for whom experimenting with and using various distros has been a major hobby for several years now, it’s a fun operating system. I like having the option to have a full GUI with popular software, a la Linux Mint, if the machine can handle it; I also like the system to be as responsive and fast-booting as possible. Which isn’t always what Linux Mint is — and why I like Arch Linux so much.

But Arch Linux isn’t always perfect for me — I’ve had a great gaming machine put together, running Elder Scrolls 3: Morrowind with some mods in WINE at an enjoyable 34FPS or so before. And then I made the mistake of updating without checking to make sure the FGLRX driver worked with the new kernel, Xorg version, or other software. ๐Ÿ˜ณ And I stupidly cleared my pacman cache before testing anything, just assuming everything would still work as it had for several months. ๐Ÿ˜ณ *insert facepalm here*

So, several months later, I thought back to that.

“You know, I really liked the speed of that Arch gaming rig, and I want to build a home server like that guy at college had. But Arch changes too much. And I don’t like having to edit PKBUILDS to not install things as build-dependencies. I liked those Gentoo Portage USE flags . . . ooh, it’s teh kitteh!”

*several minutes later*

“Hmm, what was I thinking about?”

*twenty more minutes, and a can of spinach, later*

“Oh, right, the Gentoo thing. Hmm. Well, now that I have better machines than that 800MHz PIII Gateway I tried it on before, why not?”

Yes, that was my actual thought-process. ๐Ÿ˜›

Anyway, the Gentoo Handbook was more than sufficient to get me up-to-speed again and install everything — and using only ~20MB of memory with Xorg, IceWM, and a terminal running after a ~10 second boot (after GRUB) was more than sufficient to convince me to stick with it. I later wiped that installation out for another project, despite having taken about five hours to install and another two to get a working fully-minimalized kernel compiled, but I’m too much of a Gentoo-fan to leave it now.

Now, for my point.

I installed Gentoo again on an HP Pavilion a1130n, this time as a 64-bit home-server project. Even though I plan to not allow it to access the internet, I decided to make it Hardened Gentoo for the experience. No problem, just had to switch to a hardened, no-multilib profile, re-emerge the toolchain, and “emerge -e world”, right?ย  Right, I suppose — except I also wanted to bootstrap the install so that EVERYTHING was optimized for my processor.

Both were explained, between the regular Gentoo FAQ and the Hardened Gentoo FAQ — but I didn’t see anything about doing both at once, so I guessed. I changed to the hardened-nomultilib (not it’s real name, but shortest summary) and then ran the script as described in the Gentoo FAQ here. Some time later, it finished rebuilding the C library and the toolchain, and I tried the final step listed in the process the FAQ described:

emerge -e world

only to get a rude error on the second package — the compiler couldn’t be found. ๐Ÿ˜ฎ

I did some digging (Scroogled for the error message) and discovered that the GCC profile probably wasn’t valid anymore, and that I needed to change it.

“Well, how do I do that?”

*more searches*

“Okay . . . gcc-config -c, get the current profile — yep, current profile invalid. List profiles, gcc-config -l . . . and set to that profile. Try emerge -e world again — WHOA, it worked!!”

Don’t you love it when mistakes are that easy to fix? :mrgreen:

So, to summarize: if you try to bootstrap your system according to the Gentoo FAQ’s instructions, and you can’t compile anything afterwards, it might be because by re-emerging the compiler you got a newer version and your gcc profile is no longer up-to-date. Just

  • “gcc-config -c” to see if it says the currently selected profile is invalid
  • “gcc-config -l” to see what profiles are available
  • “gcc-config x”, where x is the profile listed.

No guarantees, but this was the problem in my case and this fixed it. ๐Ÿ™‚ Happy Gentooing, and may the Source be with you.

P.S.: This really helped me figure things out. (Caution, link is to — might want to clear your cookies after you visit.)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: