Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts
Thorsten Glaser
tg at mirbsd.de
Thu Mar 19 19:59:07 GMT 2020
Source: systemd
Version: 245.2-1
Severity: important
Tags: upstream ftbfs
Justification: fails to build from source (but built successfully in the past), on non-release architecture
https://buildd.debian.org/status/fetch.php?pkg=systemd&arch=x32&ver=245.2-1&stamp=1584573299&raw=0
The failures seem to be in the testsuite (assuming the main code has
been built before it gets build) only. They boil down to multiple
instances of:
../src/test/test-seccomp.c:562:27: error: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘long unsigned int’ [-Werror=format=]
562 | log_debug("arch %s: SCMP_SYS(mmap) = %d", seccomp_arch_to_string(arch), SCMP_SYS(mmap));
Here, SCMP_SYS(mmap) is an unsigned long, probably because that’s
what the native size type is.
If this is an int on other architectures, casting it to int might
be safe, as sizeof(long) == sizeof(int) on x32, but the safer path
would be changing it to long:
log_debug("arch %s: SCMP_SYS(mmap) = %ld", seccomp_arch_to_string(arch), (long)SCMP_SYS(mmap));
Similar for all other occurrences of SCMP_SYS, I guess.
More information about the Pkg-systemd-maintainers
mailing list