Gentoo “hardened” multilib?

I had some system problems yesterday.  My VMware guests just stopped.  Middle of the day and they just died.  I tried to run the management console or even the command line programs, but they all failed with the infamous “VMware is installed but is not configured for this system…” message and the prompt to run vmware-config.pl.  I re-emerged vmware-server and vmware-modules with no luck.  vmware-config.pl was failing trying to run vmware-vmx at the serial number check, the error was “No such file or directory”.  But there it was, right where it was supposed to be, permissions correct and everything…

Knowing that generic error can apply to a missing file that the program is trying to execute, I checked what type of file I was looking at: file reported a dynamically linked program.  Great, run ldd to find out what it wants: ldd reports “not a dynamic executable”.  Oh dear.  It was starting to look like a long night was ahead.

I jumped on the Googleweb and discovered that others had encountered the problem I was seeing, but the hits were all a couple of years old.  Their problems seemed to be caused by missing 32-bit libraries on a 64-bit system.  How could this happen?  In older Gentoo releases you had to choose multilib, but according to most of the doco all profiles are multilib unless you choose a “non-multilib” profile (this explained the fact there were few-to-no recent hits for the issue).

Recently I had switched to the hardened profile…  I had a look, and there is a separate “multilib” profile in hardened.  So is the doco wrong: are all profiles multilib except ones called “non-multilib” AND except hardened because they have a different rule?

I had two choices then, try out the hardened multilib profile, or switch back to the previous profile I used.  Considering I hadn’t enabled any Hardened features and don’t really have time to figure it all out at the moment any (I only did it to get rid of the “unsupported profile” warning I get every time I merge a package), I copped out and switched back to the old profile.

Then I had the next issue: I couldn’t use the non-multilib gcc and glibc to build multilib versions of gcc and glibc.  The gcc build complained about a missing 32-bit header (should have been part of glibc) and the glibc build complained that cpp failed sanity test.  Again the Googleweb came to the rescue, pointing me to a Gentoo repository containing binary packages of gcc and glibc that I could apply.  They allowed me to rebuild my own gcc and glibc.

At this point I found that the vmware-config.pl script could run again.  I was BACK!  I started VMware services, ran the managment console, and started my VMs.

I think I get a bit complacent with my home gear sometimes; switching profile to hardened was something I almost did on a whim, and it’s bitten me fairly badly.  Lesson learned.

Leave a comment