#940690 nvidia-kernel-dkms: build fails with kernel built with different gcc version

#940690#5
Date:
2019-09-19 03:52:19 UTC
From:
To:
Build fails on a Sid system, with gcc symlinked to gcc-9, running a
kernel built on a Buster system with gcc-8. Based on make.log and the
documentation in README.txt, I tried setting the CC environment variable
with:

CC=/usr/bin/gcc-8
export CC
aptitude
...

But the results were the same, with the installation process still
trying to use gcc 9.x.

#940690#10
Date:
2019-09-19 10:07:54 UTC
From:
To:
Control: tag -1 wontfix
the kernel, and this compiler is used for the out-of-tree modules, too.
In your case the kernel was built with (unversioned) 'gcc' and that will
be used for the out-of-tree modules, too, even if the symlink now points
elsewhere. (Official Debian kernels are built with versioned compiler
binaries (e.g. gcc-8, gcc-9) only, and the headers have dependencies on
the corresponding packages, to avoid mismatches if the default compiler
changes. (The kernel compiler is usually switched independently from the
default system compiler.)

Therefore: Always build custom kernels with versioned compilers.


Andreas

#940690#17
Date:
2019-10-02 20:35:46 UTC
From:
To:
On Thu, 19 Sep 2019 12:07:54 +0200 Andreas Beckmann <anbe@debian.org> wrote:
documented, either in the Debian kernel handbook or in general kernel
build guides? I can't find an option within the kernel config system for
versioned compilers. Do I need to use environment variables?

Celejar