0

Specs: Quadro P1000 (compatible with driver version 440.100, attempting to get version 450.57) kernel: 5.7.11-050711-generic Ubuntu 20.04 focal fossa

Key problem: I've been unable to determine if I can actually get the newest gcc version on ubuntu 20.04. (currently have found 10.1 experimental), the newest I can seem to find is 9.3.0 (but newer versions are available on other platforms). currently I am unable to compile the drivers correctly (Nvidia's run scripts with dkms), and I am getting very nasty warning messages on startup and shutdown (they're long, and unrelated/unecessary if I can get this to work).

The installation script it advises me to check says that the driver was compiled with version 10.2.0. it seemed to me that I could not download (or at least couldn't find) the correct version for ubuntu, I thought I could downgrade, but got the same error message.

I currently have 9.3.0 and 10.1 installed, I'm somewhere between a beginner and an intermediate, but I've relied heavily on apt to obtain my packages, and am not sure (without a provided address for wget) how to install the package otherwise (at the time of writing, I am currently stuck with the command line).

I could force it to ignore the versions, but I'm already getting ACPI errors (unhandled region) and DC state mismatches, which suggests to me that I've done something very wrong, and I (hope) that this is it.

I know I'm almost certainly omitting necessary information, but I'll update it as necessary.

I'm aware that I can use apt to install the Nvidia drivers, but I have done so twice and had the second screen stop working, so I would like to use the Nvidia run file so that I don't have to deal with it again.

3
  • Where are you getting the Nvidia-450 driver from? It is available from the graphics-drivers ppa, and that may avoid problems with drivers from other sources.
    – ubfan1
    Jul 30, 2020 at 21:39
  • I've had issues with using that.. I actually downloaded the reccomended driver from the Nvidia website (they provide a bash script). 450 isn't available from the ppa repository (but 440 is). Jul 31, 2020 at 22:20
  • As of 7/16/2020 450 is on the ppa, 450.57-0ubuntu0~0.20.04.2 See askubuntu.com/questions/1263383/…
    – ubfan1
    Jul 31, 2020 at 23:43

1 Answer 1

0

If you see *1 in my post it refers to notes that describe in further detail

  1. You can get gcc10.2 from here https://bigsearcher.com/mirrors/gcc/releases/gcc-10.2.0/
  2. Save it to home
  3. Enter terminal and untar the zipped folder; you will probably need to sudo
  4. cd into the new folder; it should be called gcc-10.2.0

Enter these terminal commands in that folder

  1. contrib/download_prerequisites
  2. cd ~

Enter these terminal commands from home

  1. mkdir build && cd build

==========================================================================

  • Here you need to decide where you want it to install. I will refer to /usr/local/bin because it's already in the PATH
  1. ../gcc-10.2.0/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/bin/gcc-10.2.0 --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib --program-suffix=-10.2

==========================================================================

  • Replace x with the number of cpu cores you have*1. This will take a while depending on how fast your computer is.
  1. make -j x

==========================================================================

  • Once that all completes enter this command in the terminal which wont take long.
  1. sudo make install-strip

==========================================================================

Now you must change the default gcc version so you are using the right version to install the NVIDIA driver.

  1. sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/bin/gcc-10.2.0/bin/gcc-10.2 70 --slave /usr/bin/g++ g++ /usr/local/bin/gcc-10.2.0/bin/g++-10.2
  • Replace my paths with wherever you installed it and remember to use the executable in the bin folder of the gcc-10.2.0 folder.

==========================================================================

  • Enter this terminal command and choose gcc-10.2
  1. sudo update-alternatives --config gcc

==========================================================================

  • After that check your gcc version to clarify
  1. gcc --version
  • It should say 10.2

Where I got my information

*1. I changed this from the guide in the link who says: "you typically want to pass twice the number of your computer cores to the make command in order to speed up the build" I assume he is talking about threads in which case not all cpus have multithreading.

3
  • Just out of curiosity, will this pose problems when I reboot the machine? If I build a kernel module with this version of the gcc, will I have to stick with that version (possibly causing errors if other parts are compiled with a lower version? Aug 2, 2020 at 0:04
  • If you are meaning your nvidia driver, I downgraded succesfully to 440 with no problem. Can you be more specific?
    – Aplleroar
    Aug 3, 2020 at 12:12
  • I was concerned that changing my default gcc problem would case problems with the complication of other packages, though this may not be the case Aug 4, 2020 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.