Backtrack:  
 
by lunarg on November 5th 2007, at 16:48

Got a curious error during the merge of the latest VirtualBox ebuild for Gentoo:
it fails with a die:

Quote
kmk failed

It took a bit, but looking around the output gave some indication of a problem with one or more dependencies. Looking around the Gentoo Forum, I came across this thread, which had the proper solution.

The error, more in full, is attached.
A bit more to the top of the error (sorry, but couldn't capture the right line as the new merge was already busy), it complains about Xmd.h, and GLXext.h. In that way, the solution provided by the forum thread I mentioned earlier, makes sense. In my case, issuing the following commands did the trick:

mikuru ~ # eselect opengl set xorg-x11
Switching to xorg-x11 OpenGL interface... done
mikuru ~ # USE="additions" emerge -u virtualbox
.
.
.
mikuru ~ # eselect opengl set nvidia
Switching to nvidia OpenGL interface... done
mikuru ~ #

As explained, first I switch (temporarily) to the Xorg OpenGL implementation, then I do the merge, and finally, I return to the nVIDIA interface.

Notice
If you have an ATI card, and are using the closed-source ATI drivers, substitute nvidia with ati.