View previous topic :: View next topic |
Author |
Message |
pgu l33t
Joined: 30 Jul 2009 Posts: 721 Location: Oslo, Norway
|
Posted: Thu Mar 21, 2024 6:12 am Post subject: [SOLVED]Errors compiling kernel linux-6.6.21-gentoo |
|
|
I just updated to linux-6.6.21-gentoo (using eselect kernel), ran "make oldconfig" and then "make modules" results in:
Code: |
...
CC [M] net/ipv4/netfilter/iptable_nat.o
MODPOST modules-only.symvers
WARNING: vmlinux.o is missing.
Modules may not have dependencies or modversions.
You may get many unresolved symbol errors.
You can set KBUILD_MODPOST_WARN=1 to turn errors into warning
if you want to proceed at your own risk.
ERROR: modpost: "ucs2_as_utf8" [fs/efivarfs/efivarfs.ko] undefined!
ERROR: modpost: "d_instantiate" [fs/efivarfs/efivarfs.ko] undefined!
ERROR: modpost: "efivar_supports_writes" [fs/efivarfs/efivarfs.ko] undefined!
ERROR: modpost: "clear_inode" [fs/efivarfs/efivarfs.ko] undefined!
ERROR: modpost: "efivar_get_next_variable" [fs/efivarfs/efivarfs.ko] undefined!
ERROR: modpost: "_copy_from_user" [fs/efivarfs/efivarfs.ko] undefined!
ERROR: modpost: "__x86_indirect_thunk_rbp" [fs/efivarfs/efivarfs.ko] undefined!
ERROR: modpost: "new_inode" [fs/efivarfs/efivarfs.ko] undefined!
ERROR: modpost: "memdup_user" [fs/efivarfs/efivarfs.ko] undefined!
ERROR: modpost: "unregister_filesystem" [fs/efivarfs/efivarfs.ko] undefined!
WARNING: modpost: suppressed 991 unresolved symbol warnings because there were too many)
make[2]: *** [scripts/Makefile.modpost:145: modules-only.symvers] Error 1
make[1]: *** [/usr/src/linux-6.6.21-gentoo/Makefile:1865: modpost] Error 2
make: *** [Makefile:234: __sub-make] Error 2
|
Is this expected?
Last edited by pgu on Fri Mar 22, 2024 1:59 pm; edited 1 time in total |
|
Back to top |
|
|
logrusx Veteran
Joined: 22 Feb 2018 Posts: 1696
|
Posted: Thu Mar 21, 2024 7:31 am Post subject: |
|
|
Eselect kernel is not necessary at all to upgrade your kernel and have no role in compilation. It only sets the /usr/src/linux symlink where the compiler will look for kernel sources when it compiles software that asks for them. Describe exactly the procedure you followed.
Best Regards,
Georgi |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1728
|
Posted: Thu Mar 21, 2024 12:21 pm Post subject: |
|
|
I suggest to not do "make modules" at all. Just do "make" instead which will build both the kernel and modules. |
|
Back to top |
|
|
pgu l33t
Joined: 30 Jul 2009 Posts: 721 Location: Oslo, Norway
|
Posted: Fri Mar 22, 2024 12:49 pm Post subject: |
|
|
logrusx wrote: |
Eselect kernel is not necessary at all to upgrade your kernel and have no role in compilation. It only sets the /usr/src/linux symlink where the compiler will look for kernel sources when it compiles software that asks for them.
|
I'm aware of eselect simply changing the symbolic link to /usr/src/linux, but I find eselect less error prone than doing it manually. I always update the symbolic link to point to the kernel I'm installing to make sure that anything I build which refer to e.g. /usr/src/linux/include etc. will be in sync with the kernel I'm compiling and installing.
logrusx wrote: |
Describe exactly the procedure you followed.
|
Basically what I described above.
Code: |
eselect kernel set N # point to the new kernel, linux-6.6.21-gentoo in this case
cd /usr/src/linux/
cp /usr/src/linux-6.6.13-gentoo/.config . # copy old config
make oldconfig
make modules
|
|
|
Back to top |
|
|
pgu l33t
Joined: 30 Jul 2009 Posts: 721 Location: Oslo, Norway
|
Posted: Fri Mar 22, 2024 12:50 pm Post subject: |
|
|
grknight wrote: | I suggest to not do "make modules" at all. Just do "make" instead which will build both the kernel and modules. |
Are the dependencies in the makefile known to be in error so that whatever targets which are required by the "modules" target is not built before the "modules" target?
I seem to remember that I've successfully built the modules as a separate target in the past.
I will try to run a full make when I power up the machine again. |
|
Back to top |
|
|
logrusx Veteran
Joined: 22 Feb 2018 Posts: 1696
|
Posted: Fri Mar 22, 2024 1:27 pm Post subject: |
|
|
pgu wrote: | logrusx wrote: |
Eselect kernel is not necessary at all to upgrade your kernel and have no role in compilation. It only sets the /usr/src/linux symlink where the compiler will look for kernel sources when it compiles software that asks for them.
|
I'm aware of eselect simply changing the symbolic link to /usr/src/linux, but I find eselect less error prone than doing it manually. I always update the symbolic link to point to the kernel I'm installing to make sure that anything I build which refer to e.g. /usr/src/linux/include etc. will be in sync with the kernel I'm compiling and installing.
logrusx wrote: |
Describe exactly the procedure you followed.
|
Basically what I described above.
Code: |
eselect kernel set N # point to the new kernel, linux-6.6.21-gentoo in this case
cd /usr/src/linux/
cp /usr/src/linux-6.6.13-gentoo/.config . # copy old config
make oldconfig
make modules
|
|
That's an odd sequence. Even back in the days when modules needed to be built separately, you had to build the kernel before that. Honestly I've never built modules separately without having built a kernel before that, be it before enabling a module in the configuration.
Best Regards,
Georgi |
|
Back to top |
|
|
pgu l33t
Joined: 30 Jul 2009 Posts: 721 Location: Oslo, Norway
|
Posted: Fri Mar 22, 2024 1:59 pm Post subject: |
|
|
grknight wrote: |
That's an odd sequence. Even back in the days when modules needed to be built separately, you had to build the kernel before that. Honestly I've never built modules separately without having built a kernel before that, be it before enabling a module in the configuration.
|
Ok, thanks. I'll make sure I'll do a full make first. I seem to remember being able to do this earlier, but I guess I must have done a full make prior to the "make modules". |
|
Back to top |
|
|
logrusx Veteran
Joined: 22 Feb 2018 Posts: 1696
|
Posted: Fri Mar 22, 2024 2:24 pm Post subject: |
|
|
pgu wrote: | grknight wrote: |
That's an odd sequence. Even back in the days when modules needed to be built separately, you had to build the kernel before that. Honestly I've never built modules separately without having built a kernel before that, be it before enabling a module in the configuration.
|
Ok, thanks. I'll make sure I'll do a full make first. I seem to remember being able to do this earlier, but I guess I must have done a full make prior to the "make modules". |
I'm not sure if that has worked in the past precisely because I've neved made modules before bzImage. It might have, I'm just suggesting that might be the reason. I might as well be wrong. I'd appreciate it if you report on if it worked.
Best Regards,
Georgi |
|
Back to top |
|
|
|