For those having problems with GCC version on Ubuntu 18.04 when compiling:
GCC version must be at least 9.3 for precompiled libraries, found 7.5.0
luckily I found this great tutorial on how to install GCC 9 (PPA currently has GCC 10 version too, but for now 9 version is enough for blender):
https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/
You follow all the steps from start to the end (“Compiling a Hello World Example” can be skipped).
Still, “Remove compatibility checks” may be necessary if we have build errors related to CUDA and GCC version: