Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 899078 - sys-process/psmisc-23.6: In file included from src/statx.c:33: /usr/include/fcntl.h:24:8: error: redefinition of 'struct flock' under musl/o32/mips
Summary: sys-process/psmisc-23.6: In file included from src/statx.c:33: /usr/include/f...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: MIPS Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL: https://git.kernel.org/pub/scm/linux/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-03 16:08 UTC by Joshua Kinard
Modified: 2023-04-05 01:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (psmisc_musl_o32-mips3_build.log,13.08 KB, text/plain)
2023-03-03 16:09 UTC, Joshua Kinard
Details
emerge --info (musl_o32-mips3_emerge-info.txt,5.42 KB, text/plain)
2023-03-03 16:09 UTC, Joshua Kinard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2023-03-03 16:08:22 UTC
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.
Comment 1 Joshua Kinard gentoo-dev 2023-03-03 16:09:04 UTC
Created attachment 855986 [details]
build.log
Comment 2 Joshua Kinard gentoo-dev 2023-03-03 16:09:23 UTC
Created attachment 855988 [details]
emerge --info
Comment 3 Joshua Kinard gentoo-dev 2023-04-05 01:24:10 UTC
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.