• Bug#1066654: mlpcap: FTBFS: utils.c:184:3: error: implicit declaration

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 14:30:02 2024
    XPost: linux.debian.maint.ocaml.maint

    Source: mlpcap
    Version: 0.9-21
    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):
    gcc -c -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fPIC -I /usr/lib/ocaml -DHAVE_PCAP08 -I'/usr/lib/ocaml' \
    utils.c -o utils.o
    utils.c: In function ‘_pcap_callback’:
    utils.c:50:13: warning: "alloc_small" is deprecated: use "caml_alloc_small" instead
    50 | tval = alloc_small (2, 0);
    | ^~~~~~~~~~~~~~~~
    utils.c:55:13: warning: "alloc_small" is deprecated: use "caml_alloc_small" instead
    55 | hdr = alloc_small (3, 0);
    | ^~~~~~~~~~~~~~~
    utils.c:63:13: warning: "callback3" is deprecated: use "caml_callback3" instead
    63 | callback3 (*(value *) cback, Val_bp (p1), hdr, Val_bp (p2));
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ utils.c: In function ‘build_pcap_if_array’:
    utils.c:95:13: warning: "copy_string" is deprecated: use "caml_copy_string" instead
    95 | _v3[0] = copy_string ((*_c2).name);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    utils.c:97:13: warning: "copy_string" is deprecated: use "caml_copy_string" instead
    97 | _v3[1] = copy_string("No description");
    | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ utils.c:98:13: warning: "copy_string" is deprecated: use "caml_copy_string" instead
    98 | } else _v3[1] = copy_string((*_c2).description);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    utils.c: In function ‘camlidl_pcap_pcap_findalldevs’:
    utils.c:163:13: warning: "failwith" is deprecated: use "caml_failwith" instead
    163 | failwith(errbuf);
    | ^~~~~~~~~~~~~
    utils.c: In function ‘camlidl_pcap_pcap_list_datalinks’:
    utils.c:184:3: error: implicit declaration of function ‘camlidl_ml2c_pcap_pcap_handle’ [-Werror=implicit-function-declaration]
    184 | camlidl_ml2c_pcap_pcap_handle(_v_p, &p, _ctx);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    make[3]: *** [OCamlMakefile:859: utils.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/mlpcap_0.9-21_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 Steve Langasek@21:1/5 to All on Thu Apr 11 02:30:01 2024
    XPost: linux.debian.maint.ocaml.maint

    This is a multi-part MIME message sent by reportbug.


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

    Please find attached a patch for this issue that has been uploaded to
    Ubuntu.

    --
    Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer https://www.debian.org/ slangasek@ubuntu.com vorlon@debian.org

    diff -Nru mlpcap-0.9/debian/patches/no-implicit-declarations.patch mlpcap-0.9/debian/patches/no-implicit-declarations.patch
    --- mlpcap-0.9/debian/patches/no-implicit-declarations.patch 1969-12-31 16:00:00.000000000 -0800
    +++ mlpcap-0.9/debian/patches/no-implicit-declarations.patch 2024-04-10 16:59:47.000000000 -0700
    @@ -0,0 +1,22 @@
    +Description: add missing prototype
    + This function is code generated by camlidl from the .idl input file;
    + unfortunately it does not emit a header including the prototype.
    +Author: Steve Langasek <steve.langasek@canonical.com>
    +Bug-Debian: https://bugs.debian.org/1066654
    +Last-Update: 2024-04-10
    +Forwarded: no
    +
    +Index: mlpcap-0.9/utils.c +===================================================================
    +--- mlpcap-0.9.orig/utils.c
    ++++ mlpcap-0.9/utils.c
    +@@ -33,6 +33,9 @@
    + #include <pcap.h>
    + #include "utils.h"
    +
    ++extern void camlidl_ml2c_pcap_pcap_handle(value _v1, pcap_handle * _c2,
    ++ camlidl_ctx _ctx);
    ++
    + void
    + _pcap_callback (void *cback, va_alist alist)
    + {
    diff -Nru mlpcap-0.9/debian/patches/series mlpcap-0.9/debian/pa