Compiling Awl on Ubuntu 18 and 20 with GCC 11

Below I provided the instruction on how to build Awl on Ubuntu 18 and 20.

On Ubuntu 18 you do an extra step to install CMake version >= 3.12:

wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt update

Then do the following steps on both Ubuntu 18 and 20:

sudo apt install cmake
cmake --version

Install GCC 11:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-11 g++-11
update-alternatives --display gcc
ll /usr/bin/gcc-11
ll /usr/bin/g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10 --slave /usr/bin/g++ g++ /usr/bin/g++-11
g++ --version
gcc --version

Build Awl:

mkdir repos
cd repos
git clone https://github.com/dmitriano/Awl
mkdir -p build/awl
cd build/awl
cmake ../../Awl/ -DCMAKE_BUILD_TYPE=Release
make -j4

Leave a Reply

Your email address will not be published.