Building Mesa from source and using Mesa master
Page: «3/3
  Go to:
Avehicle7887 5 Oct, 2019
I have a question, is there any way to compile Mesa by linking it to a custom libdrm folder? My system ships with an older version of the libdrm but I can compile 2.4.99 easily, all I need now is to configure Mesa to use the non-system shipped headers/libraries.

Thanks!
Shmerl 5 Oct, 2019
I actually wrote about this very issue in this thread before.

In such case I simply build a newer libdrm package for Debian and install it system wide. It's easier than pointing to some custom libdrm location when building. In your case you need both regular and dev package for building Mesa.

I wrote down for myself how to do it, so here is my note:

Let's say Debian still has older libdrm (let's say 2.4.97), and you want a newer one (2.4.99).

Make sure to have devscripts package installed.

wget https://dri.freedesktop.org/libdrm/libdrm-2.4.99.tar.gz -O $HOME/downloads/libdrm-2.4.99.tar.gz

mkdir -p $HOME/build/libdrm
cd $HOME/build/libdrm
sudo apt-get build-dep libdrm
apt-get source libdrm
cd libdrm-2.4.97
uupdate ~/downloads/libdrm-2.4.99.tar.gz
cd ../libdrm-2.4.99
dpkg-buildpackage -us -uc -nc

# You might need to add some missing symbol definitions along the way to match new upstream

To build 32-bit variant, use:

apt-get build-dep -a i386 libdrm
dpkg-buildpackage -a i386 -us -uc -nc

# You might need to install some gcc packages manually, since apparently build-dep -a i386 is not enough.

# Possibly dpkg --force-overwrite -i is needed, to work around changelog
conflicts in packages.
Avehicle7887 6 Oct, 2019
Quoting: ShmerlI actually wrote about this very issue in this thread before.

In such case I simply build a newer libdrm package for Debian and install it system wide. It's easier than pointing to some custom libdrm location when building. In your case you need both regular and dev package for building Mesa.

I wrote down for myself how to do it, so here is my note:


Thanks for the tips, I went ahead and compiled/packaged the new libs. Installation went smooth and the Mesa config did get to the next step. I still have a few outdated packages to work on but getting there.

Considering how old Debian 9 is, all the signs would tell me to go for something newer. It's been a fun learning experience though so I'll keep digging :)
Shmerl 6 Oct, 2019
Sure, upgrade to Debian testing, and avoid the mess. Even there such stuff as above is needed during freeze periods, that's why I was doing it. But for the most part it's up to date.
Shmerl 7 Oct, 2019
They did enable bulk moves, but afetr 5.4-rc1 (i.e. 5.4-rc2 has it). I can't test Aco yet, due to it being still quite buggy with Navi.
x_wing 10 Oct, 2019
Quoting: ShmerlThey did enable bulk moves, but afetr 5.4-rc1 (i.e. 5.4-rc2 has it). I can't test Aco yet, due to it being still quite buggy with Navi.

Maybe it improved a little bit: https://www.phoronix.com/scan.php?page=news_item&px=RADV-Navi-GFX10-ACO-Lands
Shmerl 11 Oct, 2019
Not yet. It's still work in progress.
Shmerl 20 Oct, 2019
Quoting: GuestMama mia

Does Star Citizen work for you with latest Wine/dxvk? I couldn't run the updater for it at all. See here.
sr_ls_boy 17 Aug
Shmerl,

what you you got going for a meson configure line these days? if you compile it yourself.
-Dvulkan-overlay-layer=true doesn't work anymore. Do you know how debian configures it?
Shmerl 17 Aug
Quoting: sr_ls_boyShmerl,

what you you got going for a meson configure line these days? if you compile it yourself.
-Dvulkan-overlay-layer=true doesn't work anymore. Do you know how debian configures it?

You can check my script to get the idea:

https://gist.github.com/shmerl/f4e5f76871239158cf083e37c5da56f4

I have something like this:

-Dvulkan-layers="['device-select','overlay']"

To check how Debian does it, I usually go to the tracker page: https://tracker.debian.org/pkg/mesa

Then look for the build logs link (buildd: logs): https://buildd.debian.org/status/package.php?p=mesa

Then select amd64 and click "Installed" (pretty obscure link on that page):
https://buildd.debian.org/status/fetch.php?pkg=mesa&arch=amd64&ver=22.2.0%7Erc2-1&stamp=1660228051&raw=0

You can find Meson invocation there.

I use that to periodically update my script if things change too much.

Last edited by Shmerl on 17 August 2022 at 11:32 pm UTC
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 with no article paywalls. We also don't have tons of adverts, there's also no tracking and we respect your privacy. Just 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 Twitter Sign in with Google
Social logins require cookies to stay logged in.