As usually i build my own LibreELEC from sources. My setup includes as graphic adapter a nvidia GT730, so, in distributions/LibreELEC/options I've cleaned up the GRAPHIC_DRIVERS variable leaving only "nvidia".
This way, mesa stops building and give me this error:
Problem encountered: EGL requires dri
I guess this is because the variable PKG_DEPENDS_TARGET in package.mk, although is properly formed, is not honored in the build process, so packages from which mesa depends are not built (all the X11 stuff).
If i add to the variable GRAPHIC_DRIVERS in distributions/LibreELEC/options a gallium3D driver such r600, build process picks its dependencies which satisfy the mesa package and i got no errors.
Unfortunately, despite what meson web site claims, it is not a user friendly build system, so no help from logs