[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#882531: marked as done (xorg-server FTCBFS: assumes CLOCK_MONOTONIC to be unavailable)



Your message dated Fri, 17 Aug 2018 22:36:57 +0200
with message-id <20180817203657.iyv3azaoz5oco5fg@localhost.localdomain>
and subject line Re: Bug#882531: [PATCH] build: guess availability of monotonic clock for cross compilation
has caused the Debian Bug report #882531,
regarding xorg-server FTCBFS: assumes CLOCK_MONOTONIC to be unavailable
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
882531: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882531
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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 ---
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 ---

Reply to: