• Bug#1065973: kmod: FTBFS on arm{el,hf}: /usr/include/features-time64.h:

    From Sebastian Ramacher@21:1/5 to All on Sun Mar 10 22:40:01 2024
    Source: kmod
    Version: 32-1
    Severity: serious
    Tags: ftbfs
    Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: sramacher@debian.org

    https://buildd.debian.org/status/fetch.php?pkg=kmod&arch=armhf&ver=32-1&stamp=1709960074&raw=0

    libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -include ./config.h -I.. -DSYSCONFDIR=\"/etc\" -DDISTCONFDIR=\"/usr/lib\" -DMODULE_DIRECTORY=\"/lib/modules\" -DABS_TOP_BUILDDIR=\"/<<PKGBUILDDIR>>/build-deb\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_
    TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-
    statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=3 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-
    missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -Werror=implicit-function-declaration -
    ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -c ../testsuite/path.c -fPIC -DPIC -o testsuite/.libs/path_la-path.o
    In file included from /usr/include/features.h:393,
    from /usr/include/assert.h:35,
    from ../testsuite/path.c:22: /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
    26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
    | ^~~~~

    Cheers
    --
    Sebastian Ramacher

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helge Deller@21:1/5 to All on Wed Mar 13 08:40:01 2024
    The patch below builds for me on the hppa platform.
    Testcases needs verifying on physical hardware though.

    Helge


    diff -up ./testsuite/path.c.org ./testsuite/path.c
    --- ./testsuite/path.c.org 2024-03-13 07:01:04.610222544 +0000
    +++ ./testsuite/path.c 2024-03-13 07:11:16.630339502 +0000
    @@ -15,9 +15,14 @@
    * License along with this library; if not, see <http://www.gnu.org/licenses/>.
    */

    +#if !defined(_TIME_BITS) || _TIME_BITS != 64
    +#define NEED_WRAPPER
    /* We unset _FILE_OFFSET_BITS here so we can override both stat and stat64 on
    * 32-bit architectures and forward each to the right libc function */
    #undef _FILE_OFFSET_BITS
    +#else
    +#undef NEED_WRAPPER
    +#endif

    #include <assert.h>
    #include <dirent.h>
    @@ -191,6 +196,7 @@ TS_EXPORT int prefix ## stat ## suffix (
    return _fn(ver, p, st); \
    }

    +#ifdef NEED_WRAPPER
    WRAP_1ARG(DIR*, NULL, opendir);
    WRAP_1ARG(int, -1, chdir);

    @@ -212,3 +218,4 @@ WRAP_VERSTAT(__lx,);
    WRAP_VERSTAT(__x,64);
    WRAP_VERSTAT(__lx,64);
    #endif
    +#endif
    diff -up ./tools/depmod.c.org ./tools/depmod.c
    --- ./tools/depmod.c.org 2024-03-13 06:56:13.616085242 +0000
    +++ ./tools/depmod.c 2024-03-13 07:13:11.4176