FAILED: systemd-storagetm.p/src_storagetm_storagetm.c.o mips-softfloat-linux-gnu-gcc -Isystemd-storagetm.p -I. -I../systemd-stable-255.1 -Isrc/basic -I../systemd-stable-255.1/src/basic -Isrc/fundamental -I../systemd-stable-255.1/src/fundamental -Isrc/systemd -I../systemd-stable-255.1/src/systemd -I../systemd-stable-255.1/src/libsystemd/sd-bus -I../systemd-stable-255.1/src/libsystemd/sd-device -I../systemd-stable-255.1/src/libsystemd/sd-event -I../systemd-stable-255.1/src/libsystemd/sd-hwdb -I../systemd-stable-255.1/src/libsystemd/sd-id128 -I../systemd-stable-255.1/src/libsystemd/sd-journal -I../systemd-stable-255.1/src/libsystemd/sd-netlink -I../systemd-stable-255.1/src/libsystemd/sd-network -I../systemd-stable-255.1/src/libsystemd/sd-resolve -Isrc/shared -I../systemd-stable-255.1/src/shared -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -Wno-missing-field-initializers -Wno-unused-parameter -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays --param=ssp-buffer-size=4 -Wno-maybe-uninitialized -Wno-unused-result -ftrivial-auto-var-init=zero -Werror=shadow -O2 -march=mips2 -mabi=32 -mplt -msoft-float -pipe -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -ffunction-sections -fdata-sections -include config.h -MD -MQ systemd-storagetm.p/src_storagetm_storagetm.c.o -MF systemd-storagetm.p/src_storagetm_storagetm.c.o.d -o systemd-storagetm.p/src_storagetm_storagetm.c.o -c ../systemd-stable-255.1/src/storagetm/storagetm.c ../systemd-stable-255.1/src/storagetm/storagetm.c: In function ‘device_added’: ../systemd-stable-255.1/src/storagetm/storagetm.c:953:42: error: passing argument 2 of ‘sd_device_get_devnum’ from incompatible pointer type [-Werror=incompatible-pointer-types] 953 | r = sd_device_get_devnum(device, &lookup_key.st_rdev); | ^~~~~~~~~~~~~~~~~~~ | | | long unsigned int * In file included from ../systemd-stable-255.1/src/shared/blockdev-util.h:6, from ../systemd-stable-255.1/src/storagetm/storagetm.c:8: ../systemd-stable-255.1/src/systemd/sd-device.h:78:52: note: expected ‘dev_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘long unsigned int *’ 78 | int sd_device_get_devnum(sd_device *device, dev_t *devnum); | ~~~~~~~^~~~~~ ../systemd-stable-255.1/src/storagetm/storagetm.c: In function ‘device_removed’: ../systemd-stable-255.1/src/storagetm/storagetm.c:1009:42: error: passing argument 2 of ‘sd_device_get_devnum’ from incompatible pointer type [-Werror=incompatible-pointer-types] 1009 | r = sd_device_get_devnum(device, &lookup_key.st_rdev); | ^~~~~~~~~~~~~~~~~~~ | | | long unsigned int * ../systemd-stable-255.1/src/systemd/sd-device.h:78:52: note: expected ‘dev_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘long unsigned int *’ 78 | int sd_device_get_devnum(sd_device *device, dev_t *devnum); | ~~~~~~~^~~~~~ cc1: some warnings being treated as errors
Created attachment 880259 [details] build log
No relevant changes in master as far as I can see, no issue upstream
Correction: seems to affect only O32
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f68fcb408601d8c7b3aaba65fc588034ca50094a commit f68fcb408601d8c7b3aaba65fc588034ca50094a Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2023-12-24 22:33:26 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2023-12-24 22:34:28 +0000 package.mask, mips o32: mask systemd-255* Bug: https://bugs.gentoo.org/920576 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> profiles/arch/mips/mipsel/o32/package.mask | 5 +++++ profiles/arch/mips/o32/package.mask | 5 +++++ 2 files changed, 10 insertions(+)
Upstream would like a patch...
But how is st_rdev defined on this system? Adding a cast is trivial, but in this case it looks like either the member isn't defined as dev_t (as it should), or it uses a different definition than the systemd code uses. On glibc it seems to be defined in /usr/include/bits/struct_stat.h. There's an indirection of __dev_t to DEV_T to __UQUAD_TYPE. musl defines it in /usr/include/bits/stat.h as dev_t and typedefs that to an unsigned _Int64.
(In reply to Fabian Groffen from comment #6) From the error message, it appears st_rdev is unsigned long, but dev_t is unsigned long long.
... which is exactly why the struct stat definition would be interesting ...
From glibc's struct_stat.h: > #if _MIPS_SIM == _ABIO32 > ... > struct stat > ... > unsigned long int st_rdev; /* Device number, if device. */ > ...
It's worth noting that musl uses separate types for userspace (struct stat) versus kernel calls (struct kstat). A translation is done in the fstatat_kstat function.
Should be fixed upstream.