[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#917195: FTBFS on mips(el): expected ‘dev_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘long unsigned int *’



Source: systemd
Version: 240-1
Severity: serious
User: debian-mips@lists.debian.org
Usertags: mipsel mips
Forwarded: https://github.com/systemd/systemd/issues/11247

The latest upstream release of systemd fails to build on mips/mipsel
with the following error message:

[346/1708] cc -Isrc/core/2ac6ece@@core@sta -Isrc/core -I../src/core
-Isrc/basic -I../src/basic -Isrc/shared -I../src/shared -Isrc/systemd
-I../src/systemd -Isrc/journal -I../src/journal -Isrc/journal-remote
-I../src/journal-remote -Isrc/nspawn -I../src/nspawn -Isrc/resolve
-I../src/resolve -Isrc/timesync -I../src/timesync
-I../src/time-wait-sync -Isrc/login -I../src/login -Isrc/udev
-I../src/udev -Isrc/libudev -I../src/libudev -I../src/libsystemd/sd-bus
-I../src/libsystemd/sd-device -I../src/libsystemd/sd-event
-I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128
-I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network
-I../src/libsystemd/sd-resolve -Isrc/libsystemd-network
-I../src/libsystemd-network -I. -I../ -I/usr/include/libmount
-I/usr/include/blkid -I/usr/include/uuid -flto
-fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99
-Wextra -Werror=undef -Wlogical-op -Wmissing-include-dirs
-Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal
-Wsuggest-attribute=noreturn -Werror=missing-prototypes
-Werror=implicit-function-declaration -Werror=missing-declarations
-Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2
-Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn
-Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2
-Wwrite-strings -Werror=overflow -Werror=shift-count-overflow
-Werror=shift-overflow=2 -Wdate-time -Wnested-externs
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result
-Wno-format-signedness -Wno-error=nonnull -Wno-maybe-uninitialized
-ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing
-fvisibility=hidden -fstack-protector -fstack-protector-strong
--param=ssp-buffer-size=4 -fPIE -ffunction-sections -fdata-sections
-Werror=shadow -include config.h -g -O2
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread
-MD -MQ 'src/core/2ac6ece@@core@sta/cgroup.c.o' -MF
'src/core/2ac6ece@@core@sta/cgroup.c.o.d' -o
'src/core/2ac6ece@@core@sta/cgroup.c.o' -c ../src/core/cgroup.c FAILED:
src/core/2ac6ece@@core@sta/cgroup.c.o cc -Isrc/core/2ac6ece@@core@sta
-Isrc/core -I../src/core -Isrc/basic -I../src/basic -Isrc/shared
-I../src/shared -Isrc/systemd -I../src/systemd -Isrc/journal
-I../src/journal -Isrc/journal-remote -I../src/journal-remote
-Isrc/nspawn -I../src/nspawn -Isrc/resolve -I../src/resolve
-Isrc/timesync -I../src/timesync -I../src/time-wait-sync -Isrc/login
-I../src/login -Isrc/udev -I../src/udev -Isrc/libudev -I../src/libudev
-I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device
-I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb
-I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-netlink
-I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve
-Isrc/libsystemd-network -I../src/libsystemd-network -I. -I../
-I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -flto
-fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99
-Wextra -Werror=undef -Wlogical-op -Wmissing-include-dirs
-Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal
-Wsuggest-attribute=noreturn -Werror=missing-prototypes
-Werror=implicit-function-declaration -Werror=missing-declarations
-Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2
-Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn
-Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2
-Wwrite-strings -Werror=overflow -Werror=shift-count-overflow
-Werror=shift-overflow=2 -Wdate-time -Wnested-externs
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result
-Wno-format-signedness -Wno-error=nonnull -Wno-maybe-uninitialized
-ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing
-fvisibility=hidden -fstack-protector -fstack-protector-strong
--param=ssp-buffer-size=4 -fPIE -ffunction-sections -fdata-sections
-Werror=shadow -include config.h -g -O2
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread
-MD -MQ 'src/core/2ac6ece@@core@sta/cgroup.c.o' -MF
'src/core/2ac6ece@@core@sta/cgroup.c.o.d' -o
'src/core/2ac6ece@@core@sta/cgroup.c.o' -c ../src/core/cgroup.c
../src/core/cgroup.c: In function ‘lookup_block_device’:
../src/core/cgroup.c:405:59: error: passing argument 3 of ‘device_path_parse_major_minor’ from incompatible pointer type [-Werror=incompatible-pointer-types]
         r = device_path_parse_major_minor(p, &st.st_mode, &st.st_rdev);
                                                           ^~~~~~~~~~~
In file included from ../src/core/cgroup.c:22:
../src/basic/stat-util.h:87:78: note: expected ‘dev_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘long unsigned int *’
 int device_path_parse_major_minor(const char *path, mode_t *ret_mode, dev_t *ret_devno);
                                                                       ~~~~~~~^~~~~~~~~
../src/core/cgroup.c: In function ‘whitelist_device’:
../src/core/cgroup.c:448:62: error: passing argument 3 of ‘device_path_parse_major_minor’ from incompatible pointer type [-Werror=incompatible-pointer-types]
         r = device_path_parse_major_minor(node, &st.st_mode, &st.st_rdev);
                                                              ^~~~~~~~~~~
In file included from ../src/core/cgroup.c:22:
../src/basic/stat-util.h:87:78: note: expected ‘dev_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘long unsigned int *’
 int device_path_parse_major_minor(const char *path, mode_t *ret_mode, dev_t *ret_devno);
                                                                       ~~~~~~~^~~~~~~~~
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.


A full build log is available on
https://buildd.debian.org/status/fetch.php?pkg=systemd&arch=mips&ver=240-1&stamp=1545503314&raw=0
or
https://buildd.debian.org/status/fetch.php?pkg=systemd&arch=mipsel&ver=240-1&stamp=1545497753&raw=0

This appears to be a MIPS o32 ABI bug, but upstream is willing to accept
a patch, saying:

"
Hence, if anyone who cares about mips preps a patch that reworks the two
pieces of code on our side to store the result of
device_path_parse_major_minor() in a separate dev_tvariable instead of
directly in "struct stat", and to move the declaration of that to an
inner scope and copy the data out, I'd review that and merge.
"

Would be great to have such a patch from anyone caring for mips.

Regards,
Michael

-- Package-specific info:

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd is related to:
pn  dracut           <none>
ii  initramfs-tools  0.132
ii  udev             240-1

-- no debconf information

Reply to: