Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 908910

Summary: dev-util/strace-6.3: build failure error: 'const struct io_sqring_offsets' has no member named 'resv2'
Product: Gentoo Linux Reporter: Jeff Cliff <jeffrey.cliff>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: UNCONFIRMED ---    
Severity: normal CC: gentoo.dl
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log & system info
full build.log

Description Jeff Cliff 2023-06-21 04:20:54 UTC
emerge --ask dev-util/strace results in failure at

mmmx -mpclmul -mpopcnt -mrdrnd -msahf -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mxsave -mxsaveopt --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=4096 -mtune=ivybridge -c -o libstrace_a-ipc.o `test -f 'ipc.c' || echo './'`ipc.c
io_uring.c: In function 'print_io_sqring_offsets':
io_uring.c:48:16: error: 'const struct io_sqring_offsets' has no member named 'resv2'; did you mean 'resv1'?
   48 |         if (p->resv2) {
      |                ^~~~~
      |                resv1


Reproducible: Always

Steps to Reproduce:
1. emerge --ask dev-util/strace

that's it
Actual Results:  
strace fails to compile

Expected Results:  
strace should compile


build log: 
...
mmmx -mpclmul -mpopcnt -mrdrnd -msahf -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mxsave -mxsaveopt --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=4096 -mtune=ivybridge -c -o libstrace_a-ipc.o `test -f 'ipc.c' || echo './'`ipc.c
io_uring.c: In function 'print_io_sqring_offsets':
io_uring.c:48:16: error: 'const struct io_sqring_offsets' has no member named 'resv2'; did you mean 'resv1'?
   48 |         if (p->resv2) {
      |                ^~~~~
      |                resv1
In file included from io_uring.c:9:
io_uring.c:50:35: error: 'const struct io_sqring_offsets' has no member named 'resv2'; did you mean 'resv1'?
   50 |                 PRINT_FIELD_X(*p, resv2);
      |                                   ^~~~~
defs.h:1883:17: note: in definition of macro 'zero_extend_signed_to_ull'
 1883 |         (sizeof(v) == sizeof(char) ? (unsigned long long) (unsigned char) (v) : \
      |                 ^
print_fields.h:366:17: note: in expansion of macro 'PRINT_VAL_X'
  366 |                 PRINT_VAL_X((where_).field_);                           \
      |                 ^~~~~~~~~~~
io_uring.c:50:17: note: in expansion of macro 'PRINT_FIELD_X'
   50 |                 PRINT_FIELD_X(*p, resv2);  

...
Comment 1 Jeff Cliff 2023-06-21 04:21:34 UTC
Created attachment 864321 [details]
build log & system info

wouldn't let me post it in the bug (?)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-21 04:21:55 UTC
Please attach the full build.log.
Comment 3 Jeff Cliff 2023-06-21 13:58:43 UTC
Created attachment 864335 [details]
full build.log
Comment 4 Jeff Cliff 2023-06-21 13:58:47 UTC
[ebuild     U ] dev-util/strace-6.3 [6.1] USE="-aio -elfutils -perl (-selinux) -static -unwind"
Comment 5 Mike Gilbert gentoo-dev 2023-06-21 17:54:07 UTC
Could you try using simpler CFLAGS?
Comment 6 Jeff Cliff 2023-06-21 18:01:25 UTC
same issue with 6.4.0-rc1 20230511 linux (libre)
Comment 7 Jeff Cliff 2023-06-21 18:39:11 UTC
does the same thing with 

CFLAGS=" -O0 -march=ivybridge "
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-27 06:46:27 UTC
ldv, could you take a look?
Comment 9 Dmitry V. Levin 2023-06-27 21:11:19 UTC
(In reply to Jeff Cliff from comment #0)
> emerge --ask dev-util/strace results in failure at
> 
> mmmx -mpclmul -mpopcnt -mrdrnd -msahf -msse -msse2 -msse3 -msse4.1 -msse4.2
> -mssse3 -mxsave -mxsaveopt --param=l1-cache-line-size=64
> --param=l1-cache-size=32 --param=l2-cache-size=4096 -mtune=ivybridge -c -o
> libstrace_a-ipc.o `test -f 'ipc.c' || echo './'`ipc.c
> io_uring.c: In function 'print_io_sqring_offsets':
> io_uring.c:48:16: error: 'const struct io_sqring_offsets' has no member
> named 'resv2'; did you mean 'resv1'?

This is due to Linux kernel commit https://git.kernel.org/torvalds/c/03d89a2de25bbc5c77e61a0cf77663978c4b6ea7 which was merged after v6.4.
In strace, we will wait for at least v6.5-rc2 before starting to sync strace decoders with the upcoming linux kernel release.

In the meantime, you can configure strace build using --enable-bundled option,
this would force build infrastructure to use bundled headers even though configure detected that the system headers are newer.