Bug#1139233: fftw3: unconditional rdtime use on riscv64

Adrian Bunk bunk at debian.org
Sun Jun 7 14:15:44 BST 2026


Source: fftw3
Version: 3.3.11-1
Severity: serious
Tags: patch
Forwarded: https://github.com/FFTW/fftw3/pull/406
X-Debbugs-Cc: debian-riscv at lists.debian.org
User: debian-riscv at lists.debian.org
Usertags: riscv64
Control: affects -1 src:sndfile-tools

https://ci.debian.net/packages/s/sndfile-tools/testing/riscv64/71828732/

...
177s autopkgtest [08:44:03]: test upstream-tests: [-----------------------
184s valgrind /usr/bin/sndfile-generate-chirp : ok
192s valgrind /usr/bin/sndfile-resample    : 1 errors, 0 bytes leaked
196s valgrind /usr/bin/sndfile-resample    : 1 errors, 0 bytes leaked
200s valgrind /usr/bin/sndfile-resample    : 1 errors, 0 bytes leaked
204s valgrind /usr/bin/sndfile-spectrogram : tests/test-wrapper.sh: line 15:  1804 Illegal instruction        $valgrind $@ > $logfile 2>&1
204s ok
215s valgrind /usr/bin/sndfile-waveform    : 0 errors, 432 bytes leaked
215s autopkgtest [08:44:41]: test upstream-tests: -----------------------]
215s autopkgtest [08:44:41]: test upstream-tests:  - - - - - - - - - - results - - - - - - - - - -
215s upstream-tests       FAIL stderr: tests/test-wrapper.sh: line 15:  1804 Illegal instruction        $valgrind $@ > $logfile 2>&1
...


A fix is attached.
-------------- next part --------------
>From abaa6f77feb882f53a132f9c931db56c8d2f7b05 Mon Sep 17 00:00:00 2001
From: Adrian Bunk <bunk at debian.org>
Date: Sun, 7 Jun 2026 14:39:39 +0300
Subject: RISC-V: rdtime is part of the Zicntr extension

---
 kernel/cycle.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cycle.h b/kernel/cycle.h
index 089bdafe..c205cdbd 100644
--- a/kernel/cycle.h
+++ b/kernel/cycle.h
@@ -486,7 +486,7 @@ INLINE_ELAPSED(inline)
 #define HAVE_TICK_COUNTER
 #endif
 
-#if defined(__riscv_xlen) && !defined(HAVE_TICK_COUNTER)
+#if defined(__riscv_xlen) && defined(__riscv_zicntr) && !defined(HAVE_TICK_COUNTER)
 typedef uint64_t ticks;
 static inline ticks getticks(void)
 {
-- 
2.47.3



More information about the debian-science-maintainers mailing list