Building Mesa from source and using Mesa master
Page: 1/3»
  Go to:
Shmerl Jul 2, 2018
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 Jul 2, 2018
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: http://apt.llvm.org

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

llvm-7-dev
libclang-7-dev


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 Sep 21, 2018
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 Dec 25, 2018
Building Mesa with Meson and ninja is crazy fast!
Shmerl Dec 26, 2018
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 Dec 27, 2018
Updated build script here to use Meson. I'll update the Wiki later a bit.
Shmerl Dec 27, 2018
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 Jan 23, 2019
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 Jan 23, 2019
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 Jan 23, 2019
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.
skyrrd Apr 13, 2019
Any news about building mesa-git on Debian? Is a chroot or vm still needed? I'm currently eyeing the switch to debian buster, but having to use older versions of mesa is holding me back. I know of ppas but I would prefer to build mesa myself
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.

Buy Games
Buy games with our affiliate / partner links: