nvidia-361 361.42-0ubuntu2: nvidia-361 kernel module failed to build when gcc and g++ are set to v4.8 instead of default v5.3

Bug #1591785 reported by Mathieu-Andre Chiasson
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Expired
High
Unassigned
nvidia-graphics-drivers-361 (Ubuntu)
Expired
High
Unassigned

Bug Description

after a routine system update, Linux kernel was upgraded to 4.4.0-24-generic. Since then, the nvidia graphic drivers simply refuses to build:

> Building initial module for 4.4.0-24-generic
> Error! Bad return status for module build on kernel: 4.4.0-24-generic (x86_64)
> Consult /var/lib/dkms/nvidia-361/361.42/build/make.log for more information.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: nvidia-361 361.42-0ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-24.43-generic 4.4.10
Uname: Linux 4.4.0-24-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
DKMSKernelVersion: 4.4.0-24-generic
Date: Sun Jun 12 19:45:40 2016
DuplicateSignature: dkms:nvidia-361:361.42-0ubuntu2:cc: error: unrecognized command line option ‘-fstack-protector-strong’
InstallationDate: Installed on 2015-10-31 (225 days ago)
InstallationMedia: Xubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
PackageVersion: 361.42-0ubuntu2
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: nvidia-graphics-drivers-361
Title: nvidia-361 361.42-0ubuntu2: nvidia-361 kernel module failed to build
UpgradeStatus: Upgraded to xenial on 2016-05-04 (39 days ago)

Revision history for this message
Mathieu-Andre Chiasson (mchiasson) wrote :
Revision history for this message
Mathieu-Andre Chiasson (mchiasson) wrote :

Found the issue. I set my gcc and g++ to 4.8 or 4.9 via update-alternative because we to support Ubuntu 12.04. I moved gcc and g++ back to the default 5.3, did `apt-get remove nvidia-* --purge`, then `apt-get install nvidia-361` and it worked.

summary: nvidia-361 361.42-0ubuntu2: nvidia-361 kernel module failed to build
+ when gcc and g++ are set to v4.8 instead of default v5.3
Revision history for this message
Mathieu-Andre Chiasson (mchiasson) wrote :

Do any of you have any recommendations on how to safely build static/shared libraries for Ubuntu 12.04 on Ubuntu 16.04 without breaking closed source packages such as the nvidia driver? I'm thinking of setting ${CC} and ${CXX} in my ~/.bashrc to point to gcc/g++ 4.8 instead of setting them globally via update-alternative. This should probably be the best solution to ensure that this doesn't happen again.

Revision history for this message
Mathieu-Andre Chiasson (mchiasson) wrote :

Work-around confirmed: After adding these two lines in my ~/.bashrc

# For Ubuntu 12.04 backward compatibility.
export CC=gcc-4.7
export CXX=g++-4.7

Then I can build our products with the correct glibc version for Ubuntu 12.04, while gcc-5.3 is used during the updates and via sudo.

Revision history for this message
Mathieu-Andre Chiasson (mchiasson) wrote :

I can't figure out how to edit my comments, so big apology in advance. My work around works if and only if gcc and g++ have not been changed or restored to the default version (currently v5.3.1). In other word, changing the default system compiler would create this type of issue, so this isn't really a bug on your side. You may close this bug report, unless you feel that nvidia-361 should be able to build on any gcc/g++ versions.

tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers-361 (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-361 (Ubuntu):
importance: Undecided → High
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → High
Changed in nvidia-graphics-drivers-361 (Ubuntu):
status: Confirmed → New
Changed in hundredpapercuts:
status: Confirmed → New
Revision history for this message
Paul White (paulw2u) wrote :

We are sorry that we do not always have the capacity to review all reported bugs in a timely manner.

Ubuntu 16.04 (xenial) reached end-of-life on April 29, 2021.

I'm setting this bug to "Incomplete" as it's not seen any activity for some time. If this is still an issue when using a currently maintained release of Ubuntu then please let us know otherwise this bug report can be left to expire in approximately 60 days time.

Changed in hundredpapercuts:
status: New → Incomplete
Changed in nvidia-graphics-drivers-361 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for One Hundred Papercuts because there has been no activity for 60 days.]

Changed in hundredpapercuts:
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nvidia-graphics-drivers-361 (Ubuntu) because there has been no activity for 60 days.]

Changed in nvidia-graphics-drivers-361 (Ubuntu):
status: Incomplete → Expired
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.