Been running into this compile-time bug on my mips3/o32 chroot using a musl libc environment, running under qemu: > mips-unknown-linux-musl-gcc -DHAVE_CONFIG_H -I. -Wall -DLOCALEDIR=\"/usr/share/locale\" -I./src -O2 -pipe -march=mips3 -mtune=mips3 -mplt -mfix-r4000 -mfix-r4400 -c -o src/statx.o src/statx.c > In file included from src/statx.c:33: > /usr/include/fcntl.h:24:8: error: redefinition of 'struct flock' > 24 | struct flock { > | ^~~~~ > In file included from /usr/include/linux/fcntl.h:5, > from src/statx.c:31: > /usr/include/asm/fcntl.h:64:8: note: originally defined here > 64 | struct flock { > | ^~~~~ > make[2]: *** [Makefile:674: src/statx.o] Error 1 > make[2]: *** Waiting for unfinished jobs.... > make[2]: Leaving directory '/var/tmp/portage/sys-process/psmisc-23.6/work/psmisc-23.6' > make[1]: *** [Makefile:734: all-recursive] Error 1 > make[1]: Leaving directory '/var/tmp/portage/sys-process/psmisc-23.6/work/psmisc-23.6' > make: *** [Makefile:498: all] Error 2 > * ERROR: sys-process/psmisc-23.6::gentoo failed (compile phase): > * emake failed Haven't tested under real hardware in some time, but this error has been plaguing my musl chroot for the past 2 months, so something's off.
Created attachment 855986 [details] build.log
Created attachment 855988 [details] emerge --info
I inadvertently fixed this by upgrading from sys-kernel/linux-headers-5.15-r3 to sys-kernel/linux-headers-6.1* in my musl chroot. If I had to take a guess, it seems like the below change in the upstream kernel from back in April 2022 may have been the fix: > From 9f79b8b7233942e9c4b071f1f331f17e7282bbfa Mon Sep 17 00:00:00 2001 > From: Christoph Hellwig <hch@lst.de> > Date: Tue, 5 Apr 2022 15:12:55 +0800 > Subject: uapi: simplify __ARCH_FLOCK{,64}_PAD a little > > Don't bother to define the symbols empty, just don't use them. > That makes the intent a little more clear. > > Remove the unused HAVE_ARCH_STRUCT_FLOCK64 define and merge the > 32-bit mips struct flock into the generic one. > > Add a new __ARCH_FLOCK_EXTRA_SYSID macro following the style of > __ARCH_FLOCK_PAD to avoid having a separate definition just for > one architecture. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > Signed-off-by: Guo Ren <guoren@kernel.org> > Reviewed-by: Arnd Bergmann <arnd@arndb.de> > Tested-by: Heiko Stuebner <heiko@sntech.de> > Link: https://lore.kernel.org/r/20220405071314.3225832-2-guoren@kernel.org > Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> Marking as resolved, as I don't see a need to have this fix backported.