[Mesa-dev] [PATCH 8/9] configure.ac: split the wayland client/server confusion
Emil Velikov
emil.l.velikov at gmail.com
Thu Sep 7 18:05:05 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
At the moment wayland-clients, such as the Vulkan drivers were
over-linking against libwayland-server.so.
That went unnoticed, since both client and server code uses the
wl*interface symbols, which are present in both libwayland-client.so and
libwayland-server.so.
I've looked at correcting that, although that's orthogonal to this fix.
Note: wayland-egl does _not_ depend on wayland-client, although it does
need wayland-egl.h. There's no distinct package that provides it (I have
a WIP on the topic) so current solution will do for now.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
I'm ever so slightly tempted to get this fix for stable. Anyone wants to
weight-in for/against the idea?
---
configure.ac | 3 ++-
src/amd/vulkan/Makefile.am | 4 ++--
src/egl/Makefile.am | 6 ++++--
src/egl/wayland/wayland-drm/Makefile.am | 2 +-
src/egl/wayland/wayland-egl/Makefile.am | 2 +-
src/gbm/Makefile.am | 4 ++--
src/intel/Makefile.vulkan.am | 4 ++--
src/vulkan/Makefile.am | 2 +-
8 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/configure.ac b/configure.ac
index f0368570b12..fd6e4cb2f95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1705,7 +1705,8 @@ for plat in $platforms; do
case "$plat" in
wayland)
- PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
+ PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED])
+ PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED])
if test "x$WAYLAND_SCANNER" = "x:"; then
AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am
index 3350f545403..438872bbb48 100644
--- a/src/amd/vulkan/Makefile.am
+++ b/src/amd/vulkan/Makefile.am
@@ -90,13 +90,13 @@ endif
if HAVE_PLATFORM_WAYLAND
AM_CPPFLAGS += \
- $(WAYLAND_CFLAGS) \
+ $(WAYLAND_CLIENT_CFLAGS) \
-DVK_USE_PLATFORM_WAYLAND_KHR
VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
VULKAN_LIB_DEPS += \
- $(WAYLAND_LIBS)
+ $(WAYLAND_CLIENT_LIBS)
endif
noinst_LTLIBRARIES = libvulkan_common.la
diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index bb8ec9745dd..146cd1a6f05 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -78,10 +78,12 @@ if HAVE_PLATFORM_WAYLAND
drivers/dri2/linux-dmabuf-unstable-v1-protocol.lo: drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
drivers/dri2/egl_dri2.lo: drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
-AM_CFLAGS += $(WAYLAND_CFLAGS)
-libEGL_common_la_LIBADD += $(WAYLAND_LIBS)
+AM_CFLAGS += $(WAYLAND_CLIENT_CFLAGS)
+libEGL_common_la_LIBADD += $(WAYLAND_CLIENT_LIBS)
libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
+AM_CFLAGS += $(WAYLAND_SERVER_CFLAGS)
libEGL_common_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
+libEGL_common_la_LIBADD += $(WAYLAND_SERVER_LIBS)
libEGL_common_la_LIBADD += $(top_builddir)/src/util/libmesautil.la
dri2_backend_FILES += \
drivers/dri2/platform_wayland.c \
diff --git a/src/egl/wayland/wayland-drm/Makefile.am b/src/egl/wayland/wayland-drm/Makefile.am
index f40ff4841e0..b27edddafb1 100644
--- a/src/egl/wayland/wayland-drm/Makefile.am
+++ b/src/egl/wayland/wayland-drm/Makefile.am
@@ -2,7 +2,7 @@ AM_CFLAGS = -I$(top_srcdir)/src/egl/main \
-I$(top_srcdir)/include \
$(DEFINES) \
$(VISIBILITY_CFLAGS) \
- $(WAYLAND_CFLAGS)
+ $(WAYLAND_SERVER_CFLAGS)
noinst_LTLIBRARIES = libwayland-drm.la
libwayland_drm_la_SOURCES = \
diff --git a/src/egl/wayland/wayland-egl/Makefile.am b/src/egl/wayland/wayland-egl/Makefile.am
index 846fa6247b2..34394a17f0e 100644
--- a/src/egl/wayland/wayland-egl/Makefile.am
+++ b/src/egl/wayland/wayland-egl/Makefile.am
@@ -3,7 +3,7 @@ pkgconfig_DATA = wayland-egl.pc
AM_CFLAGS = $(DEFINES) \
$(VISIBILITY_CFLAGS) \
- $(WAYLAND_CFLAGS)
+ $(WAYLAND_CLIENT_CFLAGS)
lib_LTLIBRARIES = libwayland-egl.la
noinst_HEADERS = wayland-egl-priv.h
diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
index c77205bf798..aa16f5614b7 100644
--- a/src/gbm/Makefile.am
+++ b/src/gbm/Makefile.am
@@ -30,8 +30,8 @@ libgbm_la_LIBADD = \
$(DLOPEN_LIBS)
if HAVE_PLATFORM_WAYLAND
-AM_CFLAGS += $(WAYLAND_CFLAGS)
-libgbm_la_LIBADD += $(WAYLAND_LIBS)
+AM_CFLAGS += $(WAYLAND_SERVER_CFLAGS)
+libgbm_la_LIBADD += $(WAYLAND_SERVER_LIBS)
endif
if HAVE_DRI2
diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am
index fa9b6ba7245..f1c87e4f602 100644
--- a/src/intel/Makefile.vulkan.am
+++ b/src/intel/Makefile.vulkan.am
@@ -151,12 +151,12 @@ endif
if HAVE_PLATFORM_WAYLAND
VULKAN_CPPFLAGS += \
- $(WAYLAND_CFLAGS) \
+ $(WAYLAND_CLIENT_CFLAGS) \
-DVK_USE_PLATFORM_WAYLAND_KHR
VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
-VULKAN_LIB_DEPS += $(WAYLAND_LIBS)
+VULKAN_LIB_DEPS += $(WAYLAND_CLIENT_LIBS)
endif
noinst_LTLIBRARIES += vulkan/libvulkan_common.la
diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am
index c897a07d6a8..ef8a0ff73c3 100644
--- a/src/vulkan/Makefile.am
+++ b/src/vulkan/Makefile.am
@@ -64,7 +64,7 @@ wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML)
if HAVE_PLATFORM_WAYLAND
AM_CPPFLAGS += \
-I$(top_builddir)/src/vulkan/wsi \
- $(WAYLAND_CFLAGS) \
+ $(WAYLAND_CLIENT_CFLAGS) \
-DVK_USE_PLATFORM_WAYLAND_KHR
VULKAN_WSI_SOURCES += \
--
2.14.1
More information about the mesa-dev
mailing list