Neither simply entering IGNORE_CC_MISMATCH=1
on the command line nor adding it to /etc/environment
before executing the dkms to compile the nvidia kernel modules worked for me.
I got the same error 2 or 10 return codes because of GCC version mismatch.
The installation of the 5.10 kernel as suggested by @GokuSan ([Stable Update] 2021-06-07 - Kernels, Perl, Haskell, Tesseract, Cutefish, KDE, Nvidia - #81 by GokuSan) didn’t work either. Same problem: GCC version check failed
What worked for me:
I downgraded gcc
to the version, with which the kernel (in my case 5.4) had been compiled. Which was 10.2.x and had been upgraded to 11.1.x during the updates.
For the downgrade I used this here: Downgrading packages - Manjaro
The tricky bit with using downgrade
was: I had to specify both gcc
AND gcc-libs
at the same time, because downgrade
apparently isn’t able to handle the dependencies on its own:
downgrade gcc gcc-libs
Just running downgrade gcc
on its own did NOT work.
(I did not choose to add the packages to the ignore list so they should be included in the next updates I do.)
After the downgrade the dkms compile worked all fine like this:
dkms install --no-depmod -m nvidia -v 340.108 -k 5.4.123-1-MANJARO