[LTP] latest ltp not building on RHEL 9.6 ?
Chuck Lever
chuck.lever@oracle.com
Tue May 20 17:36:54 CEST 2025
On 5/19/25 8:38 PM, Li Wang wrote:
> On Tue, May 20, 2025 at 2:40 AM Chuck Lever via ltp <ltp@lists.linux.it> wrote:
>>
>> Hi -
>>
>> My daily CI builds ltp and runs it against my nfsd-testing branch.
>> For the past week or so, the ltp build fails with:
>>
>> In file included from cve-2017-16939.c:28:
>> ../../include/lapi/sched.h:18:8: error: redefinition of ‘struct sched_attr’
>> 18 | struct sched_attr {
>> | ^~~~~~~~~~
>> In file included from /usr/include/bits/sched.h:60,
>> from /usr/include/sched.h:43,
>> from ../../include/lapi/sched.h:10,
>> from cve-2017-16939.c:28:
>> /usr/include/linux/sched/types.h:102:8: note: originally defined here
>> 102 | struct sched_attr {
>> | ^~~~~~~~~~
>>
>> The test runner is a RHEL 9.6 guest. I don't see any recent changes to
>> ltp in this area, so perhaps 9.6 modified /usr/include/linux/sched.h ?
>
> I saw that LTP has already handle that conflict in lapi header file, in commit
> https://github.com/linux-test-project/ltp/commit/c48700d8cdbe6d0d78fda6e6cc658972464b5ccd
>
> Can you provide the version of your kernel-header and glibc?
>
> e.g.
> $ rpm -qf /usr/include/linux/sched/types.h
>
> $ rpm -qf /usr/include/bits/sched.h
>
>
Building on a stock 9.6 kernel fails the same way:
In file included from cve-2017-16939.c:28:
../../include/lapi/sched.h:18:8: error: redefinition of ‘struct sched_attr’
18 | struct sched_attr {
| ^~~~~~~~~~
In file included from /usr/include/bits/sched.h:60,
from /usr/include/sched.h:43,
from ../../include/lapi/sched.h:10,
from cve-2017-16939.c:28:
/usr/include/linux/sched/types.h:102:8: note: originally defined here
102 | struct sched_attr {
| ^~~~~~~~~~
In file included from cve-2017-16939.c:28:
../../include/lapi/sched.h:36:19: error: conflicting types for
‘sched_setattr’; have ‘int(pid_t, const struct sched_attr *, unsigned
int)’ {aka ‘int(int, const struct sched_attr *, unsigned int)’}
36 | static inline int sched_setattr(pid_t pid, const struct
sched_attr *attr,
| ^~~~~~~~~~~~~
In file included from /usr/include/sched.h:43,
from ../../include/lapi/sched.h:10,
from cve-2017-16939.c:28:
/usr/include/bits/sched.h:141:5: note: previous declaration of
‘sched_setattr’ with type ‘int(pid_t, struct sched_attr *, unsigned
int)’ {aka ‘int(int, struct sched_attr *, unsigned int)’}
141 | int sched_setattr (pid_t tid, struct sched_attr *attr, unsigned
int flags)
| ^~~~~~~~~~~~~
In file included from cve-2017-16939.c:28:
../../include/lapi/sched.h:42:19: error: conflicting types for
‘sched_getattr’; have ‘int(pid_t, struct sched_attr *, unsigned int,
unsigned int)’ {aka ‘int(int, struct sched_attr *, unsigned int,
unsigned int)’}
42 | static inline int sched_getattr(pid_t pid, struct sched_attr *attr,
| ^~~~~~~~~~~~~
In file included from /usr/include/sched.h:43,
from ../../include/lapi/sched.h:10,
from cve-2017-16939.c:28:
/usr/include/bits/sched.h:146:5: note: previous declaration of
‘sched_getattr’ with type ‘int(pid_t, struct sched_attr *, unsigned
int, unsigned int)’ {aka ‘int(int, struct sched_attr *, unsigned int,
unsigned int)’}
146 | int sched_getattr (pid_t tid, struct sched_attr *attr, unsigned
int size,
| ^~~~~~~~~~~~~
gmake[2]: *** [../../include/mk/rules.mk:45: cve-2017-16939] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [../include/mk/generic_trunk_target.inc:108: all] Error 2
gmake: *** [Makefile:85: testcases-all] Error 2
gmake: *** Waiting for unfinished jobs....
(the sched_{set,get}attr failures also occurred before, I included just
the first error in the initial report for brevity).
--
Chuck Lever
More information about the ltp
mailing list