--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: xorg-server FTCBFS: assumes CLOCK_MONOTONIC to be unavailable
- From: Helmut Grohne <helmut@subdivi.de>
- Date: Thu, 23 Nov 2017 19:33:23 +0100
- Message-id: <20171123183322.p3byyxfoz5ltonxc@alf.mars>
Source: xorg-server
Version: 2:1.19.5-1
Tags: patch upstream
User: helmutg@debian.org
Usertags: rebootstrap
xorg-server fails to cross build from source, because its configure
checks for CLOCK_MONOTONIC with AC_RUN_IFELSE and then figures that for
cross compilation CLOCK_MONOTONIC likely is not available. It then gives
up, because wayland requires CLOCK_MONOTONIC. I think this is a bad
default as it always breaks cross compilation. I propose resorting to a
weaker assumption for cross compilation where only the presence of the
CLOCK_MONOTONIC declaration is checked and it is assumed working. Since
wayland requires CLOCK_MONOTONIC anyway, the check really is only a
sanity check. After fixing this, xorg-server cross builds successfully.
Please consider applying the attached patch.
Helmut
Index: xorg-server-1.19.5/configure.ac
===================================================================
--- xorg-server-1.19.5.orig/configure.ac
+++ xorg-server-1.19.5/configure.ac
@@ -1073,6 +1073,9 @@
fi
AC_MSG_RESULT([$MONOTONIC_CLOCK])
+if test "$MONOTONIC_CLOCK" = "cross compiling"; then
+ AC_CHECK_DECL([CLOCK_MONOTONIC],[MONOTONIC_CLOCK=yes],[MONOTONIC_CLOCK=no],[#include <time.h>])
+fi
if test "x$MONOTONIC_CLOCK" = xyes; then
AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()])
--- End Message ---
--- Begin Message ---
- To: Helmut Grohne <helmut@subdivi.de>, 882531-done@bugs.debian.org
- Subject: Re: Bug#882531: [PATCH] build: guess availability of monotonic clock for cross compilation
- From: Andreas Boll <andreas.boll.dev@gmail.com>
- Date: Fri, 17 Aug 2018 22:36:57 +0200
- Message-id: <20180817203657.iyv3azaoz5oco5fg@localhost.localdomain>
- In-reply-to: <1515441664.2637.22.camel@nwnk.net>
- References: <20171221104814.wstokslqodvyiyjd@alf.mars> <20171123183322.p3byyxfoz5ltonxc@alf.mars> <1515441664.2637.22.camel@nwnk.net>
Version: 2:1.19.99.901-1
On Mon, Jan 08, 2018 at 03:01:04PM -0500, Adam Jackson wrote:
> On Thu, 2017-12-21 at 11:48 +0100, Helmut Grohne wrote:
> > When cross compiling, the value of MONOTONIC_CLOCK would be "cross
> > compiling", because AC_RUN_IFELSE doesn't work. However when enabling
> > wayland, a monotonic clock is required and configure aborts.
> >
> > We change detection of CLOCK_MONOTONIC to degrade it gracefully from a
> > run check to a declaration check in case of cross compilation based on
> > the assumption that most systems will have a monotonic clock and those
> > that don't won't be able to run Xwayland anyway. The trade-off
> > essentially is either "always fail cross compilation" or "produce an
> > unusable Xwayland for unusual platform" and this commit switches to the
> > latter.
> >
> > Signed-off-by: Helmut Grohne <helmut@subdivi.de>
> > Bug-Debian: https://bugs.debian.org/882531
>
> Merged, thanks!
>
> remote: I: patch #194605 updated using rev c601c8faf54ff9e3bcbc653421828d71042deef7.
> remote: I: 1 patch(es) updated to state Accepted.
> To ssh://git.freedesktop.org/git/xorg/xserver
> a309323328..c601c8faf5 master -> master
>
> - ajax
This patch has been included in xorg-server 2:1.19.99.901-1
Thanks,
Andreas
--- End Message ---