Problems building 32bit mesa

I figured I’d ask here first in case anyone else has tried to build 32bit mesa on Arch or EndeavourOS.

I logged a bug with mesa, and they want me to bisect to find the commit that is causing the issue. I can build the 64bit version not problem, but in this case I need to build 32bit. I read through their documentation and can’t seem to get it to work.

The command I’m running to configure is:

meson --cross-file=x86-linux-gnu --prefix=“${PWD}/build_22.2.1” build_22.2.1/

The x86-linux-gnu file is the one from here that the documentation says to use.

The first time I ran it, it complained that pkconfig could not find wayland-protocols. Sure enough, the file wasn’t under /usr/lib32/pkconfig but under /usr/share/pkgconfig/, so I copied the file over and that seemed to work. Now it’s complaining that it can’t find the x11 dependency. The file /usr/lib32/pkgconfig/x11.pc does exist and the paths in the file are valid. The entire log file can be found here: https://pastebin.com/MUn1JvKK

Any help would be appreciated.

thats the official PKGBUILD with all build requirements included - i am regularly building mesa with that with no issues - it should help you get the things right

Thank you. I’ll give it a try and see how it goes.

Ok, so I got it to build now using that PKGBUILD as an example. However, I can’t seem to get it to use the version that I built. I’m testing with glxinfo32 like this:

LD_LIBRARY_PATH=/home/cain/dev/mesa/build_22.3.1/bin/usr/lib32/ glxinfo32 | grep OpenGL

It reports back mesa version 22.2.3, which is the system version since I rolled it back. It doesn’t seem to want to use the libraries at that path, which should be 22.3.1. I also tried to use the libraries built simply using makepkg and it also does not work.

I’m pretty unfamiliar with what I’m doing, so I’m sure it’s something simple that I’m missing.