Compiling kernel 6.8-rc6 on F39

Hi,

I’m trying to compile the Fedora kernel 6.8-rc6 for F39 to test some AMD fixes.

What I did:

fedpkg clone kernel
git switch f40 #(to get 6.8-rc6)
fedpkg local --with release

Sadly I keep running into this error:

util/bpf_skel/bench_uprobe.bpf.c:9:16: error: parameter 'empty' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
    9 | int BPF_UPROBE(empty)
      |                ^
   10 | {
util/bpf_skel/bench_uprobe.bpf.c:9:5: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
    9 | int BPF_UPROBE(empty)
      |     ^
util/bpf_skel/bench_uprobe.bpf.c:15:16: error: parameter 'trace_printk' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
   15 | int BPF_UPROBE(trace_printk)
      |                ^
   16 | {
util/bpf_skel/bench_uprobe.bpf.c:15:5: error: redefinition of 'BPF_UPROBE'
   15 | int BPF_UPROBE(trace_printk)
      |     ^
util/bpf_skel/bench_uprobe.bpf.c:9:5: note: previous definition is here
    9 | int BPF_UPROBE(empty)
      |     ^
util/bpf_skel/bench_uprobe.bpf.c:15:5: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
   15 | int BPF_UPROBE(trace_printk)
      |     ^
util/bpf_skel/bench_uprobe.bpf.c:9:5: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
    9 | int BPF_UPROBE(empty)
      |     ^
3 warnings and 3 errors generated.
make[2]: *** [Makefile.perf:1153: /home/arthur/fedora-scm/kernel/kernel-6.8-rc6/linux-6.8.0-0.rc6.49.fc40.x86_64/tools/perf/util/bpf_skel/.tmp/bench_uprobe.bpf.o] Error 1
make[1]: *** [Makefile.perf:261: sub-make] Error 2
make: *** [Makefile:70: all] Error 2

Any ideas how to fix this?

You can get an rpm from kernel | Package Info | koji, specifically kernel-6.8.0-0.rc6.49.fc40 | Build Info | koji

Wasn’t sure if that was a good idea to use, since it’s F40, but I’ll try it anyway, thanks.

Edit: worked fine, should’ve know, thanks!

You can install the kernel from rawhide and test it on f39.

dnf install fedora-repos-rawhide.noarch
dnf update kernel --enablerepo=*rawhide*

At the moment that offers:

$ dnf update kernel --enablerepo=*rawhide*
Last metadata expiration check: 0:02:47 ago on Wed 28 Feb 2024 22:07:33 GMT.
Dependencies resolved.
========================================================================================================================
 Package                     Architecture   Version                                              Repository        Size
========================================================================================================================
Installing:
 kernel-core                 x86_64         6.8.0-0.rc6.20240227git45ec2f5f6ed3.50.fc41          rawhide           16 M
 kernel-modules-core         x86_64         6.8.0-0.rc6.20240227git45ec2f5f6ed3.50.fc41          rawhide           34 M
Removing:
 kernel-core                 x86_64         6.6.13-200.fc39                                      @updates          66 M
 kernel-modules-core         x86_64         6.6.13-200.fc39                                      @updates          31 M
Removing dependent packages:
 kernel-modules              x86_64         6.6.13-200.fc39                                      @updates          56 M

Transaction Summary
========================================================================================================================
Install  2 Packages
Remove   3 Packages

Total download size: 50 M
Is this ok [y/N]: