• autoconf injects strchr without including string.h

    From Andreas Tille@21:1/5 to All on Wed Sep 25 11:50:01 2024
    Hi,

    I intend to work on the latest version of xserver-xorg-input-keyboard/ since
    it showed up as candidate for the Bug of the Day[1]. Unfortunately the latest upstream version does not build[2]:

    ...
    configure:12876: checking for gcc options needed to detect all undeclared functions
    configure:12898: gcc -c -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/builds/tille/xserver-xorg-input-keyboard/debian/output/source_dir=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
    -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5
    conftest.c: In function 'main':
    conftest.c:27:8: error: 'strchr' undeclared (first use in this function)
    27 | (void) strchr;
    | ^~~~~~
    conftest.c:1:1: note: 'strchr' is defined in header '<string.h>'; this is probably fixable by adding '#include <string.h>'
    ...

    It might be cheap to simply add the missing '#include <string.h>' -
    but conftest.c is auto-generated and I think its rather an issue
    in autoconf. Any idea for a temporary workaround?

    Kind regards
    Andreas.

    [1] https://salsa.debian.org/tille/tiny_qa_tools/-/wikis/Tiny-QA-tasks
    [2] https://salsa.debian.org/tille/xserver-xorg-input-keyboard/-/jobs/6333708#L1745

    --
    https://fam-tille.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Andreas Tille on Wed Sep 25 13:10:01 2024
    On Wed, Sep 25, 2024 at 11:47:09AM +0200, Andreas Tille wrote:
    Hi,

    I intend to work on the latest version of xserver-xorg-input-keyboard/ since it showed up as candidate for the Bug of the Day[1]. Unfortunately the latest
    upstream version does not build[2]:

    ...
    configure:12876: checking for gcc options needed to detect all undeclared functions

    No, that's not the reason for the failure (failing conftest programs are
    normal and expected in certain checks and "detect all undeclared
    functions" definitely sounds like one). The reason for the failure is "configure: error: This is not the keyboard driver you are looking for.
    Use evdev or libinput.". Which makes sense.
    The actual check for that (see configure.ac) is literally

    """
    case $host_os in
    linux*)
    """
    .



    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmbz7SQtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh AW4P/07yivbiapUNlYvT7mq9mvNNlq1xUaY0wCzmHYg5HGHncsMxxTt2uVuNYXQC wQdqfBTqsL3vSoUDBs3f4973t4mWx7fsr0y3a4yWz7KGkTOVvRE/mkZFU6sLHC41 9Dk+ZcyKVpb2fKMga7F3+cCLRvnlhRWbgb8JzmIkCzBXjdn9p4kFFc4kMbs8fAFh iwfxBwqnyXKwmjlwUigdjF/FbiXUksBb90bSFP+FnFvvjTbkLLZqWsU1sU4sUB4f U0ql1xAJxqw/35N+dmAzFwrQ7r5RH5f5Fl8Rsnmh4Nt/QsrDUHTK9ishQmdkJOdN OssvDGtX/FmrA9qt44tCEZIUGrLc0FAcEYY9XJA6903Txrf8wxpu8Db9P/mhkqLp NecoMWyhFa0pEsCmzGkzXUyZqqFQc2gsG4W5AhDKPksyfnLgBQVmkU46PtdEsjv9 BRPPRZZmmtjjuj6eoccIaMG6WLmujuyLSBD8kFatE6uVWWjcqtX4psnONKIl8G5a JrplfSX8JDLW7RMLYLlcgx8s7TvSMimRrM+lTqCwzgggkUtyzgCN2lTmlehYlcMv qfuY1YyeDnfA6h+7fyvBDYxtXutWlGs/ZhtfQul9uT8gn6OwOlHR7V2fppXFDOe3 AWOM7a3krxHkE5TrOnGPz8UTn9bS0GbWJAfZIFZSbIhDbDBX
    =u6m4
    -----END PGP SIGNATURE-----

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