Bug#888047: mesa: FTBFS on hurd-i386
Source: mesa
Version: 17.3.3-1
Severity: important
Tags: patch
Hello,
mesa currently FTBFS on hurd-i386 for a few upstream and downstream
reasons. The attached patches pthread_setname_np and GetDriverConfig are
cherry-picks from upstream. The attached patch "patch" is for the Debian
changes: the libva dependency is avoided on hurd-any, but --with libva
was still pased, thus failing. Also, surfaceless requires libdrm, which
is not available.
Samuel
-- System Information:
Debian Release: buster/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: hurd-i386 (i686-AT386)
Kernel: GNU-Mach 1.8+git20171101-486-dbg/Hurd-0.9
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
commit 9131e6d3c2dcc30260e23f2232b44c8cffc6f315
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sat Jan 13 12:33:15 2018 +0100
u_thread: Use pthread_setname_np on linux only.
pthread_setname_np was added in glibc 2.12 for the Linux port only, other
ports do not necessarily have it.
Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
diff --git a/src/util/u_thread.h b/src/util/u_thread.h
index 26cc0b0934..8c6e0bdc59 100644
--- a/src/util/u_thread.h
+++ b/src/util/u_thread.h
@@ -62,7 +62,8 @@ static inline void u_thread_setname( const char *name )
{
#if defined(HAVE_PTHREAD)
# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
+ (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
+ defined(__linux__)
pthread_setname_np(pthread_self(), name);
# endif
#endif
commit 47ac11bcf8bd9e4525e0fb4308d0bca87a8900c6
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Mon Jan 15 15:38:25 2018 +0100
glx: fix non-dri build
glXGetDriverConfig parameters do not provide a context to dynamically
check for the presence of the function, so the dispatcher directly calls
glXGetDriverConfig, but in non-dri builds dri_glx.c didn't provide
glXGetDriverConfig.
This change make it just return NULL in that case.
Fixes: 84f764a7591 "glxglvnddispatch: Add missing dispatch for GetDriverConfig
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
diff --git a/src/glx/g_glxglvnddispatchfuncs.c b/src/glx/g_glxglvnddispatchfuncs.c
index 56d894eda7..5b65afc860 100644
--- a/src/glx/g_glxglvnddispatchfuncs.c
+++ b/src/glx/g_glxglvnddispatchfuncs.c
@@ -338,11 +338,15 @@ static Display *dispatch_GetCurrentDisplayEXT(void)
static const char *dispatch_GetDriverConfig(const char *driverName)
{
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
/*
* The options are constant for a given driverName, so we do not need
* a context (and apps expect to be able to call this without one).
*/
return glXGetDriverConfig(driverName);
+#else
+ return NULL;
+#endif
}
diff -ur mesa-17.3.1.orig/debian/rules mesa-17.3.1/debian/rules
--- mesa-17.3.1.orig/debian/rules 2018-01-13 09:10:32.000000000 +0000
+++ mesa-17.3.1/debian/rules 2018-01-13 09:52:21.000000000 +0000
@@ -26,16 +26,20 @@
DRI_DRIVERS =
GALLIUM_DRIVERS =
VULKAN_DRIVERS =
-EGL_PLATFORMS = x11,surfaceless
confflags_DRI3 = --disable-dri3
# hurd doesn't do direct rendering
ifeq ($(DEB_HOST_ARCH_OS), hurd)
+ EGL_PLATFORMS = x11
+
confflags_DIRECT_RENDERING = --disable-driglx-direct
confflags_GBM = --disable-gbm
DRI_DRIVERS = swrast
+ with_libva =
else
+ EGL_PLATFORMS = x11,surfaceless
+
ifeq ($(DEB_HOST_ARCH_OS), linux)
confflags_DRI3 = --enable-dri3
# Gallium drivers which require kernel support, not yet ported to non-Linux
@@ -108,6 +112,7 @@
confflags_GALLIUM += --enable-va
confflags_GALLIUM += --enable-gallium-extra-hud
confflags_GALLIUM += --enable-lmsensors
+ with_libva = ,libva
endif
# Disable assembly usage on x32 otherwise Mesa defaults to x86_64 assembly
@@ -227,7 +232,7 @@
dh_makeshlibs -a -- -c4
%:
- dh $@ --with quilt,autoreconf,libva \
+ dh $@ --with quilt,autoreconf$(with_libva) \
--parallel \
--builddirectory=build/
Reply to: