I'm not sure why I didn't have this problem before. Anyway, I'm installing mesa to ~/.local, which means dri drivers are installed in ~/.local/dri. Mesa correctly finds the drivers (eg. ~/.local/lib/dri/i965_dri.so), but dlopen fails loading the driver since it fails to find libdricore.so and other libraries in that directory because ~/.local/lib/dri is not in my LD_LIBRARY_PATH, only ~/.local/lib is. I think the libdricore.so and libglsl.so should be installed to $libdir, and only the modules to $libdir/dri.
Afaict the dri modules always were special as they are modules, and one should point to them via LIBGL_DRIVERS_PATH. For everything else that starts with "lib" LD_LIBRARY_PATH comes into play. For quite some releases mesa has stopped providing both libdricore and libglsl. As such I would close this as obsolete/wontfix.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.