Beginning with mesa master commit: * https://cgit.freedesktop.org/mesa/mesa/commit/?id=95f3e5861c3dec5d029ee2f07b8ebce6e2f73af1 If building a layer with wayland supported, Mesa will require a native wayland-scanner in order to build mesa. At this point, if that mesa commit (or newer) is bitbake'd with wayland support, the build will fail, as mesa's autotools will run 'pkg-config --variable=wayland_scanner wayland-scanner' and get back: * /usr/bin/wayland-scanner Note sysrootdir is not appended. In the meantime, I've submitted a patch to wayland to (hopefully) add a few smarts to the wayland-scanner.pc file, though there's no guarantee it will be accepted: * https://lists.freedesktop.org/archives/wayland-devel/2016-September/031073.html From a bb wayland patch: """ build: always build wayland-scanner The previous idiom for building a cross-compiled Wayland is to build once for the build host (with --enable-scanner --disable-libraries) to get a wayland-scanner binary that can then be used in a cross-compile (with --disable-scanner). The problem with this is that the cross wayland is missing a wayland-scanner binary, which means you then can't do any Wayland development on the target. Instead, always build wayland-scanner for the target and change --enable/disable-scanner to --with/without-host-scanner. Normal builds use the default of --without-host-scanner and run the wayland-scanner it just built, and cross-compiled builds pass --with-host-scanner to use a previously built host scanner but still get a wayland-scanner to install. (a theoretically neater solution would be to build two scanners if required (one to run and one to install), but automake makes this overly complicated) """ It would seem, given mesa master, we will need to install a wayland-scanner-native and a wayland-scanner for a correct build and installation. I'll do what I can locally, but any thoughts or insight would be appreciated.
We'll just need to do what we did with weston: make mesa depend on wayland-native and patch the configure.ac to insert the sysroot. Thanks for the headsup.
Thanks Ross. As it happens, Wayland devs nack'ed the pkg-config pc_sysrootdir patch I submitted (for reasons that are now perfectly obvious). I'll see what I can whip up locally on the wayland and mesa front.
I've sent a patch that just disables the pkg-config lookup and trusts that the correct wayland-scanner is in path (which is true on yocto). I'm also talking with the wayland folks about what the best solution would be... It's quite important to find the wayland-scanner that really matches the libwayland you are compiling with so the current mesa approach is actually very good for everyone else except cross-compiling weirdos. So maybe the best thing they can do is a suggestion to scanner users (like mesa) to add a "--with-wayland-scanner" config option.
commit 354d0bc4a38307a866888df64c9e6d9049560c0f Author: Jussi Kukkonen <jussi.kukkonen@intel.com> Date: Thu Nov 17 17:21:03 2016 +0200 mesa: Upgrade 12.0.3 -> 13.0.1 New major release with OpenGL 4.4 support. Dependency on libudev has been removed. * Rebase replace_glibc_check_with_linux.patch * Add patch to find native wayland-scanner * Add PACKAGECONFIG[osmesa], disabled by default * package osmesa header correctly (From OE-Core rev: be60ffcbbdcd370f9d367db887d31a8ccc6b2519) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>