Own Built Mesa not working on Raspberry 64bit Ubuntu - Can't Find: swrast_dri.so

Hello!!
So I’m trying to get the very latest Mesa from the Git repo running on my Ubuntu 64bit Raspberry Pi4b install. I’m following my own notes that worked on Raspbian (32bit).

The build works fine and I get the new GL .so lib files.
But when I try to run ‘glxinfo -B’ I get Error messages saying it fails because it can’t find
swrast_dri.so. It says it’s looking in two different paths but none of those are the paths where that file is installed by default, which is:
/usr/lib/aarch64-linux-gnu/dri/swrast_dri.so

Is this a library that should be re-built by Mesa itself?

If it’s not, how can I make Mesa find that file?

Cheers!

swrast_dri.so is part of Mesa. libGLX_mesa.so is responsible for loading drivers.

Note that the environment variables LIBGL_DRIVERS_PATH and LIBGL_DRIVERS_DIR can override the default search path coded into the library.

Ok great to know it’s supposed to come with Mesa.
Mesa is building about 20 .so files to ‘/usr/lib/dri’ but those don’t include swrast_dri.
The only swrast_dri.so file on the system is an old one in that path I mentioned above.

Might I be missing something important in my config line? I’m using this:

meson --prefix /usr --libdir lib -Dplatforms=x11 -Dvulkan-drivers=broadcom -Ddri-drivers= -Dgallium-drivers=v3d,kmsro,vc4 -Dbuildtype=release build

EDIT: The build does give me these dri libs:

-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 vc4_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 v3d_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 sun4i-drm_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 stm_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 st7735r_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 st7586_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 rockchip_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 repaper_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 pl111_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 mxsfb-drm_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 mi0283qt_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 meson_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 mediatek_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 mcde_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 mali-dp_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 kirin_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 ingenic-drm_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 imx-drm_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 imx-dcss_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 ili9341_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 ili9225_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 hx8357d_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 exynos_dri.so
-rwxr-xr-x 24 root root 19156448 Sep 18 21:13 armada-drm_dri

Correction: it used to be part of Mesa. Apparently it was removed in 21.0.

Which suggests that you have older versions of the libraries around and glxinfo is using them.

Ahh ok. That might be it then.
I actually managed to get glxinfo to return the right stuff but Iv’e done a couple of things so not sure which helped.
For example I installed lightdm and switched window manager to ‘Openbox’. The Desktop is now much snappier so maybe its actually using hardware rendering for window drawing now.
(That’s not what I was trying to achieve btw, Mesa is for a project)

Thanks for your time and help!