Hi, On powerpc64le-linux, using Guix commit7692295f970a292a3f3db31fc21d05efd97dcb25 on top of Debian unstable, thelibfaketime package fails to build because one of its tests hangs. Itappears to hang during the CLOCK_MONOTONIC test:
Toggle snippet (8 lines)Running the test program with no faked time specified$ LD_PRELOAD=../src/libfaketime.so.1 ./timetestpthread_cond_timedwait: CLOCK_REALTIME test(Intentionally sleeping 1 second...)pthread_cond_timedwait: CLOCK_MONOTONIC test(Intentionally sleeping 1 second..., see docs about CLOCK_MONOTONIC test)
There is no output after that last line. It just sits there. I left itthere for about 24 hours, and it didn't make any progress. I tried with--cores=1, too, but the problem still occurred. Therefore, it probablyisn't a multithreading issue. On x86_64-linux Guix, using the aforementioned commit, on top of Fedora32, the tests pass and the libfaketime builds successfully. Therefore,this is probably a platform-specific issue. The README file for libfaketime says:
Toggle quote (8 lines)> CLOCK_MONOTONIC test: Running "make test" performs a series of tests> after successful compilation of the libfaketime library. On some> platforms, the "CLOCK_MONOTONIC test" will apparently hang> forever. If and only if this happens on your platform, add the CFLAG> -DFORCE_MONOTONIC_FIX to src/Makefile and recompile libfaketime. Do> not set FORCE_MONOTONIC_FIX on platforms where the test does not> hang.
In fact, we do set this in Guix, via the (apparently undocumented)FAKETIME_COMPILE_CFLAGS environment variable:
Toggle snippet (19 lines)(define-public libfaketime (package (name "libfaketime") ... (arguments '(#:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (setenv "CC" "gcc") (setenv "PREFIX" out) ;; XXX: Without this flag, the CLOCK_REALTIME test hangs ;; indefinitely. See README.packagers for more information. ;; Try removing this for future versions of libfaketime. (setenv "FAKETIME_COMPILE_CFLAGS" "-DFORCE_MONOTONIC_FIX") ...
In spite of this, the test hangs on powerpc64le-linux. Out ofcuriosity, I tried NOT setting FAKETIME_COMPILE_CFLAGS, but the behaviorwas the same: it still got stuck forever on powerpc64le-linux. -- Chris