meson toolchain leaves out PKG_DEPENDS_TARGET and mesa fails to buid

  • 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:rolleyes:

  • Thank you 5schatten!! I tried with the autotools version as you suggested and, after some minor fixes due to xorgproto, it compile flawlessly.

    So maybe this is a bug in how the meson build system handle package.mk variables?

    Building via autotools, imho, is only a workaround, I'll investigate to understand why meson won't build without at least one gallium driver set

  • Leave 'radeonsi' in the list of GRAPHIC_DRIVERS and it is building, again.

    Maybe a missing dependency, which is included in 'radeonsi'. Or an option, which is depending on the GRAPHIC_DRIVERS.

    lrusak may know, more.

    Sascha

  • inusasha googling here and there, and as result of my tests, I have come to the conclusion that scripts are working as expected and there aren't missing dependencies. Simply "nvidia" is not (yet?) supported in meson.build. So i have four choises:

    1. build another supported driver to please meson.build (any gallium driver is ok here);
    2. proceed on my own using the autotools and moving away from the official LibreELEC branch;
    3. play with package.mk and drop mesa only for nvidia builds (if this doesn't break things), committing (if success) a pr
    4. anything else other than it doesn't now assist me
    • Official Post

    Building with only nvidia shaves a few MB off the total image size which is nice, but if you want to keep-up with our main releases I'd aim to make the smallest number of changes as possible. So the rule is: add only what you need and remove nothing if possible. The resulting image doesn't score kudos points for being minimal but it's significantly less effort to sustain over a long period of time.