• Bug#1066327: chmlib: FTBFS: chm_http.c:167:32: error: implicit declarat

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:00:18 2024
    Source: chmlib
    Version: 2:0.40a-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 -DPACKAGE_NAME=\"chmlib\" -DPACKAGE_TARNAME=\"chmlib\" -DPACKAGE_VERSION=\"0.40\" -DPACKAGE_STRING=\"chmlib\ 0.40\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"chmlib\" -DVERSION=\"0.40\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_
    H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -
    DHAVE_LIBPTHREAD=1 -DHAVE_MALLOC=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
    -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -DCHM_MT -DCHM_USE_PREAD -DCHM_USE_IO64 -MT test_chmLib.o -MD -MP -MF .deps/test_chmLib.Tpo -c -o test_chmLib.o test_chmLib.c
    chm_http.c: In function ‘chmhttp_server’:
    chm_http.c:167:32: error: implicit declaration of function ‘inet_addr’ [-Werror=implicit-function-declaration]
    167 | bindAddr.sin_addr.s_addr = inet_addr(config_bind);
    | ^~~~~~~~~
    chm_http.c:179:9: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Werror=implicit-function-declaration]
    179 | close(server.socket);
    | ^~~~~
    | pclose
    chm_http.c:192:73: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness [-Wpointer-sign]
    192 | slave->fd = accept(server.socket, (struct sockaddr *)&bindAddr, &addrLen);
    | ^~~~~~~~
    | |
    | int *
    In file included from chm_http.c:43: /usr/include/x86_64-linux-gnu/sys/socket.h:307:42: note: expected ‘socklen_t * restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘int *’
    307 | socklen_t *__restrict __addr_len);
    | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
    chm_http.c: In function ‘service_request’:
    chm_http.c:343:9: error: implicit declaration of function ‘write’; did you mean ‘fwrite’? [-Werror=implicit-function-declaration]
    343 | write(fd, INTERNAL_ERROR, strlen(INTERNAL_ERROR));
    | ^~~~~
    | fwrite
    chm_http.c:348:5: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    348 | fgets(buffer, 4096, fout);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~
    mv -f .deps/enum_chmLib.Tpo .deps/enum_chmLib.Po
    libtool: compile: x86_64-linux-gnu-gcc -DPACKAGE_NAME=\"chmlib\" -DPACKAGE_TARNAME=\"chmlib\" -DPACKAGE_VERSION=\"0.40\" "-DPACKAGE_STRING=\"chmlib 0.40\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"chmlib\" -DVERSION=\"0.40\" -DHAVE_
    STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=
    1 -DHAVE_UNISTD_H=1 -DHAVE_LIBPTHREAD=1 -DHAVE_MALLOC=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-
    security -fcf-protection -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -DCHM_MT -DCHM_USE_PREAD -DCHM_USE_IO64 -MT lzx.lo -MD -MP -MF .deps/lzx.Tpo -c lzx.c -fPIC -DPIC -o .libs/lzx.o
    mv -f .deps/enumdir_chmLib.Tpo .deps/enumdir_chmLib.Po
    mv -f .deps/test_chmLib.Tpo .deps/test_chmLib.Po
    libtool: compile: x86_64-linux-gnu-gcc -DPACKAGE_NAME=\"chmlib\" -DPACKAGE_TARNAME=\"chmlib\" -DPACKAGE_VERSION=\"0.40\" "-DPACKAGE_STRING=\"chmlib 0.40\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"chmlib\" -DVERSION=\"0.40\" -DHAVE_
    STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=
    1 -DHAVE_UNISTD_H=1 -DHAVE_LIBPTHREAD=1 -DHAVE_MALLOC=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-
    security -fcf-protection -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -DCHM_MT -DCHM_USE_PREAD -DCHM_USE_IO64 -MT chm_lib.lo -MD -MP -MF .deps/chm_lib.Tpo -c chm_lib.c -fPIC -DPIC -o .libs/chm_lib.o
    mv -f .deps/extract_chmLib.Tpo .deps/extract_chmLib.Po
    cc1: some warnings being treated as errors
    make[2]: *** [Makefile:543: chm_http.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/chmlib_0.40a-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 Mon Apr 22 21:20:01 2024
    Processing control commands:

    tags -1 patch
    Bug #1066327 [src:chmlib] chmlib: FTBFS: chm_http.c:167:32: error: implicit declaration of function ‘inet_addr’ [-Werror=implicit-function-declaration]
    Added tag(s) patch.

    --
    1066327: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066327
    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 Mon Apr 22 21:20:01 2024
    This is a multi-part MIME message sent by reportbug.


    Package: chmlib
    Followup-For: Bug #1066327
    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/implicit-declarations.patch: Add missing includes and
    fix large file support. (LP: #2062947).


    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-28-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 chmlib-0.40a/debian/patches/implicit-declarations.patch chmlib-0.40a/debian/patches/implicit-declarations.patch
    --- chmlib-0.40a/debian/patches/implicit-declarations.patch 1969-12-31 17:00:00.000000000 -0700
    +++ chmlib-0.40a/debian/patches/implicit-declarations.patch 2024-04-19 20:28:30.000000000 -0600
    @@ -0,0 +1,38 @@
    +Description: Add missing includes and fix large file support
    +Author: Zixing Liu <zixing.liu@canonical.com>
    +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066327 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2062947
    +Forwarded: no
    +Last-Update: 2024-04-19
    +---
    +--- chmlib-0.40a.orig/src/chm_http.c
    ++++ chmlib-0.40a/src/chm_http.c
    +@@ -34,6 +34,7 @@
    + #include <stdio.h>
    + #include <stdlib.h>
    + #include <string.h>
    ++#include <unistd.h>
    + #if __sun || __sgi
    + #include <strings.h>
    + #define strrchr rindex
    +@@ -43,6 +44,7 @@
    + #include <sys/socket.h>
    + #include <sys/types.h>
    + #include <netinet/in.h>
    ++#include <arpa/inet.h>
    +
    + /* threading includes */
    + #include <pthread.h>
    +--- chmlib-0.40a.orig/src/chm_lib.c
    ++++ chmlib-0.40a/src/chm_lib.c
    +@@ -86,7 +86,9 @@
  • From Zixing Liu@21:1/5 to All on Tue Apr 23 19:00:01 2024
    This is a multi-part MIME message sent by reportbug.


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

    Dear Maintainer,

    This is the updated patch that tries to address the build issue on amd64.

    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-28-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 chmlib-0.40a/debian/patches/implicit-declarations.patch chmlib-0.40a/debian/patches/implicit-declarations.patch
    --- chmlib-0.40a/debian/patches/implicit-declarations.patch 1969-12-31 17:00:00.000000000 -0700
    +++ chmlib-0.40a/debian/patches/implicit-declarations.patch 2024-04-19 20:28:40.000000000 -0600
    @@ -0,0 +1,39 @@
    +Description: Add missing includes and fix large file support
    +Author: Zixing Liu <zixing.liu@canonical.com>
    +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066327 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2062947
    +Forwarded: no
    +Last-Update: 2024-04-19
    +---
    +Index: chmlib/src/chm_http.c +===================================================================
    +--- chmlib.orig/src/chm_http.c
    ++++ chmlib/src/chm_http.c
    +@@ -34,6 +34,7 @@
    + #include <stdio.h>
    + #include <stdlib.h>
    + #include <string.h>
    ++#include <unistd.h>
    + #if __sun || __sgi
    + #include <strings.h>
    + #define strrchr rindex
    +@@ -43,6 +44,7 @@
    + #include <sys/socket.h>
    + #include <sys/types.h>
    + #include <netinet/in.h>
    ++#include <arpa/inet.h>
    +
    + /* threading includes */
    + #include <pthread.h>
    +
  • From Debian Bug Tracking System@21:1/5 to All on Tue Apr 23 19:00:01 2024
    Processing control commands:

    tags -1 patch
    Bug #1066327 [src:chmlib] chmlib: FTBFS: chm_http.c:167:32: error: implicit declaration of function ‘inet_addr’ [-Werror=implicit-function-declaration]
    Ignoring request to alter tags of bug #1066327 to the same tags previously set

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)