View Issue Details

IDProjectCategoryView StatusLast Update
0001388channel: kernel/el8kernel-mlpublic2023-10-06 22:06
Reportertoracat Assigned Totoracat  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Summary0001388: kernel-ml-6.6.0-rc1.el8 fails to build.
Descriptionlinux-6.6-rc1 was released on 2023-09-10. Building kernel-ml-6.6.0-rc1 fails.

(1) libcpupower.so issue [el7, el8, and el9]

RPM build errors:
    File not found: /home/toracat/rpmbuild..../usr/lib64/libcpupower.so.0

Looks like in 6.6, it builds libcpupower.so.1 instead of libcpupower.so.0. And if you look at the %files section of the spec file:

%files section of the spec file:

%files -n %{name}-tools-libs
%{_libdir}/libcpupower.so.0
%{_libdir}/libcpupower.so.0.0.1

Therefore the fix is to change 'libcpupower.so.0' to 'libcpupower.so.1'.

(2) perf build errors [el8]

After fixing (1) above, kernel build then failed with errors like:

In file included from bench/sched-seccomp-notify.c:5:
bench/sched-seccomp-notify.c: In function 'user_notif_syscall':
bench/sched-seccomp-notify.c:55:27: error: 'SECCOMP_RET_USER_NOTIF'
undeclared (first use in this function); did you mean
'SECCOMP_RET_ERRNO'?
   BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_USER_NOTIF),
                           ^~~~~~~~~~~~~~~~~~~~~~

Turns out this was a known case and reported on lkml with patches:

https://lkml.org/lkml/2023/9/13/526
https://lkml.org/lkml/2023/9/13/531

I have applied those 2 patches to 6.6-rc1 and the errors were gone.

(3) bpftool build error [el8]

After (2) was fixed, there was a new error.

/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/Scrt1.o: In function `_start':
(.text+0x24): undefined reference to `main'
/usr/bin/ld: final link failed: Invalid operation

It's a linker error
Additional InformationProblems (2) and (3) were seen in el8 only.
el9 build went through with no errors.
In el7, perf and bpftool are disabled.
TagsNo tags attached.

Relationships

related to 0001385 resolvedtoracat channel: kernel/el9 kernel-ml-6.5.4-1.el9 fails to build if perf and bpftool are enabled. 

Activities

toracat

2023-09-26 20:25

administrator   ~0009358

The situation with -rc2 (2023-09-17) remained the same.

toracat

2023-09-26 20:26

administrator   ~0009359

Last edited: 2023-10-06 22:05

The two patches referenced earlier :

https://lkml.org/lkml/2023/9/13/526
https://lkml.org/lkml/2023/9/13/531

were submitted to mainline kernel and were merged by Linus this
morning. They are expected to be in 6.6-rc4.

Subject: [GIT PULL] perf tools fixes for v6.6: 1st batch
From: Namhyung Kim <namhyung@kernel.org>

Therefore, the perf build problem will be gone in -rc4 but the bpftool
issue will persist. This linker error might be resolved by using a
newer version of gcc, pretty much like in el7.

toracat

2023-09-28 14:05

administrator   ~0009361

Current plan:

Assuming the 2 patches are in the next -rc release, we will just disable bpftool in el8. Users can use the distro-kernel provided bpftool.
el9 should have no build problem.

toracat

2023-10-02 12:16

administrator   ~0009363

6.6-rc4 is out. As expected, the 2 patches for perf are no longer needed.

toracat

2023-10-06 22:06

administrator   ~0009370

Now closing as "resolved/fixed".

Issue History

Date Modified Username Field Change
2023-09-26 20:19 toracat New Issue
2023-09-26 20:19 toracat Status new => assigned
2023-09-26 20:19 toracat Assigned To => toracat
2023-09-26 20:20 toracat Relationship added related to 0001385
2023-09-26 20:23 toracat Additional Information Updated
2023-09-26 20:25 toracat Note Added: 0009358
2023-09-26 20:26 toracat Note Added: 0009359
2023-09-27 03:09 toracat Description Updated
2023-09-28 14:05 toracat Note Added: 0009361
2023-10-02 12:16 toracat Note Added: 0009363
2023-10-06 22:05 toracat Note Edited: 0009359
2023-10-06 22:06 toracat Status assigned => resolved
2023-10-06 22:06 toracat Resolution open => fixed
2023-10-06 22:06 toracat Note Added: 0009370