I experienced a similar issue building 6.5.0-25 on Ubuntu 22.04.
I followed the steps in the "Build Your Own Kernel" post: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
Specifically, the error occurs after I ran the build step with the parameters:
fakeroot debian/rules binary-headers binary-generic binary-perarch
I tried the LLVM and CC tricks mentioned in the previous post, but it did not help.
I experienced a similar issue building 6.5.0-25 on Ubuntu 22.04.
I followed the steps in the "Build Your Own Kernel" post: https:/ /wiki.ubuntu. com/Kernel/ BuildYourOwnKer nel
Specifically, the error occurs after I ran the build step with the parameters:
fakeroot debian/rules binary-headers binary-generic binary-perarch
I tried the LLVM and CC tricks mentioned in the previous post, but it did not help.