Bug#873710: gavl FTCBFS: tries to figure out whether CLOCK_MONOTONIC works

Helmut Grohne helmut at subdivi.de
Wed Aug 30 10:19:39 UTC 2017


Source: gavl
Version: 1.4.0-4
Tags: patch upstream
User: helmutg at debian.org
Usertags: rebootstrap

gavl fails to cross build from source, because it tries to figure out
whether CLOCK_MONOTONIC works. Such a test has no meaning as that is a
runtime property and may change from system to system (in theory). We
are best off assuming that it works when it is available thus converting
AC_TRY_RUN into AC_TRY_COMPILE and fixing the cross build. Please
consider applying the attached patch.

Helmut
-------------- next part --------------
diff --minimal -Nru gavl-1.4.0/debian/changelog gavl-1.4.0/debian/changelog
--- gavl-1.4.0/debian/changelog	2016-02-18 02:24:42.000000000 +0100
+++ gavl-1.4.0/debian/changelog	2017-08-30 12:13:35.000000000 +0200
@@ -1,3 +1,10 @@
+gavl (1.4.0-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: 0004-cross.patch. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Wed, 30 Aug 2017 12:13:35 +0200
+
 gavl (1.4.0-4) unstable; urgency=medium
 
   * Team upload
diff --minimal -Nru gavl-1.4.0/debian/patches/0004-cross.patch gavl-1.4.0/debian/patches/0004-cross.patch
--- gavl-1.4.0/debian/patches/0004-cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ gavl-1.4.0/debian/patches/0004-cross.patch	2017-08-30 12:13:35.000000000 +0200
@@ -0,0 +1,33 @@
+From: Helmut Grohne <helmut at subdivi.de>
+Subject: fix cross compilation
+
+Trying to determine whether CLOCK_MONOTONIC works is in vein, because it may
+differ from the buildd (in theory) being a runtime property of the kernel. For
+compiling gavl, it is sufficient to know that the macro is defined and to
+assume that on Debian systems CLOCK_MONOTONIC always works when it is defined.
+
+Index: gavl-1.4.0/configure.ac
+===================================================================
+--- gavl-1.4.0.orig/configure.ac
++++ gavl-1.4.0/configure.ac
+@@ -159,17 +159,12 @@
+ 
+ AC_MSG_CHECKING(for CLOCK_MONOTONIC)
+ 
+-AC_TRY_RUN([
++AC_TRY_COMPILE([
+   #include <time.h>
+   #include <errno.h>
+-main()
+-  {
++],[
+   struct timespec tp;
+-  if(clock_gettime(CLOCK_MONOTONIC, &tp))
+-    return -1;
+-  else
+-    return 0;
+-  }
++  clock_gettime(CLOCK_MONOTONIC, &tp);
+   ],
+   [
+     # program could be run
diff --minimal -Nru gavl-1.4.0/debian/patches/series gavl-1.4.0/debian/patches/series
--- gavl-1.4.0/debian/patches/series	2016-02-18 02:17:38.000000000 +0100
+++ gavl-1.4.0/debian/patches/series	2017-08-30 12:11:26.000000000 +0200
@@ -1,3 +1,4 @@
 0001-ubuntu_armel_ftbfs.patch
 0002-cpuid_x32.patch
 0003-nonfatal-missing-doxygen.patch
+0004-cross.patch


More information about the pkg-multimedia-maintainers mailing list