I could not wait to try the latest Firefox version after all the hype. I’ve been running Nightly on my Phone and my work computer ever since 57.0 landed in nightly (So 6 months ago?). I’ve finally got around to updating my main Gentoo box.

After doing a sync, and doing a quick emerge @world I see the lovely picture that is blocking dependencies.

emerge Firefox build output with llvm and mesa build blocking

So I do what any idiot does, and just quickly delete the problem packages as they are going to be reinstalled anyway. (FYI, don’t do this) emerge --unmerge sys-devel/clang && emerge --unmerge sys-devel/llvm

The problem is Mesa

I’ve finally figured out how to do this Gentoo thing. So a run down of the image results in:

  • llvm-5.0.0 is getting pulled in to satisfy the requirements of Firefox,
  • llvm-3.9.1-r1 is getting pulled in because of clang-3.9.1.
    • But its also being pulled in because of mesa-17.0.6.
  • clang-5.0.0 is already getting pulled in as well.

So going back to proving how I’ve semi-sorted this Gentoo thing out. Quickly open up the package page for mesa (which is here for the lovely readers) and low and behold, the last version to be marked as stable for Amd64 is 17.0.6. The 17.0.6 ebuild file contains the following gem:

    llvm? (		
    .... some other depenancy things ...
            || (

The ebuild for 17.0.6 does not allow mesa to be build with llvm-5. It has to be an item before llvm-5. To confirm that moving to an “unstable” branch will actually sort out my problem, I double checked 17.2.1 ebuild to guarantee that my building would work successfully. And low and bedhold, no more <sys-devel/llvm-5.

So a quick edit to our package.keywords file to allow us to move ahead in the world. echo '>=media/libs/mesa-17.0.6 ~amd64' | sudo tee -a /etc/portage/package.keywords and I’m off to building Firefox again!

Now for the astute reader you would realise that 17.1.8 which is nearly all green except for amd64, which does not have the same problem. If that ever makes it to stable, then everyone would have a good time. But up until then. We are building mesa on an “unstable” branch.
Yes it is possible to only build 17.1.8 by only allowing the specific atom in package.keywords like so: echo '=media/libs/mesa-17.1.8 ~amd64' | sudo tee -a /etc/portage/package.keywords But honestly. I’d rather build on the latest and if/when I get issues, report them upstream ^.^