• Bug#1066629: ucspi-tcp: FTBFS: tcpserver.c:143:29: error: implicit decl

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 14:20:04 2024
    Source: ucspi-tcp
    Version: 1:0.88-8
    Severity: serious
    Justification: FTBFS
    Tags: trixie sid ftbfs
    User: lucas@debian.org
    Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef

    Hi,

    During a rebuild of all packages in sid, your package failed to build
    on amd64.

    This is most likely caused by a change in dpkg 1.22.6, that enabled -Werror=implicit-function-declaration. For more information, see https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration

    Relevant part (hopefully):
    x86_64-linux-gnu-gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -c tcpserver.c
    tcpserver.c: In function ‘doit’:
    tcpserver.c:143:29: error: implicit declaration of function ‘getpid’ [-Werror=implicit-function-declaration]
    143 | strnum[fmt_ulong(strnum,getpid())] = 0;
    | ^~~~~~
    tcpserver.c:148:5: error: implicit declaration of function ‘socket_ipoptionskill’ [-Werror=implicit-function-declaration]
    148 | socket_ipoptionskill(t);
    | ^~~~~~~~~~~~~~~~~~~~
    tcpserver.c:150:5: error: implicit declaration of function ‘socket_tcpnodelay’ [-Werror=implicit-function-declaration]
    150 | socket_tcpnodelay(t);
    | ^~~~~~~~~~~~~~~~~
    tcpserver.c:210:7: error: implicit declaration of function ‘close’ [-Werror=implicit-function-declaration]
    210 | close(fdrules);
    | ^~~~~
    tcpserver.c: At top level:
    tcpserver.c:292:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    292 | main(int argc,char **argv)
    | ^~~~
    tcpserver.c: In function ‘main’:
    tcpserver.c:408:12: error: implicit declaration of function ‘fork’ [-Werror=implicit-function-declaration]
    408 | switch(fork()) {
    | ^~~~
    cc1: some warnings being treated as errors
    make[2]: *** [Makefile:759: tcpserver.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/ucspi-tcp_0.88-8_unstable.log

    All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lucas@debian.org
    or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

    A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

    If you reassign this bug to another package, please mark it as 'affects'-ing this package. See https://www.debian.org/Bugs/server-control#affects

    If you fail to reproduce this, please provide a build log and diff it with mine so that we can identify if something relevant changed in the meantime.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Fri Apr 12 23:10:01 2024
    Processing control commands:

    tags -1 patch
    Bug #1066629 [src:ucspi-tcp] ucspi-tcp: FTBFS: tcpserver.c:143:29: error: implicit declaration of function ‘getpid’ [-Werror=implicit-function-declaration]
    Added tag(s) patch.

    --
    1066629: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066629
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

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


    Package: ucspi-tcp
    Followup-For: Bug #1066629
    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/0006-implicit-declarations.patch: Add missing
    includes and prototypes. Closes LP: #2061188.
    * debian/ipv6-support.patch: Refresh deferred patch.


    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-26-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 ucspi-tcp-0.88/debian/ipv6-support.patch ucspi-tcp-0.88/debian/ipv6-support.patch
    --- ucspi-tcp-0.88/debian/ipv6-support.patch 2024-02-27 02:57:42.000000000 -0700
    +++ ucspi-tcp-0.88/debian/ipv6-support.patch 2024-04-12 14:19:46.000000000 -0600
    @@ -741,7 +741,7 @@
    index 0948b1a..f06c5a8 100644
    --- a/dns.h
    +++ b/dns.h
    -@@ -34,51 +34,60 @@ struct dns_transmit {
    +@@ -34,51 +34,61 @@ struct dns_transmit {
    unsigned int curserver;
    struct taia deadline;
    unsigned int pos;
    @@ -812,6 +812,7 @@
    -extern int dns_mx_packet(stralloc *,char *,unsigned int);
    -extern int dns_mx(stralloc *,stralloc *);
    +extern int dns_name4(stralloc *,const char *);
    ++extern int dns_name6(stralloc *,char *);
    +extern int dns_txt_packet(stralloc *,const char *,unsigned int);
    +extern int dns_txt(stralloc *,const stralloc *);
    +extern int dns_mx_packet(stralloc *,const char *,unsigned int);
    @@ -1330,11 +1331,6 @@
    index b9892b4..2158ed4 100644
    --- a/dns_random.c
    +++ b/dns_random.c
    -@@ -1,3 +1,4 @@
    -+#include <unistd.h>
    - #include "dns.h"
    - #include "taia.h"
    - #include "uint32.h"