• Bug#1066648: ots: FTBFS: grader-tf.c:108:9: error: implicit declaration

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 14:30:02 2024
    Source: ots
    Version: 0.5.0-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):
    /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -DVERSION=\"0.5.0\" -DDICTIONARY_DIR=\"/usr/share/ots/\" -I. -I.. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -Wall -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 -c -o text.lo text.c
    dictionary.c: In function ‘ots_load_xml_dictionary’:
    dictionary.c:321:40: warning: pointer targets in passing argument 2 of ‘xmlGetProp’ differ in signedness [-Wpointer-sign]
    321 | idf_key=xmlGetProp(tf_words,"idf");
    | ^~~~~
    | |
    | char *
    In file included from /usr/include/libxml2/libxml/parser.h:16,
    from /usr/include/libxml2/libxml/globals.h:18,
    from /usr/include/libxml2/libxml/threads.h:35,
    from /usr/include/libxml2/libxml/xmlmemory.h:218,
    from dictionary.c:28: /usr/include/libxml2/libxml/tree.h:1030:57: note: expected ‘const xmlChar *’ {aka ‘const unsigned char *’} but argument is of type ‘char *’
    1030 | const xmlChar *name);
    | ~~~~~~~~~~~~~~~^~~~ dictionary.c:322:84: warning: pointer targets in passing argument 1 of ‘atof’ differ in signedness [-Wpointer-sign]
    322 | Doc->tf_terms = g_list_append (Doc->tf_terms,ots_new_OtsWordTF(key,atof(idf_key)));
    | ^~~~~~~
    | |
    | xmlChar * {aka unsigned char *}
    In file included from /usr/include/features.h:490,
    from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
    from /usr/include/stdio.h:27,
    from dictionary.c:21: /usr/include/x86_64-linux-gnu/bits/stdlib-float.h:25:1: note: expected ‘const char *’ but argument is of type ‘xmlChar *’ {aka ‘unsigned char *’}
    25 | __NTH (atof (const char *__nptr))
    | ^~~~~
    dictionary.c:322:75: warning: pointer targets in passing argument 1 of ‘ots_new_OtsWordTF’ differ in signedness [-Wpointer-sign]
    322 | Doc->tf_terms = g_list_append (Doc->tf_terms,ots_new_OtsWordTF(key,atof(idf_key)));
    | ^~~
    | |
    | xmlChar * {aka unsigned char *}
    In file included from dictionary.c:25:
    libots.h:114:43: note: expected ‘const char *’ but argument is of type ‘xmlChar *’ {aka ‘unsigned char *’}
    114 | OtsWordTF* ots_new_OtsWordTF(const char* word,const double idf);
    | ~~~~~~~~~~~~^~~~
    grader-tf.c: In function ‘ots_calc_idf’:
    grader-tf.c:108:9: error: implicit declaration of function ‘log’ [-Werror=implicit-function-declaration]
    108 | return -log(doc_word_count/term_count);
    | ^~~
    grader-tf.c:25:1: note: include ‘<math.h>’ or provide a declaration of ‘log’
    24 | #include "libots.h"
    +++ |+#include <math.h>
    25 |
    grader-tf.c:108:9: warning: incompatible implicit declaration of built-in function ‘log’ [-Wbuiltin-declaration-mismatch]
    108 | return -log(doc_word_count/term_count);
    | ^~~
    grader-tf.c:108:9: note: include ‘<math.h>’ or provide a declaration of ‘log’
    html.c: In function ‘ots_get_line_HTML’:
    html.c:62:13: warning: pointer targets in assignment from ‘gchar *’ {aka ‘char *’} to ‘unsigned char *’ differ in signedness [-Wpointer-sign]
    62 | utf8_data = text->str;
    | ^
    In file included from /usr/include/glib-2.0/glib/giochannel.h:36,
    from /usr/include/glib-2.0/glib.h:56,
    from libots.h:24,
    from html.c:24:
    html.c: In function ‘ots_get_doc_HTML’:
    html.c:105:34: warning: pointer targets in passing argument 2 of ‘g_string_append_len_inline’ differ in signedness [-Wpointer-sign]
    105 | g_string_append_len (text, utf8_data, line_len);
    | ^~~~~~~~~
    | |
    | unsigned char * /usr/include/glib-2.0/glib/gstring.h:247:37: note: in definition of macro ‘g_string_append_len’
    247 | g_string_append_len_inline (gstr, val, len)
    | ^~~
    grader.c: In function ‘ots_grade_structure’:
    grader.c:45:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    45 | if (Doc->lines!=NULL)
    | ^~
    grader.c:47:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
    47 | if (NULL!=first_line) first_line->score *= 2; /*first line/title is very important so we increase its score */
    | ^~
    /usr/include/glib-2.0/glib/gstring.h:215:41: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
    215 | const char *val,
    | ~~~~~~~~~~~~^~~
    html.c:112:13: warning: pointer targets in assignment from ‘gchar *’ {aka ‘char *’} to ‘unsigned char *’ differ in signedness [-Wpointer-sign]
    112 | utf8_data = text->str;
    | ^
    /usr/include/glib-2.0/glib/gstring.h:74:5: warning: ignoring return value of ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    70 | (__builtin_constant_p (free_segment) ? \
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    71 | ((free_segment) ? \
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    72 | (g_string_free) ((str), (free_segment)) : \
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    73 | g_string_free_and_steal (str)) \
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    74 | : \
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    75 | (g_string_free) ((str), (free_segment)))
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    html.c:114:3: note: in expansion of macro ‘g_string_free’
    114 | g_string_free (text, FALSE);
    | ^~~~~~~~~~~~~
    html.c: In function ‘ots_get_line_HTML’: /usr/include/glib-2.0/glib/gstring.h:74:5: warning: ignoring return value of ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    70 | (__builtin_constant_p (free_segment) ? \
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    71 | ((free_segment) ? \
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    72 | (g_string_free) ((str), (free_segment)) : \
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    73 | g_string_free_and_steal (str)) \
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    74 | : \
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    75 | (g_string_free) ((str), (free_segment)))
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    html.c:63:3: note: in expansion of macro ‘g_string_free’
    63 | g_string_free (text, FALSE);
    | ^~~~~~~~~~~~~
    article.c: In function ‘ots_append_word’:
    article.c:107:37: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    107 | if ((aWord == NULL) || (0==strlen(aWord)) ||(NULL==aLine)) return;
    | ^~~~~
    | |
    | const unsigned char *
    In file included from article.c:23:
    /usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
    407 | extern size_t strlen (const char *__s)
    | ~~~~~~~~~~~~^~~
    In file included from /usr/include/glib-2.0/glib/gstring.h:37,
    from /usr/include/glib-2.0/glib/giochannel.h:36,
    from /usr/include/glib-2.0/glib.h:56,
    from libots.h:24,
    from article.c:25:
    article.c:109:68: warning: pointer targets in passing argument 1 of ‘g_strdup_inline’ differ in signedness [-Wpointer-sign]
    109 | aLine->words = g_list_append (aLine->words, (gpointer) g_strdup (aWord));
    | ^~~~~
    | |
    | const unsigned char *
    /usr/include/glib-2.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’
    324 | #define g_strdup(x) g_strdup_inline (x)
    | ^ /usr/include/glib-2.0/glib/gstrfuncs.h:309:30: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
    309 | g_strdup_inline (const char *str)
    | ~~~~~~~~~~~~^~~
    libtool: compile: gcc -DHAVE_CONFIG_H -DVERSION=\"0.5.0\" -DDICTIONARY_DIR=\"/usr/share/ots/\" -I. -I.. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -Wall -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 -c text.c -fPIC -DPIC -o .libs/text.o
    /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -DVERSION=\"0.5.0\" -DDICTIONARY_DIR=\"/usr/share/ots/\" -I. -I.. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -Wall -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 -c -o stemmer.lo stemmer.c
    cc1: some warnings being treated as errors
    make[3]: *** [Makefile:563: grader-tf.lo] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/ots_0.5.0-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 Sat Mar 16 17:00:02 2024
    This is a multi-part message in MIME format...

    Your message dated Sat, 16 Mar 2024 15:46:42 +0000
    with message-id <E1rlWF8-005Vry-1x@fasolo.debian.org>
    and subject line Bug#1066648: fixed in ots 0.5.0-9
    has caused the Debian Bug report #1066648,
    regarding ots: FTBFS: grader-tf.c:108:9: error: implicit declaration of function ‘log’ [-Werror=implicit-function-declaration]
    to be marked as done.

    This means that you claim that the problem has been dealt with.
    If this is not the case it is now your responsibility to reopen the
    Bug report if necessary, and/or fix the problem forthwith.

    (NB: If you are a system administrator and have no idea what this
    message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org
    immediately.)


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

    Received: (at submit) by bugs.debian.org; 13 Mar 2024 13:24:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
    (2021-04-09) on buxtehude.debian.org
    X-Spam-Level:
    X-Spam-Status: No, score=-106.1 required=4.0 tests=BAYES_00,DKIMWL_WL_HIGH,
    DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FOURLA,
    FROMDEVELOPER,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,
    UNPARSEABLE_RELAY,USER_IN_DKIM_WELCOMELIST,USER_IN_DKIM_WHITELIST
    autolearn=ham autolearn_force=no
    version=3.4.6-bugs.debian.org_2005_01_02
    X-Spam-Bayes: score:0.0000 Tokens: new, 74; hammy, 150; neutral, 329; spammy,
    0. spammytokens:
    hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
    0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
    0.000-+--H*RT:108, 0.000-+--H*RT:311
    Return-path: <lucas@debian.org>
    Received: from stravinsky.debian.org ([20