Fix Cmake 'Unsupported GNU Version' Error

Page content

While installing the latest beagle-lib according to the LinuxUnstallInstructions, I encountered this error:

#error -- unsupported GNU version! gcc versions later than 11 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

Looking for previous version of gcc

ls /usr/bin/gcc*

If there were previous version gcc installed, it may show:


Also check previous version of g++ by:

ls /usr/bin/g++


Next the gcc-10 and g++-10 would be used.

Install previous version of gcc

If only recent version of gcc installed, it can be installed by:

sudo apt update
sudo apt install gcc-10 g++-10

Make and install with gcc-10

mkdir build
cd build
make install

Now there were no error messages.