GNU bug report logs -
#71993
[core-updates] gnu: libfaketime: Support compilation with glibc 2.39 on i686-linux.
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Mon, 8 Jul 2024 08:48:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71993 in the body.
You can then email your comments to 71993 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#71993
; Package
guix-patches
.
(Mon, 08 Jul 2024 08:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christopher Baines <mail <at> cbaines.net>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 08 Jul 2024 08:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
As it fails to build and seems broken.
Christopher Baines (2):
gnu: nss: Don't use libfaketime on 32bit systems.
gnu: python-pyopenssl: Don't use libfaketime on 32bit systems.
gnu/packages/nss.scm | 15 +++++++++++++--
gnu/packages/python-crypto.scm | 10 ++++++++--
2 files changed, 21 insertions(+), 4 deletions(-)
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71993
; Package
guix-patches
.
(Mon, 08 Jul 2024 09:04:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 71993 <at> debbugs.gnu.org (full text, mbox):
As it fails to build and doesn't seem to work.
* gnu/packages/nss.scm (nss)[arguments]: Only use faketime on 64bit systems.
[native-inputs]: Only include libfaketime on 64bit systems.
Change-Id: I78bc9b7b2010e5b77f6184ffb7c87740ceae241c
---
gnu/packages/nss.scm | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index 49276817ae..2162254760 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -215,7 +215,12 @@ (define-public nss
;; leading to test failures:
;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>. To
;; work around that, set the time to roughly the release date.
- (invoke "faketime" "2024-01-23" "./nss/tests/all.sh"))
+ (invoke #$@(if (target-64bit?)
+ '("faketime" "2024-01-23")
+ ;; libfaketime is currently broken on 32bit
+ ;; systems
+ '())
+ "./nss/tests/all.sh"))
(format #t "test suite not run~%"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
@@ -240,7 +245,13 @@ (define-public nss
(copy-recursively (string-append obj "/lib") lib)))))))
(inputs (list sqlite zlib))
(propagated-inputs (list nspr)) ;required by nss.pc.
- (native-inputs (list perl libfaketime which)) ;for tests
+ (native-inputs
+ `(,perl
+ ,@(if (target-64bit?)
+ (list libfaketime)
+ ;; libfaketime is currently broken on 32bit systems
+ '())
+ ,which)) ;for tests
;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when
;; another build is happening concurrently on the same machine.
base-commit: 75b4a29e12011ae3d1814932591e80dcb0b80aae
--
2.45.2
Information forwarded
to
lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org
:
bug#71993
; Package
guix-patches
.
(Mon, 08 Jul 2024 09:05:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 71993 <at> debbugs.gnu.org (full text, mbox):
As it fails to build and doesn't seem to work.
* gnu/packages/python-pyopenssl.scm (python-pyopenssl)[arguments]: Only use
faketime on 64bit systems.
[native-inputs]: Only include libfaketime on 64bit systems.
Change-Id: I3a4ab85219ae71af17f43d864410fe2ac86ef214
---
gnu/packages/python-crypto.scm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 78f65ccf87..b001bb3e19 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -662,7 +662,10 @@ (define-public python-pyopenssl
;; PyOpenSSL runs tests against a certificate with a fixed
;; expiry time. To ensure successful builds in the future,
;; set the time to roughly the release date.
- (invoke "faketime" "2023-03-25" "pytest" "-vv" "-k"
+ (invoke #$@(if (target-64bit?)
+ '("faketime" "2023-03-25")
+ '())
+ "pytest" "-vv" "-k"
(string-append
;; This test tries to look up certificates from
;; the compiled-in default path in OpenSSL, which
@@ -676,7 +679,10 @@ (define-public python-pyopenssl
"and not test_verify_with_time"))))))))
(propagated-inputs (list python-cryptography))
(inputs (list openssl))
- (native-inputs (list libfaketime python-flaky python-pretend python-pytest))
+ (native-inputs `(,@(if (target-64bit?)
+ (list libfaketime)
+ '())
+ ,@(list python-flaky python-pretend python-pytest)))
(home-page "https://github.com/pyca/pyopenssl")
(synopsis "Python wrapper module around the OpenSSL library")
(description "PyOpenSSL is a high-level wrapper around a subset of the
--
2.45.2
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71993
; Package
guix-patches
.
(Mon, 08 Jul 2024 12:28:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 71993 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello!
Christopher Baines <mail <at> cbaines.net> skribis:
> gnu: nss: Don't use libfaketime on 32bit systems.
> gnu: python-pyopenssl: Don't use libfaketime on 32bit systems.
Here’s an alternate solution: getting closer to fixing libfaketime.
After this patch, there are still issues with the
‘pthread_cond_timedwait’ tests that would probably need investigation or
just plain skipping.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index bc341943f02..8714086be89 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -3477,6 +3477,24 @@ (define-public libfaketime
(substitute* "src/faketime.c"
(("\"date\"")
(format #f "~s" (search-input-file inputs "bin/date"))))))
+
+ #$@(if (target-64bit?)
+ #~()
+ #~((add-after 'unpack 'switch-libc-call
+ (lambda _
+ (substitute* "src/libfaketime.c"
+ (("#define _GNU_SOURCE")
+ ;; Make sure to use the 64-bit 'struct timespec' in
+ ;; replacement functions.
+ (string-append "#define _GNU_SOURCE\n"
+ "#define _FILE_OFFSET_BITS 64\n"
+ "#define _TIME_BITS 64\n"))
+ (("\"__clock_gettime\"")
+ ;; Replace '__clock_gettime64' rather than
+ ;; '__clock_gettime64' since this is what
+ ;; newly-built applications use.
+ "\"__clock_gettime64\""))))))
+
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(setenv "CC" #$(cc-for-target))
@@ -3495,8 +3513,14 @@ (define-public libfaketime
(add-before 'check 'pre-check
(lambda _
(substitute* "test/functests/test_exclude_mono.sh"
- (("/bin/bash") (which "bash"))))))))
- (native-inputs (list perl)) ;for tests
+ (("/bin/bash") (which "bash")))
+ #$@(if (target-64bit?)
+ #~()
+ ;; This test uses Perl to call 'clock_gettime' and fails
+ ;; for unclear reasons on i686-linux.
+ #~((delete-file
+ "test/functests/test_exclude_mono.sh"))))))))
+ (native-inputs (list perl)) ;for tests
(inputs (list coreutils-minimal))
(synopsis "Fake the system time for single applications")
(description
[Message part 3 (text/plain, inline)]
Another option: use ‘datefudge’ rather than ‘libfaketime’ for those
packages.
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71993
; Package
guix-patches
.
(Mon, 08 Jul 2024 12:55:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 71993 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/check.scm (libfaketime)[arguments]: Add
‘switch-libc-call’ phase when not ‘target-64bit?’.
In ‘pre-check’ phase, delete ‘test_exclude_mono.sh’ on 32-bit platforms.
Change-Id: Ia4c0d1d13cdfa6028f3e11c63e76122a99a84e4d
---
gnu/packages/check.scm | 38 +++++++++++++++++++++++++++++++++++---
1 file changed, 35 insertions(+), 3 deletions(-)
This updated version of the patch works for me on i686-linux.
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index bc341943f02..ee23406c86f 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -26,7 +26,7 @@
;;; Copyright © 2017 Nikita <nikita <at> n0.is>
;;; Copyright © 2015, 2017, 2018, 2020, 2021, 2023, 2024 Ricardo Wurmus <rekado <at> elephly.net>
;;; Copyright © 2016-2022 Marius Bakke <marius <at> gnu.org>
-;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2017-2018, 2020-2021, 2024 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2018 Fis Trivial <ybbs.daans <at> hotmail.com>
;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
;;; Copyright © 2019 Chris Marusich <cmmarusich <at> gmail.com>
@@ -3477,6 +3477,32 @@ (define-public libfaketime
(substitute* "src/faketime.c"
(("\"date\"")
(format #f "~s" (search-input-file inputs "bin/date"))))))
+
+ #$@(if (target-64bit?)
+ #~()
+ #~((add-after 'unpack 'switch-libc-call
+ (lambda _
+ (substitute* "src/libfaketime.c"
+ (("#define _GNU_SOURCE")
+ ;; Make sure to use the 64-bit 'struct timespec' in
+ ;; replacement functions.
+ (string-append "#define _GNU_SOURCE\n"
+ "#define _FILE_OFFSET_BITS 64\n"
+ "#define _TIME_BITS 64\n"))
+ (("\"__clock_gettime\"")
+ ;; Replace '__clock_gettime64' rather than
+ ;; '__clock_gettime64' since this is what
+ ;; newly-built applications use.
+ "\"__clock_gettime64\""))
+
+ ;; XXX: Turn off 'pthread_cond_timedwait' etc.: tests
+ ;; related to this are failing and this feature is
+ ;; probably not useful for the purposes of running
+ ;; code at a fixed date.
+ (substitute* "src/Makefile"
+ (("-DFAKE_PTHREAD")
+ ""))))))
+
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(setenv "CC" #$(cc-for-target))
@@ -3495,8 +3521,14 @@ (define-public libfaketime
(add-before 'check 'pre-check
(lambda _
(substitute* "test/functests/test_exclude_mono.sh"
- (("/bin/bash") (which "bash"))))))))
- (native-inputs (list perl)) ;for tests
+ (("/bin/bash") (which "bash")))
+ #$@(if (target-64bit?)
+ #~()
+ ;; XXX: This test uses Perl to call 'clock_gettime' and
+ ;; fails for unclear reasons on i686-linux.
+ #~((delete-file
+ "test/functests/test_exclude_mono.sh"))))))))
+ (native-inputs (list perl)) ;for tests
(inputs (list coreutils-minimal))
(synopsis "Fake the system time for single applications")
(description
base-commit: e4da066f0029ef38f6a791f6f9d4cfdb8b39b6a3
--
2.45.2
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71993
; Package
guix-patches
.
(Tue, 09 Jul 2024 08:51:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 71993 <at> debbugs.gnu.org (full text, mbox):
retitle 71993 [core-updates] gnu: libfaketime: Support compilation with glibc 2.39 on i686-linux.
thanks
Changed bug title to '[core-updates] gnu: libfaketime: Support compilation with glibc 2.39 on i686-linux.' from '[PATCH core-updates 0/2] Don't use libfaketime for key package tests on 32bit systems'
Request was from
Christopher Baines <mail <at> cbaines.net>
to
control <at> debbugs.gnu.org
.
(Tue, 09 Jul 2024 08:51:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71993
; Package
guix-patches
.
(Sun, 21 Jul 2024 01:05:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 71993 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Christopher Baines <mail <at> cbaines.net> writes:
> As it fails to build and seems broken.
>
>
> Christopher Baines (2):
> gnu: nss: Don't use libfaketime on 32bit systems.
> gnu: python-pyopenssl: Don't use libfaketime on 32bit systems.
>
> gnu/packages/nss.scm | 15 +++++++++++++--
> gnu/packages/python-crypto.scm | 10 ++++++++--
> 2 files changed, 21 insertions(+), 4 deletions(-)
libfaketime is actually good, it just fails the test because coreutils
uses 64bit time_t.
gnulib will enable 64bit time_t on 32bit platforms, but we don't
currently support this, mixed abi will cause many problems[1], so turning
off 64bit time_t on coreutils can fix libfaketime's tests, and nss can
also use libfaketime because they use same time_t.
And libfaketime is not provided 64-bit time_t support on 32-bit archs,
see https://github.com/wolfcw/libfaketime/issues/418
We need to open a new branch to migrate time64 later
And see also
https://wiki.gentoo.org/wiki/Project:Toolchain/time64_migration
https://wiki.debian.org/ReleaseGoals/64bit-time
[1] https://bugs.gentoo.org/828001
[0001-Revert-gnu-libfaketime-Support-compilation-with-glib.patch (text/x-patch, inline)]
From 5cbb346385201fb6fce1057a13a49c7977e9dd34 Mon Sep 17 00:00:00 2001
Message-ID: <5cbb346385201fb6fce1057a13a49c7977e9dd34.1721522810.git.zhengjunjie <at> iscas.ac.cn>
From: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
Date: Sat, 20 Jul 2024 22:35:27 +0800
Subject: [PATCH 1/2] Revert "gnu: libfaketime: Support compilation with glibc
2.39 on i686-linux."
This reverts commit 127f1842fb037cc5acfc5406e373ccd723127732.
---
gnu/packages/check.scm | 38 +++-----------------------------------
1 file changed, 3 insertions(+), 35 deletions(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 70f828b2a1..0ec375069e 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -26,7 +26,7 @@
;;; Copyright © 2017 Nikita <nikita <at> n0.is>
;;; Copyright © 2015, 2017, 2018, 2020, 2021, 2023, 2024 Ricardo Wurmus <rekado <at> elephly.net>
;;; Copyright © 2016-2022 Marius Bakke <marius <at> gnu.org>
-;;; Copyright © 2017-2018, 2020-2021, 2024 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2018 Fis Trivial <ybbs.daans <at> hotmail.com>
;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
;;; Copyright © 2019 Chris Marusich <cmmarusich <at> gmail.com>
@@ -3478,32 +3478,6 @@ (define-public libfaketime
(substitute* "src/faketime.c"
(("\"date\"")
(format #f "~s" (search-input-file inputs "bin/date"))))))
-
- #$@(if (target-64bit?)
- #~()
- #~((add-after 'unpack 'switch-libc-call
- (lambda _
- (substitute* "src/libfaketime.c"
- (("#define _GNU_SOURCE")
- ;; Make sure to use the 64-bit 'struct timespec' in
- ;; replacement functions.
- (string-append "#define _GNU_SOURCE\n"
- "#define _FILE_OFFSET_BITS 64\n"
- "#define _TIME_BITS 64\n"))
- (("\"__clock_gettime\"")
- ;; Replace '__clock_gettime64' rather than
- ;; '__clock_gettime64' since this is what
- ;; newly-built applications use.
- "\"__clock_gettime64\""))
-
- ;; XXX: Turn off 'pthread_cond_timedwait' etc.: tests
- ;; related to this are failing and this feature is
- ;; probably not useful for the purposes of running
- ;; code at a fixed date.
- (substitute* "src/Makefile"
- (("-DFAKE_PTHREAD")
- ""))))))
-
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(setenv "CC" #$(cc-for-target))
@@ -3522,14 +3496,8 @@ (define-public libfaketime
(add-before 'check 'pre-check
(lambda _
(substitute* "test/functests/test_exclude_mono.sh"
- (("/bin/bash") (which "bash")))
- #$@(if (target-64bit?)
- #~()
- ;; XXX: This test uses Perl to call 'clock_gettime' and
- ;; fails for unclear reasons on i686-linux.
- #~((delete-file
- "test/functests/test_exclude_mono.sh"))))))))
- (native-inputs (list perl)) ;for tests
+ (("/bin/bash") (which "bash"))))))))
+ (native-inputs (list perl)) ;for tests
(inputs (list coreutils-minimal))
(synopsis "Fake the system time for single applications")
(description
base-commit: 3f15785c71eb82832ac0520c762a18a51861a141
--
2.45.2
[0002-gnu-coreutils-Disable-64bit-time_t-on-32bit-platform.patch (text/x-patch, inline)]
From 273c1c1189d824b86ae531bd1b5df601f0e7e838 Mon Sep 17 00:00:00 2001
Message-ID: <273c1c1189d824b86ae531bd1b5df601f0e7e838.1721522810.git.zhengjunjie <at> iscas.ac.cn>
In-Reply-To: <5cbb346385201fb6fce1057a13a49c7977e9dd34.1721522810.git.zhengjunjie <at> iscas.ac.cn>
References: <5cbb346385201fb6fce1057a13a49c7977e9dd34.1721522810.git.zhengjunjie <at> iscas.ac.cn>
From: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
Date: Sun, 21 Jul 2024 08:36:28 +0800
Subject: [PATCH 2/2] gnu: coreutils: Disable 64bit time_t on 32bit platform.
* gnu/packages/nss.scm (nss)[arguments]<#:configure-flags>: Pass
gl_cv_type_time_t_bits_macro=no on 32bit platform.
Change-Id: I3ba9e21733727a41f2070a27ccba39c9d5f2d406
---
gnu/packages/base.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index bc30d73426..47488c1603 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -471,6 +471,13 @@ (define-public coreutils
" test-renameatu"
" test-utimensat")))
'())
+ ,@(if (target-64bit?)
+ '()
+ ;; We currently do not support 64-bit time_t on 32-bit platforms,
+ ;; mixing different bits of time_t will cause a lot of problems
+ ;; so forcibly disable it.
+ ;; see https://wiki.gentoo.org/wiki/Project:Toolchain/time64_migration
+ '(#:configure-flags (list "gl_cv_type_time_t_bits_macro=no")))
#:phases (modify-phases %standard-phases
(add-before 'build 'patch-shell-references
(lambda _
--
2.45.2
[signature.asc (application/pgp-signature, inline)]
bug closed, send any further explanations to
71993 <at> debbugs.gnu.org and Christopher Baines <mail <at> cbaines.net>
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 21 Aug 2024 15:41:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 19 Sep 2024 11:24:14 GMT)
Full text and
rfc822 format available.
This bug report was last modified 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.