Cannot build nvidia driver via dkms because compiler doesn't match kernel

Bug #1868169 reported by Tim
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned
Bionic
New
Undecided
Unassigned

Bug Description

The same as this issue https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1608753 but on 18.04

relevant output from /var/lib/dkms/nvidia/440.33.01/build/make.log:

Compiler version check failed:

The major and minor number of the compiler used to
compile the kernel:

gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)

does not match the compiler used here:

cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

It is recommended to set the CC environment variable
to the compiler that was used to compile the kernel.

The compiler version check can be disabled by setting
the IGNORE_CC_MISMATCH environment variable to "1".
However, mixing compiler versions between the kernel
and kernel modules can result in subtle bugs that are
difficult to diagnose.

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

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gcc-defaults (Ubuntu):
status: New → Confirmed
tags: added: rls-bb-incoming
Revision history for this message
Tim (tilne) wrote :

If it's of any interest, the kernel version running when the above issue was found was 4.15.0-1063-aws.

Revision history for this message
Chris Newcomer (cnewcomer) wrote :

gcc package upgraded in 18.04 and new kernel compiled with that version hasn't been released yet.

affects: gcc-defaults (Ubuntu) → linux (Ubuntu)
Revision history for this message
Chris Newcomer (cnewcomer) wrote :

cnewcome@wintermute:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"

cnewcome@wintermute:~$ cat /proc/version
Linux version 5.3.0-42-generic (buildd@lcy01-amd64-019) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020

cnewcome@wintermute:~$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Revision history for this message
Luca Carrogu (carrogu) wrote :

solved with latest version

ubuntu@ip-172-31-5-176:~$ uname -a
Linux ip-172-31-5-176 4.15.0-1065-aws #69-Ubuntu SMP Thu Mar 26 02:17:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@ip-172-31-5-176:~$ cat /proc/version
Linux version 4.15.0-1065-aws (buildd@lgw01-amd64-035) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #69-Ubuntu SMP Thu Mar 26 02:17:29 UTC 2020

ubuntu@ip-172-31-5-176:~$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.