• Bug#1065797: st: FTBFS on arm{el,hf}: res.c:115:12: error: implicit dec

    From Sebastian Ramacher@21:1/5 to All on Sat Mar 9 23:00:01 2024
    Source: st
    Version: 1.9-3.3
    Severity: serious
    Tags: ftbfs
    Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: sramacher@debian.org

    https://buildd.debian.org/status/fetch.php?pkg=st&arch=armhf&ver=1.9-3.3&stamp=1709892445&raw=0

    gcc -DLINUX -Wall -O -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-
    time -D_FORTIFY_SOURCE=2 -I../LINUX_6.1.0-18-arm64_OPT -c res.c -o ../LINUX_6.1.0-18-arm64_OPT/res.o
    res.c: In function ‘parse_answer’:
    res.c:115:12: error: implicit declaration of function ‘_getshort’; did you mean ‘__putshort’? [-Werror=implicit-function-declaration]
    115 | type = _getshort(cp);
    | ^~~~~~~~~
    | __putshort
    cc1: some warnings being treated as errors
    make[3]: *** [Makefile:115: ../LINUX_6.1.0-18-arm64_OPT/res.o] Error 1

    Cheers
    --
    Sebastian Ramacher

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zixing Liu@21:1/5 to All on Mon Apr 15 21:40:01 2024
    This is a multi-part MIME message sent by reportbug.


    Package: st
    Followup-For: Bug #1065797
    User: ubuntu-devel@lists.ubuntu.com
    Usertags: origin-ubuntu noble ubuntu-patch
    Control: tags -1 patch

    Dear Maintainer,

    In Ubuntu, the attached patch was applied to achieve the following:

    * debian/patches/02-implicit-declarations.patch: Fix an improper macro
    feature check. (Closes #1065797, LP: #2060973).
    * debian/patches/1032955_riscv_support.patch: Add support for RISC-V
    CPU. Thanks to Steven Liu <liuqi05@kuaishou.com>. (LP: #2061639).


    Thanks for considering the patch.


    -- System Information:
    Debian Release: bookworm/sid
    APT prefers jammy-updates
    APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), (100, 'jammy-backports')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386

    Kernel: Linux 6.5.0-27-generic (SMP w/10 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
    Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    diff -Nru st-1.9/debian/patches/02-implicit-declarations.patch st-1.9/debian/patches/02-implicit-declarations.patch
    --- st-1.9/debian/patches/02-implicit-declarations.patch 1969-12-31 17:00:00.000000000 -0700
    +++ st-1.9/debian/patches/02-implicit-declarations.patch 2024-04-15 10:06:57.000000000 -0600
    @@ -0,0 +1,21 @@
    +Description: Fix an improper macro feature check
    + This resolves the implicit declaration error on armhf
    +Author: Zixing Liu <zixing.liu@canonical.com>
    +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065797 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/st/+bug/2060973 +Forwarded: no
    +Last-Update: 2024-04-15
    +---
    +Index: st/examples/res.c +===================================================================
    +--- st.orig/examples/res.c
    ++++ st/examples/res.c
    +@@ -82,7 +82,7 @@
    + #endif
    +
    + /* New in Solaris 7 */
    +-#if !defined(_getshort) && defined(ns_get16)
    ++#if !defined(_getshort) && defined(NS_GET16)
    + #define _getshort(cp) ns_get16(cp)
    + #endif
    +
    diff -Nru st-1.9/debian/patches/1032955_riscv_support.patch st-1.9/debian/patches/1032955_riscv_support.patch
    ---