Bug#1012077: linuxinfo FTBFS on riscv64
Hi Helge, It looks like this will always be a complex issue on RISC-V since there is such a variety of manufacturers. However I think the following would be the best approach. First, if there is a uarch field, use that since it will describe the design of the cores present, such as Sifive's U74-MC which can be licensed to other manufacturers, in a similar way to ARM core IP. If there isn't a uarch field, try to use the "model name" field if it is present, since on the C910 this seems to replace the uarch field (C910 is a core). Finally, if neither of those fields exist, the isa field might be ok but I would add "unknown core" to the output. The letters at the end of the isa field indicate which instruction set extensions are present. (i for basic integer support, a for atomics, v for vector, etc) So it is useful info, but it is vendor-generic for the most part. -Alan
Bug#1012181: ldc ftbfs on riscv64
Source: ldc Version: 1:1.12.0-1 Severity: serious Tags: ftbfs upstream Justification: fails to build from source X-Debbugs-Cc: ab.bea...@gmail.com Dear Maintainer, This package fails to build on riscv64 because the architecture is not supported. The buildd log: https://buildd.debian.org/status/fetch.php?pkg=ldc=riscv64=1%3A1.29.0-2=1651200924=0 The error shown is due to the fact that druntime, used in ldc, does not support riscv64. Support would need to be added in druntime, and then also in ldc. Here are the architectures currently supported by ldc: https://wiki.dlang.org/LDC#Architectures I recommend that ldc be removed from riscv64 until upstream adds support. -Alan Beadle -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: riscv64 Kernel: Linux 5.18.0-starfive-5.18 (SMP w/2 CPU threads) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system)
Bug#1012083: quickfix FTBFS on riscv64
Source: quickfix Version: 1.15.1+dfsg-4 Severity: serious Tags: ftbfs patch upstream Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: ab.bea...@gmail.com Dear Maintainer, Currently, quickfix fails to build on riscv64. The problem occues due to the inclusion of an old version of the double-conversion utility in the following subdirectory: src/C++/double-conversion/ You can view the (trivial) upstream commit to add riscv64 support here: https://github.com/google/double-conversion/commit/8316ed5bf405835558a476e528d8e1d0adf69dd9 You can review the failed build log here: https://buildd.debian.org/status/fetch.php?pkg=quickfix=riscv64=1.15.1%2Bdfsg-4=1652988337=0 The least intrusive solution is to patch the included utility in the same way that the upstream source for this utility already has. I am including a patch which does this. I have confirmed that this patch allows building quickfix on actual riscv64 hardware (StatFive VisionFive V1). Please consider applying the included patch (or similar) for the next upload. Thank you, -Alan Beadle -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: riscv64 Kernel: Linux 5.18.0-starfive-5.18 (SMP w/2 CPU threads) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Index: quickfix-1.15.1+dfsg/src/C++/double-conversion/utils.h === --- quickfix-1.15.1+dfsg.orig/src/C++/double-conversion/utils.h +++ quickfix-1.15.1+dfsg/src/C++/double-conversion/utils.h @@ -69,7 +69,8 @@ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ defined(__SH4__) || defined(__alpha__) || \ defined(_MIPS_ARCH_MIPS32R2) || \ -defined(__AARCH64EL__) || defined(__aarch64__) +defined(__AARCH64EL__) || defined(__aarch64__) || \ +defined(__riscv) #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 #elif defined(__mc68000__) #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
Bug#1012077: linuxinfo FTBFS on riscv64
Package: linuxinfo Version: 3.3.3-1 Severity: serious Tags: ftbfs patch upstream Justification: fails to build from source X-Debbugs-Cc: ab.bea...@gmail.com Dear Maintainer, linuxinfo currently fails to build on riscv64 due to this architecture not being supported by upstream. I am attaching a patch which adds placeholder support for this architecture and allows building the riscv64 debian package from source. Please consider applying this patch (or similar) for the next upload. In addition, the /proc information below is for a riscv64 VisionFive V1 SBC. Thank you, -Alan Beadle -- Package-specific info: /proc/cpuinfo: processor : 0 hart: 1 isa : rv64imafdc mmu : sv39 uarch : sifive,u74-mc processor : 1 hart: 0 isa : rv64imafdc mmu : sv39 uarch : sifive,u74-mc Size of /proc/kcore: -r 1 root root 18446744000862892032 May 25 19:58 /proc/kcore /proc/meminfo: MemTotal:7351200 kB MemFree: 1778728 kB MemAvailable:6685728 kB Buffers: 75344 kB Cached: 4719384 kB SwapCached:0 kB Active: 894708 kB Inactive:4391724 kB Active(anon):460 kB Inactive(anon): 497556 kB Active(file): 894248 kB Inactive(file): 3894168 kB Unevictable: 15396 kB Mlocked: 15396 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 912 kB Writeback: 0 kB AnonPages:507140 kB Mapped: 260068 kB Shmem: 628 kB KReclaimable: 204236 kB Slab: 241012 kB SReclaimable: 204236 kB SUnreclaim:36776 kB KernelStack:1696 kB PageTables: 3264 kB NFS_Unstable: 0 kB Bounce:0 kB WritebackTmp: 0 kB CommitLimit: 3675600 kB Committed_AS: 687620 kB VmallocTotal: 67108864 kB VmallocUsed:6316 kB VmallocChunk: 0 kB Percpu: 552 kB CmaTotal: 655360 kB CmaFree: 650112 kB HugePages_Total: 0 HugePages_Free:0 HugePages_Rsvd:0 HugePages_Surp:0 Hugepagesize: 2048 kB Hugetlb: 0 kB -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: riscv64 Kernel: Linux 5.18.0-starfive-5.18 (SMP w/2 CPU threads) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages linuxinfo depends on: ii libc6 2.33-7 linuxinfo recommends no packages. linuxinfo suggests no packages. -- no debconf information Index: linuxinfo-3.3.3/linuxinfo.h === --- linuxinfo-3.3.3.orig/linuxinfo.h +++ linuxinfo-3.3.3/linuxinfo.h @@ -103,6 +103,10 @@ #define system_avr32 #endif +#if defined(__riscv) +#define system_riscv +#endif + #if (SIZEOF_LONG > 4) #define LONGLONG long int #define LONGSPEC "%ld" Index: linuxinfo-3.3.3/linuxinfo_riscv.c === --- /dev/null +++ linuxinfo-3.3.3/linuxinfo_riscv.c @@ -0,0 +1,25 @@ +/* +linuxinfo_riscv.c + + This allows compilation on riscv + +*/ + +#include +#include "linuxinfo.h" + +#ifdef system_riscv + +void GetHardwareInfo(int fd, struct hw_stat *hw) +{ + sprintf(hw->hw_memory, LONGSPEC, 0); + + hw->hw_processors = 0; + + sprintf(hw->hw_cpuinfo, "%s", "Unknown"); + sprintf(hw->hw_bogomips, "%0.2f", 0.0); + sprintf(hw->hw_megahertz, "?"); + hw->hw_processors = 0; +} + +#endif /* system_riscv */ Index: linuxinfo-3.3.3/Makefile.am === --- linuxinfo-3.3.3.orig/Makefile.am +++ linuxinfo-3.3.3/Makefile.am @@ -4,7 +4,8 @@ linuxinfo_SOURCES = linuxinfo.c linuxinf linuxinfo_alpha.c linuxinfo_ia64.c linuxinfo_intel.c \ linuxinfo_m68k.c linuxinfo_ppc.c linuxinfo_sh.c \ linuxinfo_hppa.c linuxinfo_s390.c linuxinfo_avr.c \ - linuxinfo_sparc.c linuxinfo_mips.c linuxinfo_unknown.c + linuxinfo_sparc.c linuxinfo_mips.c linuxinfo_riscv.c \ + linuxinfo_unknown.c man_MANS = po4a/linuxinfo.1 EXTRA_DIST= config.rpath CREDITS VERSION = 3.3.3
Bug#1011963: open-invaders FTBFS on riscv64
Package: open-invaders Version: 0.3-7 Severity: serious Tags: ftbfs patch Justification: fails to build from source X-Debbugs-Cc: ab.bea...@gmail.com Dear Maintainer, open-invaders has a ftbfs issue on riscv64. Full buildd log here: https://buildd.debian.org/status/fetch.php?pkg=open-invaders=riscv64=0.3-7=1651106683=0 At compile time it tries to detect the architecture to determine datatype sizes, and it is missing the check for riscv64, so it defaults to an incorrect value. I am including a patch which fixes the problem. Please consider applying it in the next upload. Thank you. -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: riscv64 Kernel: Linux 5.18.0-starfive-5.18 (SMP w/2 CPU threads) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages open-invaders depends on: ii libaldmb1 1:0.9.3-6 ii liballegro4.4 2:4.4.3.1-2 ii libc6 2.33-7 ii libdumb11:0.9.3-6 ii libgcc-s1 12.1.0-2 ii libstdc++6 12.1.0-2 ii open-invaders-data 0.3-7 open-invaders recommends no packages. open-invaders suggests no packages. -- no debconf information From: Alan Beadle Date: Fri 27 May 2022 09:36:54 PM EDT Subject: Fix ftbfs on riscv Fix failing compile-time detection of dataype size --- open-invaders-0.3.orig/headers/pmask.h +++ open-invaders-0.3/headers/pmask.h @@ -37,7 +37,7 @@ confusing. //don't worry about setting it incorrectly //you'll get a compile error if you do, not a run-time error #if defined(__alpha__) || defined(__ia64__) || (defined(__x86_64__) && defined(__LP64__)) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) \ - || defined(__powerpc64__) || defined(__aarch64__) || (defined(__mips64) && defined(__LP64__)) + || defined(__powerpc64__) || defined(__aarch64__) || (defined(__mips64) && defined(__LP64__)) || (defined(__riscv) && defined(__LP64__)) #define MASK_WORD_BITBITS 6 #else #define MASK_WORD_BITBITS 5
Bug#1011953: thinkfan FTBFS on riscv
Package: thinkfan Version: 1.3.1-1 Severity: serious Tags: ftbfs patch Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: ab.bea...@gmail.com Dear Maintainer, The thinkfan package has a ftbfs issue on riscv64. Full buildd log here: https://buildd.debian.org/status/fetch.php?pkg=thinkfan=riscv64=1.3.1-1=1649865911=0 I am including a patch which fixes the problem. Please consider applying it in the next upload. Thank you. -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: riscv64 Kernel: Linux 5.18.0-starfive-5.18 (SMP w/2 CPU threads) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages thinkfan depends on: ii init-system-helpers 1.63 ii libatasmart4 0.19-5 ii libatomic1 12.1.0-2 ii libc62.33-7 ii libgcc-s112.1.0-2 ii libstdc++6 12.1.0-2 ii libyaml-cpp0.7 0.7.0+dfsg-8 thinkfan recommends no packages. thinkfan suggests no packages. -- no debconf information fix ftbfs on riscv64 Alan Beadle --- thinkfan-1.3.1.orig/CMakeLists.txt +++ thinkfan-1.3.1/CMakeLists.txt @@ -8,6 +8,8 @@ cmake_minimum_required(VERSION 3.0) # Generate absolute paths or something cmake_policy(SET CMP0015 NEW) +set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(PkgConfig) find_package(Threads) pkg_check_modules(SYSTEMD "systemd")