Comment 0 for bug 2069288

Revision history for this message
andrei (andrewternity) wrote :

I try to build my driver but I get
make: Entering directory '/usr/src/linux-headers-6.5.0-35-generic'
warning: the compiler differs from the one used to build the kernel

I have got hack solution from here https://askubuntu.com/questions/1500017/ubuntu-22-04-default-gcc-version-does-not-match-version-that-built-latest-defaul

I do
~~~
sudo apt install --reinstall gcc-12
sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
~~~

then I can build... But this is not right way...

I use Ubuntu 22.
uname -a
Linux myPC 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: linux-headers-6.5.0-35-generic 6.5.0-35.35~22.04.1
ProcVersionSignature: Ubuntu 6.5.0-35.35~22.04.1-generic 6.5.13
Uname: Linux 6.5.0-35-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Thu Jun 13 19:59:16 2024
InstallationDate: Installed on 2023-12-12 (184 days ago)
InstallationMedia: Ubuntu 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230807.2)
SourcePackage: linux-hwe-6.5
UpgradeStatus: No upgrade log present (probably fresh install)