[Mesa-dev] [PATCH v1] configure.ac: Missed package 'wayland-egl-backend'

Aaron Watry awatry at gmail.com
Tue Jun 12 16:07:40 UTC 2018


On Tue, Jun 12, 2018 at 10:31 AM, Eric Engestrom
<eric.engestrom at intel.com> wrote:
> On Tuesday, 2018-06-12 18:22:03 +0300, Sergii Romantsov wrote:
>> Added support of wayland-egl-backend for old Ubuntus.
>> Building of mesa with parameter "--with-egl-platforms=x11,wayland"
>> fails:
>> "configure: error: Package requirements (wayland-egl-backend >= 3)
>> were not met: No package 'wayland-egl-backend' found"
>>
>> Ubuntu's releases less than 18.10 don't have package
>> libwayland-egl-backend-dev.
>> To fix that issue used mesa-platfrom-header wayland-egl-backend.h.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106897
>> Signed-off-by: Sergii Romantsov <sergii.romantsov at globallogic.com>
>
> NAK
>
> There are many issues here:
> - you're going backwards: we just deleted this file
> - we don't want distro-specific hacks in mesa
> - your HAVE_PLATFORM_WAYLAND_BACKEND is backwards (you define it when
>   you don't have it)
> - you're only "fixing" autotools, not meson
> - as mentioned by Daniel on the bug, the actual issue is that your
>   system is not up to date; `apt upgrade` to fix your issue.

That's the thing here.  There is no released version of Ubuntu that
you can just `apt upgrade` to get the required libwayland version.

The way I was able to resolve this for my system was to download the
Ubuntu 18.10 version of the libwayland packages and apply them to my
18.04 instance (with fingers crossed that I wasn't breaking my system
in the process as I worked my way through the dependency issues that
it caused).

For the brave/desperate, the latest build as of this moment for Cosmic is here:
https://bugs.launchpad.net/ubuntu/+source/wayland/1.15.0-2/+build/14907841

I believe it'd work to install the libwayland-egl1 DEB first, so that
it replaces the old libwayland-egl-mesa package, and then upgrade the
rest afterwards. I tried installing them in a single command, and that
didn't go so well due to conflicts/dependency-issues with
libwayland-egl1 ...

--Aaron

>
> Btw, `--with-egl-platforms` is deprecated (see the warning it prints
> when you use it).
>
>> ---
>>  configure.ac                                      | 20 ++++++-
>>  src/egl/Makefile.am                               |  5 ++
>>  src/egl/wayland/wayland-egl/wayland-egl-backend.h | 67 +++++++++++++++++++++++
>>  3 files changed, 91 insertions(+), 1 deletion(-)
>>  create mode 100644 src/egl/wayland/wayland-egl/wayland-egl-backend.h
>>
>> diff --git a/configure.ac b/configure.ac
>> index 75ee1a7..32b3c53 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -91,6 +91,7 @@ LIBVA_REQUIRED=0.39.0
>>  VDPAU_REQUIRED=1.1
>>  WAYLAND_REQUIRED=1.11
>>  WAYLAND_EGL_BACKEND_REQUIRED=3
>> +UBUNTU_WAYLAND_EGL_BACKEND_REQUIRED=18.10
>>  WAYLAND_PROTOCOLS_REQUIRED=1.8
>>  XCB_REQUIRED=1.9.3
>>  XCBDRI2_REQUIRED=1.8
>> @@ -1810,7 +1811,24 @@ for plat in $platforms; do
>>          PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED])
>>          PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
>>          if test "x$enable_egl" = xyes; then
>> -          PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED])
>> +          case "$host_os" in
>> +          linux*)
>> +              AC_SUBST([DISTRIBUTOR_ID],[$( lsb_release -is )])
>> +              AC_SUBST([RELEASE_VERSION],[$( lsb_release -rs )])
>> +              ;;
>> +          *)
>> +              AC_SUBST([DISTRIBUTOR_ID])
>> +              AC_SUBST([RELEASE_VERSION])
>> +              ;;
>> +          esac
>> +
>> +          if test "$DISTRIBUTOR_ID" = "Ubuntu" -a  $RELEASE_VERSION \< $UBUNTU_WAYLAND_EGL_BACKEND_REQUIRED ; then
>> +              DEFINES="$DEFINES -DHAVE_PLATFORM_WAYLAND_BACKEND"
>> +              AM_CONDITIONAL([HAVE_PLATFORM_WAYLAND_BACKEND], [test "xyes" = xyes])
>> +          else
>> +              PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED])
>> +              AM_CONDITIONAL([HAVE_PLATFORM_WAYLAND_BACKEND], [test "xyes" != xyes])
>> +          fi
>>          fi
>>          WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
>>
>> diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
>> index be3547d..0ef0a42 100644
>> --- a/src/egl/Makefile.am
>> +++ b/src/egl/Makefile.am
>> @@ -121,6 +121,11 @@ AM_CFLAGS += \
>>       -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
>>       -D_EGL_BUILT_IN_DRIVER_DRI2
>>
>> +if HAVE_PLATFORM_WAYLAND_BACKEND
>> +AM_CFLAGS += \
>> +     -I$(top_srcdir)/src/egl/wayland/wayland-egl
>> +endif
>> +
>>  nodist_libEGL_common_la_SOURCES = \
>>       $(dri2_backend_GENERATED_FILES)
>>
>> diff --git a/src/egl/wayland/wayland-egl/wayland-egl-backend.h b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
>> new file mode 100644
>> index 0000000..869c86f
>> --- /dev/null
>> +++ b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
>> @@ -0,0 +1,67 @@
>> +/*
>> + * Copyright © 2011 Benjamin Franzke
>> + *
>> + * Permission is hereby granted, free of charge, to any person obtaining a
>> + * copy of this software and associated documentation files (the "Software"),
>> + * to deal in the Software without restriction, including without limitation
>> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
>> + * and/or sell copies of the Software, and to permit persons to whom the
>> + * Software is furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice (including the next
>> + * paragraph) shall be included in all copies or substantial portions of the
>> + * Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
>> + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> + * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
>> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
>> + * DEALINGS IN THE SOFTWARE.
>> + *
>> + * Authors:
>> + *    Benjamin Franzke <benjaminfranzke at googlemail.com>
>> + */
>> +
>> +#ifndef _WAYLAND_EGL_PRIV_H
>> +#define _WAYLAND_EGL_PRIV_H
>> +
>> +#include <stdint.h>
>> +
>> +#ifdef  __cplusplus
>> +extern "C" {
>> +#endif
>> +
>> +/*
>> + * NOTE: This version must be kept in sync with the Version field in the
>> + * wayland-egl-backend.pc.in file.
>> + */
>> +#define WL_EGL_WINDOW_VERSION 3
>> +
>> +struct wl_surface;
>> +
>> +struct wl_egl_window {
>> +     const intptr_t version;
>> +
>> +     int width;
>> +     int height;
>> +     int dx;
>> +     int dy;
>> +
>> +     int attached_width;
>> +     int attached_height;
>> +
>> +     void *driver_private;
>> +     void (*resize_callback)(struct wl_egl_window *, void *);
>> +     void (*destroy_window_callback)(void *);
>> +
>> +     struct wl_surface *surface;
>> +};
>> +
>> +#ifdef  __cplusplus
>> +}
>> +#endif
>> +
>> +#endif
>> --
>> 2.7.4
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list