Skip to contentSkip to conversation

mesa3d: add patch to fix wayland-scanner issues

PATCH New Gustavo Zacarias 2 participants 2 messages Nov 17, 2016 – Nov 19, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mesa3d: add patch to fix wayland-scanner issues

mesa3d tries to use the pkg-config specified wayland-scanner when wayland is enabled, which points to /usr/bin/wayland-scanner which is incorrect.
The correct fix is trying to use the PATH wayland-scanner first if it's available rather than the pkg-config specified one, since tweaking a staging .pc file with a host binary is wrong. Fixes:
http://autobuild.buildroot.net/results/c0c/c0ca3778c390a33c27073553ca3bef7ac7c5784b/

Patch sent upstream:
https://lists.freedesktop.org/archives/mesa-dev/2016-November/135665.html

---
 ...ac-invert-order-for-wayland-scanner-check.patch | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/mesa3d/0005-configure.ac-invert-order-for-wayland-scanner-check.patch
package/mesa3d/0005-configure.ac-invert-order-for-wayland-scanner-check.patch new file +39 -0
new file mode 100644
index 0000000..e32031e
@@ -0,0 +1,39 @@
+From 60ee5191a0c074251862a15b12afdc9db0b2df38 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <[email protected]>
+Date: Thu, 17 Nov 2016 15:36:54 -0300
+Subject: [PATCH] configure.ac: invert order for wayland-scanner check
+
+When cross-compiling the .pc file might point to the wrong
+wayland-scanner binary (target rather than host) resulting in a
+non-executable and wrong scanner.
+Try searching the PATH first, and if that fails fall back into
+pkg-config.
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5f30ae8..461792e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2025,11 +2025,11 @@ if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then
+     AC_MSG_ERROR([cannot build egl state tracker without EGL library])
+ fi
+ 
+-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
+-        WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
+-        WAYLAND_SCANNER='')
++AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+ if test "x$WAYLAND_SCANNER" = x; then
+-    AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
++    PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
++            WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
++            WAYLAND_SCANNER='')
+ fi
+ 
+ # Do per-EGL platform setups and checks
+-- 
+2.7.3
+
Signature · 1 line
2.7.3
#1 lore raw

PATCH 1/1 mesa3d: add patch to fix wayland-scanner issues

Hello,

Quoted 8 lines · Gustavo Zacarias

mesa3d tries to use the pkg-config specified wayland-scanner when wayland is enabled, which points to /usr/bin/wayland-scanner which is incorrect.
The correct fix is trying to use the PATH wayland-scanner first if it's available rather than the pkg-config specified one, since tweaking a staging .pc file with a host binary is wrong. Fixes:
http://autobuild.buildroot.net/results/c0c/c0ca3778c390a33c27073553ca3bef7ac7c5784b/

Quoted 8 lines

Patch sent upstream:
https://lists.freedesktop.org/archives/mesa-dev/2016-November/135665.html

---
 ...ac-invert-order-for-wayland-scanner-check.patch | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/mesa3d/0005-configure.ac-invert-order-for-wayland-scanner-check.patch

Applied to master, thanks. You received some feedback on your upstream submission, so it would be good if you could follow-up and get a fix included upstream.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com