Bug 106861 - fatal error: wayland-egl-backend.h: No such file or directory compilation terminated.
Summary: fatal error: wayland-egl-backend.h: No such file or directory compilation ter...
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: EGL/Wayland (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-08 12:02 UTC by Eero Tamminen
Modified: 2018-07-11 15:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Eero Tamminen 2018-06-08 12:02:35 UTC
Mesa builds started last night to fail to:
drivers/dri2/platform_wayland.c:48:33: fatal error: wayland-egl-backend.h: No such file or directory

Apparently this file should be now provided by libwayland instead of being included with Mesa.  However, there was no configure error about pkgconfig not finding wayland-egl-backend.pc file provided by libwayland, or it having too old version.

Looking at the guilty commit 1db4ec05462914096b1f243e9b2af7e71cf38622, it seems to be checking for wayland-egl instead, and requiring version 1.15 of it.

E.g. on Ubuntu 16.04, wayland-egl.pc content is:
--------------------------
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include

Name: wayland-egl
Description: Mesa wayland-egl library
Version: 17.2.8
Requires: wayland-client
Libs: -L${libdir} -lwayland-egl
Cflags: -I${includedir}
--------------------------

Which is provided by libegl1-mesa-dev i.e. Mesa, and pc file version is obviously large enough as its version comes from Mesa.

However, libegl1-mesa-dev package doesn't provide any Wayland headers, only EGL ones.

Installing latest version of libwayland from git naturally fixes this, but Mesa autoconfig (and Meson) check is clearly broken.
Comment 1 Eric Engestrom 2018-06-08 14:14:53 UTC
Eero, I think this patch should fix the issue:
https://lists.freedesktop.org/archives/mesa-dev/2018-June/197142.html
Comment 2 Eric Engestrom 2018-06-08 15:47:34 UTC
Fixed by:

commit 37eb56d239986e2e7ca1c87d08fd357378a3a06e
Author: Eric Engestrom <eric.engestrom@intel.com>
Date:   Thu Jun 7 15:45:01 2018 +0100

    autotools/meson: compile against wayland-egl-*backend*
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106861
    Fixes: 1db4ec05462914096b1f "egl: rewire the build systems to use libwayland-egl"
    Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
    Tested-by: Andreas Hartmetz <ahartmetz@gmail.com>
    Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>


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.