Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Kernel compilation failed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
saikou
n00b
n00b


Joined: 15 Nov 2023
Posts: 2

PostPosted: Wed Nov 15, 2023 3:38 am    Post subject: [SOLVED] Kernel compilation failed Reply with quote

I was switching my kernel from binary kernel to source kernel.
After I run make, it compiles normally as usual, but after a while, the compilation stopped with this error:

Code:
make[1]: *** [/usr/src/linux-6.6.1-gentoo/Makefile:1913: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2


I tried running make clean and make distclean, but the compilation stopped at the same point.
Back to top
View user's profile Send private message
saikou
n00b
n00b


Joined: 15 Nov 2023
Posts: 2

PostPosted: Wed Nov 15, 2023 5:36 am    Post subject: Reply with quote

solved by changing CONFIG_MODULE_SIG_KEY="/tmp/signing_key.pem" to CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
Back to top
View user's profile Send private message
VoVaN
l33t
l33t


Joined: 02 Jul 2003
Posts: 701
Location: The Netherlands

PostPosted: Tue Nov 21, 2023 10:14 am    Post subject: Re: [SOLVED] Kernel compilation failed Reply with quote

saikou wrote:
I was switching my kernel from binary kernel to source kernel.
After I run make, it compiles normally as usual, but after a while, the compilation stopped with this error:

Code:
make[1]: *** [/usr/src/linux-6.6.1-gentoo/Makefile:1913: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2


I tried running make clean and make distclean, but the compilation stopped at the same point.


I have exactly the same issue. While kernel 6.6.1 was successfully compiled 10 days ago now it's not possible with the same custom .config. However I even don't have CONFIG_MODULE_SIG enabled.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23091

PostPosted: Tue Nov 21, 2023 1:13 pm    Post subject: Re: [SOLVED] Kernel compilation failed Reply with quote

saikou wrote:
After I run make, it compiles normally as usual, but after a while, the compilation stopped with this error:
Code:
make[1]: *** [/usr/src/linux-6.6.1-gentoo/Makefile:1913: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
As I read the relevant Makefile, this reports that an error occurred running some other Make target, which you did not quote. Therefore, from this output alone, there is nothing we can say. This is why we always direct users to post the full output of the failure. I see that you did subsequently find a solution, but I want to note that the original data was insufficient for us to diagnose the problem.
VoVaN wrote:
I have exactly the same issue. While kernel 6.6.1 was successfully compiled 10 days ago now it's not possible with the same custom .config. However I even don't have CONFIG_MODULE_SIG enabled.
If you have the same issue, then the fix should be the same. However, as you are not using module signing and OP was using module signing, it seems likely that you have a different issue. Please follow the standard debugging procedure here: give us the full kernel output and post the .config to a pastebin.
Back to top
View user's profile Send private message
VoVaN
l33t
l33t


Joined: 02 Jul 2003
Posts: 701
Location: The Netherlands

PostPosted: Tue Nov 21, 2023 1:25 pm    Post subject: Re: [SOLVED] Kernel compilation failed Reply with quote

Hu wrote:
However, as you are not using module signing and OP was using module signing, it seems likely that you have a different issue. Please follow the standard debugging procedure here: give us the full kernel output and post the .config to a pastebin.


I've been able to investigate what the problem is and @Nu you're right the problem is different. I'll explain here anyway maybe it will be useful for somebody else as well. First of all the emerge log file is quite misleading as the error is exactly the same in my case. However when I tried manually compile the kernel the actual error was:
Code:
make[6]: *** No rule to make target '/lib/firmware/amdgpu/polaris12_sdma1.bin', needed by 'drivers/base/firmware_loader/builtin/amdgpu/polaris12_sdma1.bin.gen.o'.  Stop.

The problem is in the updated linux-firmware package where I have an option savedconfig enabled and install only what I need. In the latest sys-kernel/linux-firmware-20231111 some files have been replaced with symlinks, like polaris12_sdma1.bin is now symlink to polaris10_sdma1.bin, so in my case a few symlinks were broken because polaris10_sdma1.bin isn't installed in my case. After extending the saved config for linux-firmware end reinstalling, kernel compilation was successful.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum