Skip to content
Snippets Groups Projects
Unverified Commit e5ddf17d authored by Lars Bilke's avatar Lars Bilke
Browse files

[web] Update instructions to install req. gcc on older Ubuntu.

parent 1843748e
No related branches found
No related tags found
No related merge requests found
...@@ -57,33 +57,33 @@ On Debian-based (we recommend using Ubuntu {{< dataFile "versions.tested_version ...@@ -57,33 +57,33 @@ On Debian-based (we recommend using Ubuntu {{< dataFile "versions.tested_version
sudo apt install build-essential sudo apt install build-essential
``` ```
You need to have at least **GCC {{< dataFile "versions.minimum_version.gcc" >}}** which you can check with `gcc --version` (Ubuntu {{< dataFile "versions.tested_version.ubuntu" >}} has already version 11). You need to have at least **GCC {{< dataFile "versions.minimum_version.gcc" >}}** which you can check with `gcc --version`.
<div class='note'> <div class='note'>
### Install the required compiler on older Ubuntu versions ### Install the required compiler on older Ubuntu versions
If you are on an older Ubuntu version you can install a newer compiler from the `ubuntu-toolchain-r/test`-repository (with the following steps e.g. you can install GCC 10.3.0 on Ubuntu 20.04): If you are on an older Ubuntu version than {{< dataFile "versions.tested_version.ubuntu" >}} you can install a newer compiler from the `ubuntu-toolchain-r/test`-repository (with the following steps e.g. you can install GCC {{< dataFile "versions.minimum_version.gcc" 1 >}} on Ubuntu 20.04):
```bash ```bash
sudo apt-get install software-properties-common sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update sudo apt-get update
sudo apt-get install gcc-10 sudo apt-get install gcc-{{< dataFile "versions.minimum_version.gcc" 1 >}}
sudo apt-get install g++-10 sudo apt-get install g++-{{< dataFile "versions.minimum_version.gcc" 1 >}}
``` ```
To make the newly installed compiler the default one: To make the newly installed compiler the default one:
```bash ```bash
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 60 \ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-{{< dataFile "versions.minimum_version.gcc" 1 >}} 60 \
--slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/g++ g++ /usr/bin/g++-{{< dataFile "versions.minimum_version.gcc" 1 >}}
``` ```
If you do not do this you have to specify the compiler during the first CMake run: If you do not do this you have to specify the compiler during the first CMake run:
```bash ```bash
CC=gcc-10 CXX=c++-10 cmake ../ogs [more CMake options] CC=gcc-{{< dataFile "versions.minimum_version.gcc" 1 >}} CXX=c++-{{< dataFile "versions.minimum_version.gcc" 1 >}} cmake ../ogs [more CMake options]
``` ```
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment