Bug 15822

Summary: Conflict glibc 2.41 and strace 6.10 into Yocto 5.2_M3 - Build Error "redefinition of struct sched_attr"
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Anh Nguyen <anh.nguyen.pv>
Component: meta-yoctoAssignee: Anh Nguyen <anh.nguyen.pv>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, randy.macleod, Yash.Shinde
Version: 5.2   
Target Milestone: 5.3 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Anh Nguyen 2025-04-04 03:19:32 UTC
Hi,

Yocto Project version 5.2_M2 uses glibc 2.41 and strace 6.10.
Both define struct sched_attr --> got build error "redefinition of struct sched_attr"
This struct is defined into:
 - glibc 2.41: sysdeps/unix/sysv/linux/bits/sched.h
 - strace 6.10: src/sched_attr.h

Note: glibc 2.40 + strace 6.10 are OK

Please consider this point.
Comment 1 Randy MacLeod 2025-04-10 14:34:29 UTC
I asked Yash to look at this briefly. He said:


I didn't find any bug reported in glibc bugzilla for "redefinition of struct sched_attr".

 

However, a similar case was addressed in Qemu with a patch by Khem :

https://github.com/qemu/qemu/commit/27a8d899c7a100fd5aa040a8b993bb257687c393

https://patchwork.kernel.org/project/qemu-devel/patch/20241011193140.1047648-1-raj.khem@gmail.com/

 

Perhaps a similar macro check can be done for strace too.

Anh,
does this still happen for 5.2-M4 and/or master?
Can you explain why we did not see this in our Yocto AB testing?
What exactly are the steps to reproduce.
Comment 2 Anh Nguyen 2025-04-18 03:24:18 UTC
Hi Randy,

Sorry for my mistake.
I got issue because I used old strace version with new glibc version.
There is no issue with Yocto 5.2_M3.
I will verify more carefully before creating a bug later.

Best Regards,
Anh Nguyen
Comment 3 Randy MacLeod 2025-04-18 16:48:21 UTC
Anh, thanks for the follow-up.
It's good that this isn't a bug that we missed.