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.beadle@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&arch=riscv64&ver=0.3-7&stamp=1651106683&raw=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 libdumb1 1: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 <ab.beadle@gmail.com>
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
Reply to: