nvidia-kernel-source-470 470.74-0ubuntu1: nvidia kernel module failed to build

Bug #1947470 reported by Bouazza
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-470 (Ubuntu)
New
Undecided
Unassigned

Bug Description

I was doing a distro upgrade from 21.04 to 21.10, then when it arrived to the nvidia packages the install broke and I later figured out that it was because on my system cc points to clang.

Granted, apparently gcc is needed instead for the compilation process (and I got it to work by changing cc to gcc in update-alternatives), but I think a more explicit error message should have been shown (for example good cmake build systems do warn the user if an incompatible compiler is being used) instead of entirely breaking the upgrade process and leaving me to finish everything manually using the terminal. The upgrade tool should have checked the compiler that is being used and temporarily set it to gcc for the nvidia driver.

Output of "lsb_release -rd":
Description: Ubuntu 21.10
Release: 21.10

ProblemType: Package
DistroRelease: Ubuntu 21.10
Package: nvidia-kernel-source-470 470.74-0ubuntu1
ProcVersionSignature: Ubuntu 5.13.0-19.19-generic 5.13.14
Uname: Linux 5.13.0-19-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu70
Architecture: amd64
CasperMD5CheckResult: pass
DKMSKernelVersion: 5.13.0-19-generic
Date: Sat Oct 16 21:25:08 2021
Dependencies:

DuplicateSignature: dkms:nvidia-kernel-source-470:470.74-0ubuntu1:clang: error: unsupported option '-dumpspecs'
InstallationDate: Installed on 2021-10-10 (6 days ago)
InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
PackageVersion: 470.74-0ubuntu1
Python3Details: /usr/bin/python3.9, Python 3.9.7, python3-minimal, 3.9.4-1build1
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.20.9ubuntu2
 apt 2.3.9
SourcePackage: nvidia-graphics-drivers-470
Title: nvidia-kernel-source-470 470.74-0ubuntu1: nvidia kernel module failed to build
UpgradeStatus: Upgraded to impish on 2021-10-16 (0 days ago)

Revision history for this message
Bouazza (white-spirit92) wrote :
tags: removed: need-duplicate-check
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.