Не собирается nvidia-drivers-470.129.06

arning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115
You are using: x86_64-pc-linux-gnu-gcc (Gentoo 11.3.0 p4) 11.3.0
make -f ./scripts/Makefile.build obj=/var/calculate/tmp/portage/x11-drivers/nvidia-drivers-470.129.06/work/kernel
single-build=
need-builtin=1 need-modorder=1

The C compiler ‘x86_64-pc-linux-gnu-gcc’ does not appear to be able to
create object files. Please make sure you have
your Linux distribution’s libc development package
installed and that ‘x86_64-pc-linux-gnu-gcc’ is a valid C compiler
name.

*** Failed CC sanity check. Bailing out! ***

make[2]: *** [/var/calculate/tmp/portage/x11-drivers/nvidia-drivers-470.129.06/work/kernel/Kbuild:194: cc_sanity_check] Error 1
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [Makefile:1868: /var/calculate/tmp/portage/x11-drivers/nvidia-drivers-470.129.06/work/kernel] Error 2
make[1]: Leaving directory ‘/usr/src/linux-5.15.29-calculate’
make: *** [Makefile:80: modules] Error 2

  • ERROR: x11-drivers/nvidia-drivers-470.129.06::gentoo failed (compile phase):

  • emake failed

  • If you need support, post the output of emerge --info '=x11-drivers/nvidia-drivers-470.129.06::gentoo',

  • the complete build log and the output of emerge -pqv '=x11-drivers/nvidia-drivers-470.129.06::gentoo'.

  • The complete build log is located at ‘/var/calculate/tmp/portage/x11-drivers/nvidia-drivers-470.129.06/temp/build.log’.

  • The ebuild environment file is located at ‘/var/calculate/tmp/portage/x11-drivers/nvidia-drivers-470.129.06/temp/environment’.

  • Working directory: ‘/var/calculate/tmp/portage/x11-drivers/nvidia-drivers-470.129.06/work/kernel’

  • S: ‘/var/calculate/tmp/portage/x11-drivers/nvidia-drivers-470.129.06/work’

  • Не удалось собрать x11-drivers/nvidia-drivers-470.129.06::gentoo

  • Не удалось обновить

А там что?
Или Вы уже посмотрели и там ничего?

GCC удалось обновить?

Вот здесь как раз и написано, что установлен и используется актуальный GCC:

$ emerge -s sys-devel/gcc

Local copy of remote index is up-to-date and will be used.
[ Results for search key : sys-devel/gcc ]
Searching...

*  sys-devel/gcc
      Latest version available: 11.3.0
      Latest version installed: 11.3.0
      Size of files: 79258 KiB
      Homepage:      https://gcc.gnu.org/
      Description:   The GNU Compiler Collection
      License:       GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+

А здесь указана версия компилятора ядра:

$ cat /proc/version
Linux version 5.15.29-calculate (root@localhost) (gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115, GNU ld (Gentoo 2.37_p1 p2) 2.37) #1 SMP PREEMPT Thu Mar 17 13:22:02 UTC 2022

Вы были внимательнее чем я при чтении первоначального сообщения. У меня файлик собрался.

emerge -s sys-devel/gcc
Local copy of remote index is up-to-date and will be used.
[ Results for search key : sys-devel/gcc ]
Searching…
sys-devel/gcc
Latest version available: 11.3.0
Latest version installed: 11.3.0
Size of files: 79258 KiB
Homepage: https://gcc.gnu.org/
Description: The GNU Compiler Collection
License: GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+

cat /proc/version
Linux version 5.15.29-calculate (root@localhost) (gcc (Gentoo 11.3.0 p4) 11.3.0, GNU ld (Gentoo 2.37_p1 p2) 2.37) #1 SMP PREEMPT Fri Jul 8 15:25:37 UTC 2022

Тут есть такой кусочек.
If GCC plugins of the Kernel are enabled compilation of nvidia-drivers will use them. If the compiler version that was used to compile the plugins does not match the nvidia-drivers’ compiler an error will occur.
На основании своего поверхностного перевода я и сделал вывод о необходимости сходства версий обозначенного пакета.
Простите,если ввел в заблуждение.