found 951834 7.4.15-2
retitle 951834 php7.4 FTBFS on hurd-i386
owner 951834 svante.sign...@gmail.com
tags 951834 ftbfs, patch
user 951834 debian-h...@lists.debian.org
usertag 951834 hurd
thanks

Hello,

Trying to build php7.4 for GNU/Hurd revealed that in addition of the
patch in this bug report, another patch is needed as attached:
ext_standard_hrtime.h.patch. Before closing this bug it was not
included. This patch solves the build error:
PHP Warning:  PHP Startup: Failed to initialize high-resolution timer
in Unknown on line 0. 

Additionally, the attached patch, debian_rules.diff, adds
--without=build-stamp to the dh line in debian/rules to avoid that the
install stage tries to find php7.4-interbase from the generated file
debian/debhelper-build-stamp. Searching for that file after building
gives no hits at all, and the origin of that file is unknown.

Thanks!
--- a/debian/rules	2021-02-15 00:26:12.000000000 +0100
+++ b/debian/rules	2021-02-15 00:25:30.000000000 +0100
@@ -264,7 +264,7 @@
 #$(info Enabled config $(ext_config))
 
 %:
-	dh $@ --with systemd --with apache2 --without autoreconf $(PARALLEL)
+	dh $@ --with systemd --with apache2 --without=build-stamp --without autoreconf $(PARALLEL)
 
 PREPARE_FILES := $(addprefix debian/,$(shell cat debian/prepare-files))
 
Index: php7.4-7.4.11/ext/standard/hrtime.h
===================================================================
--- php7.4-7.4.11.orig/ext/standard/hrtime.h
+++ php7.4-7.4.11/ext/standard/hrtime.h
@@ -26,7 +26,10 @@
 #define PHP_HRTIME_PLATFORM_HPUX    0
 #define PHP_HRTIME_PLATFORM_AIX     0
 
-#if defined(_POSIX_TIMERS) && ((_POSIX_TIMERS > 0) || defined(__OpenBSD__)) && defined(_POSIX_MONOTONIC_CLOCK) && defined(CLOCK_MONOTONIC)
+#if defined(_POSIX_TIMERS) && \
+    ((_POSIX_TIMERS > 0) || defined(__OpenBSD__) || defined(__GNU__)) && \
+    defined(_POSIX_MONOTONIC_CLOCK) && \
+    defined(CLOCK_MONOTONIC)
 # undef  PHP_HRTIME_PLATFORM_POSIX
 # define PHP_HRTIME_PLATFORM_POSIX 1
 #elif defined(_WIN32) || defined(_WIN64)

Reply via email to