Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can donate through PayPal, Flattr, Liberapay or Buy us a Coffee. You can also buy games using our partner links for GOG and Humble Store.
  Go to:
Building Mesa from source and using Mesa master
Shmerl commented on 2 July 2018 at 7:55 pm UTC

A thread for those who use latest available Mesa (including building it from source).

Just a reminder, I made this guide a while back which can be useful for some.

Shmerl commented on 2 July 2018 at 8:04 pm UTC

For those testing dxvk, it's often recommended to use latest libllvm trunk. It's a bit annoying to deal with in Debian, since latest snapshots are outdated, and building llvm itself from source is a tedious exercise if you just want latest Mesa with it.

Luckily, llvm developers provided these repositories with fresh nightly packages:

For Debian testing I used one for unstable, and it worked well. For instance, for building Mesa you can install:


Debian packages commonly give snapshot versions simple numbers like 7, while release versions use 6.0 and the like.

After you build Mesa and place it in your custom directory, it's also a good idea to extract .so files from the current libllvm-<ver> snapshot package and place it in the same directory. This way your bundle will be consistent until your next Mesa building.

Shmerl commented on 21 September 2018 at 7:59 pm UTC

Mesa allows building with llvm linking statically. That's a good method to avoid bundling llvm after the build explicitly.

So far I'm using --enable-llvm-shared-libs=no

I guess soon I'll need to switch to Meson anyway. Debian will need to catch up.

Shmerl commented on 25 December 2018 at 11:51 pm UTC

Building Mesa with Meson and ninja is crazy fast!

Shmerl commented on 26 December 2018 at 3:48 pm UTC

Please contribute some constructive comments. Not "it's useless to compile Mesa". I'm not interested in flaming in this thread.

I already explained reasons why I don't want to install custom Mesa from repos - it replaces the default one. Of course I could go ahead and make my own Debian packages for custom installation, that don't interfere with default Mesa, but that's an extra step. May be I'll do that at some point.

Shmerl commented on 27 December 2018 at 12:05 am UTC

Updated build script here to use Meson. I'll update the Wiki later a bit.

Shmerl commented on 27 December 2018 at 5:22 am UTC

Filed llvm / clang bug to split Debian packages into regular and multilib variants. If llvm developers can do that, it will re-enable cross compiling 32-bit Mesa in 64-bit Debian, without the need for 32-bit VMs, containers or chroots.

Shmerl commented on 23 January 2019 at 1:18 am UTC

Now that Debian finally entered deep freeze, packages like libdrm started falling behind and Mesa master doesn't build anymore as is. Is there a nice way to build it with libdrm from source? Or I need to hack around manually setting up Meson rules for custom libdrm location inside Mesa?

Shmerl commented on 23 January 2019 at 3:32 am UTC

My goal is not to make Debian packages but to build the result. If you want to package it nicely - feel free to do it (Oibaf provides nothing of the sort I'm doing, I already explained it above). Figuring out how to build it is the hard part.

Shmerl commented on 23 January 2019 at 3:56 am UTC

I don't need such kind of packages though, I already explained it above. Because packages replace system installation, and make it globally installed. And building will depend on system installed libdrm, which again isn't something that suits my case.

That can also depend on how destabilizing new libdrm is. I.e. if new libdrm is stable enough, it might be OK replace it globally. But it would be better to figure out how to do it in the same Mesa above is used, i.e. isolated usage.

The_Aquabat commented on 5 February 2019 at 9:12 pm UTC

If anyone using opensuse wants to try out, I just compiled a build of mesa 19.0.0 rc1 into build opensuse.

I usually do that on mesa RC releases.
check it out.

you need llvm8 and some other packages from home:khnazile.

  Go to:

You need to Register and Login to comment, submit articles and more.

Or login with...

Livestreams & Videos
Community Livestreams
Popular this week
View by Category
Latest Comments
Latest Forum Posts