Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1000486

Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts

From Thorsten Glaser <tg@mirbsd.de>
Newsgroups linux.debian.bugs.dist
Subject Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts
Date 2020-03-19 21:10 +0100
Message-ID <zM9El-8uV-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.debian.bugs.dist | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts Thorsten Glaser <tg@mirbsd.de> - 2020-03-19 21:10 +0100
  Bug#954294: linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace (was Re: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts)) Thorsten Glaser <t.glaser@tarent.de> - 2020-04-07 14:50 +0200
    Bug#954294: linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace (was Re: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts)) Ben Hutchings <ben@decadent.org.uk> - 2020-04-08 16:00 +0200
      Bug#954294: linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace (was Re: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts)) Thorsten Glaser <t.glaser@tarent.de> - 2020-04-08 16:10 +0200
  Bug#954294: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts) Thorsten Glaser <t.glaser@tarent.de> - 2020-04-08 16:10 +0200
  Bug#954294: __X32_SYSCALL_BIT being defined as UL constant breaks userspace Thorsten Glaser <t.glaser@tarent.de> - 2020-04-08 16:30 +0200

csiph-web