Comment 8 for bug 2051457

Revision history for this message
Ubfan (ubfan1) wrote :

And yet to me, it looks like things will just work if gcc-12 is simply installed, not as the default.
Checking some file dates, I see my gcc-12 was brought (by something) in last April, and has been just sitting around. My /bin/gcc and /bin/cc links are years old (and link to gcc-11). The /lib/modules/6.5.0-14-generic/kernel/nvidia-535/bits/nvidia.o was compiled (last week) with gcc-12.3 (correct for my kernel 6.5). It looks like if gcc-12 is installed, it will be used for building an nvidia module, without changing the system /bin/gcc default of gcc-11. When you (MAFoElfen) were trying your workaround by changing links (/bin/gcc to gcc-12), did you ever try the nvidia driver install before changing links with gcc-12 present? If the right compiler gets used if present, that suggests a simple fix of adding a gcc-12 dependency on the hwe kernel package (to allow any modules to be build if they do what nvidia apparently does). I'll try out some jammy iso boots if I cannot find a spare partition to install to and see what happens (I've never bothered to figure out how to make my VMs use Nvidia). I can understand not wanting to change the default gcc, but simply adding one should not cause problems.