Did not find what you were looking for?

Build Instructions Ubuntu

Dependencies and Prerequisites

This page is mainly build instructions for Ubuntu, but some comments are also added for RHEL8.

Basic instructions without Python binding and GRPC.

Configuration and build

ToolMinimum version
gcc11
python3.8
Qt6.4

It is possible to use Qt 6.4 for building ResInsight, but some install features introduced in Qt 6.5 are not supported.

Update apt installer

sudo apt update

Install GCC and related tools

sudo apt install build-essential curl zip unzip tar flex bison

Set default compiler

Dependencies for RHEL8

yum install curl zip unzip tar flex bison perl-IPC-Cmd gcc-toolset-10 freeglut

Clone and update sub modules

git clone https://github.com/OPM/ResInsight
cd ResInsight
git submodule update --init

Build and install required dependencies using vcpkg

vcpkg is located in the folder ThirdParty/vcpkg. The packages to be installed is specified in vcpkg.json. The actual install of the selected packages are done in the CMake configure step.

ThirdParty/vcpkg/bootstrap-vcpkg.sh

Qt - package manager

Qt6 can be installed using the package manager for Ubuntu

apt install qt6-base-dev qt6-base-private-dev qt6-charts-dev qt6-networkauth-dev libqt6svg6

Ubuntu 22.04 : Qt 6.2.4
Ubuntu 24.04 : Qt 6.4.2

Please note that 6.4 is fully supported for build, but some install features are not supported.

Qt - aqtinstall

Here is a short description on how to install a custom Qt version.

aqtinstall is a Python tool used to install precompiled versions of Qt. Other ways to install Qt is described official Qt documentation

Create a root folder for Qt installations. In this folder, create a virtual environment for aqtinstall:

python3 -m venv myvenv
source myvenv/bin/activate
pip3 install aqtinstall
aqt install-qt linux desktop 6.6.3 -m qtcharts qtnetworkauth

Build ResInsight

Install Ninja build tool

sudo apt-get install ninja-build

The configuration flags for a basic build is given in CMakePresets.json in the root of the repository. Configuration flags specific for the system to build on can be specified in CMakeUserPresets.json. This file is ignored by git.

  • Create a copy of CMakeUserPresets-example.json and rename to CMakeUserPresets.json
  • Update the path to your local installation of Qt6 for the key CMAKE_PREFIX_PATH in CMakeUserPresets.json

Set current working folder to the root folder of the ResInsight repository. Execute the following commands to build ResInsight:

cmake . --preset=linux-base
cd build
ninja

CMake Configuration