Source: gstreamer1.0 Version: 1.10.0-2 Severity: important Tags: upstream patch User: debian-h...@lists.debian.org Usertags: hurd
Hello, gstreamer1.0 currently FTBFS on hurd-i386 because it erroneously compiles clock_gettime.c on all archs because of a missing AM_CONDITIONAL. It works on Linux only by luck, because __MACH__ is not defined there, but it is on the Hurd since it uses a Mach kernel. But gstreamer happens to confuse __MACH__ with "building on MacOS", and starts using MacOS-specific mach calls, which don't exist on GNU Mach... The attached patch fixes the build of clock_gettime.c by making it properly detect Darwin, and it fixes not actually building clock_gettime.c when clock_gettime is actually available, since it can only bring issues, and it's probably only by luck if it never has on Linux yet. Samuel -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.8.0 (SMP w/4 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -- Samuel <P> je sens venir la fonte 14 pour le rapport -+- #ens-mim -+-
--- ./libs/gst/check/libcheck/clock_gettime.c.original 2016-11-11 23:41:33.000000000 +0000 +++ ./libs/gst/check/libcheck/clock_gettime.c 2016-11-11 23:43:09.000000000 +0000 @@ -1,6 +1,6 @@ #include "libcompat.h" -#ifdef __MACH__ +#if defined(__MACH__) && defined(__APPLE__) #include <mach/clock.h> #include <mach/mach.h> #include <mach/mach_time.h> @@ -15,7 +15,7 @@ clock_gettime (clockid_t clk_id CK_ATTRIBUTE_UNUSED, struct timespec *ts) { -#ifdef __MACH__ +#if defined(__MACH__) && defined(__APPLE__) /* OS X does not have clock_gettime, use mach_absolute_time */ static mach_timebase_info_data_t sTimebaseInfo; --- ./m4/check-checks.m4.original 2016-11-11 23:52:21.000000000 +0000 +++ ./m4/check-checks.m4 2016-11-11 23:52:30.000000000 +0000 @@ -95,7 +95,7 @@ AM_CONDITIONAL(HAVE_TIMER_CREATE_SETTIME_DELETE, test "x$ac_cv_lib_rt_timer_create__timer_settime__timer_delete" = "xyes") dnl Allow for checking HAVE_CLOCK_GETTIME in automake files -AM_CONDITIONAL(HAVE_CLOCK_GETTIME, test "x$HAVE_CLOCK_GETTIME" = "xyes") +AM_CONDITIONAL(HAVE_CLOCK_GETTIME, test "x$CLOCK_GETTIME_FOUND" = "xyes") dnl Create _stdint.h in the top-level directory AX_CREATE_STDINT_H