Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing version 340 on Linux 6.8 fails: "The CC version check failed" #27

Open
ratemisia opened this issue Jan 25, 2025 · 10 comments
Open

Comments

@ratemisia
Copy link

ratemisia commented Jan 25, 2025

Error:
The string "(gcc" was not found in the /proc/version string: "Linux version 6.8.0-51-generic (buildd@lcy02-amd64-091) (x86-64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024", please report this error to linux-bugs@nvidia.com

It goes on to advise that "you can either ignore the CC version check... or set the CC environment variable to the name of the compiler used to compile your kernel, and restart installation."

Attempting to proceed results in a failure to install and a system that is now unbootable to the graphical environment.

I can see from the error message that the relevant compiler version is gcc-13.3.0. Could I, and if so, how would I "set the CC environment variable" as described? Would this allow the drivers to install successfully?

@ratemisia
Copy link
Author

ratemisia commented Jan 25, 2025

Update: I have made some progress. Running the series of commands
CC='package name'
export CC
makes package name (or whatever is entered) appear to the NVIDIA drivers as the compiler version. Now a new error appears - Please ensure that you have your Linux distribution's libc package installed and that 'package name' is a valid C compiler name. I simply have to identify the name of compiler 13.3.0 (or maybe Ubuntu 13.3.0-6ubuntu2~24.04?) as it presents to libc. Easier said than done.. but I felt I should document this in case someone else has the same problem.

@ratemisia
Copy link
Author

I (and I imagine, anyone) can see the version of GCC I have installed (from build-essential package on Ubuntu based):
gcc (Ubuntu13.3.0-6ubuntu2~24.04) 13.3.0
This very much seems to match what I saw before. I'll try passing this exact string as CC...

@ratemisia
Copy link
Author

Syntax error: ( unexpected
Simple - I can try it without the parenthetical.

@ratemisia
Copy link
Author

gcc 13.3.0 isn't a valid C compiler name, it appears... I seem to be missing something.

@ratemisia
Copy link
Author

Now following this post https://forums.debian.net/viewtopic.php?t=110742 from 11 years ago where someone seems to have had the very same issue... gcc -v gives 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04).

@ratemisia
Copy link
Author

Still no luck. Surely I'm missing a package somewhere? I don't think I'm meant to have to guess the name of the compiler used to compile my kernel and manually pass the name.

@ratemisia
Copy link
Author

It looks like at least some of where I went wrong was first attempting to install with dkms enabled - this failed, and messed up dkms service so terribly that I've had to rm -r /var/lib/dkms/nvidia so that I can reinstall my kernel. Maybe if I don't use that option in the first place, it won't be broken in this specific way?

@DiabloPower
Copy link

DiabloPower commented Jan 27, 2025

I have the same problem with Zorin OS 17.2, GCC-12 (v12.3). As of now, no idea how to get it going....

@DiabloPower
Copy link

Update:

By updating Zorin OS 16.3 to 17.2, the old kernel (v 5.15.0-130) is still in place and in working order (including the NVIDIA 340 driver module).

The problem is that Xorg needs a more recent driver to use the new ABI. I haven't tried downgrading yet to see if it could work, but I think this would just generate even more problems.

I've also installed the patched driver for kernel 6.8 and applied it to the old kernel (5.15). The Xorg error is gone, but it seems that the driver won't load correctly with the old kernel.

@DiabloPower
Copy link

Update:
For now, I am giving up! (going back to Zorin OS 16.3 for the time being)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants