Skip to content

en_linux_global installation

mathildemerle edited this page Dec 13, 2019 · 7 revisions

Linux command line installations (debian / ubuntu based)

Description

Under linux most of installations can be done from a single task on the command line.

Pre-requisites list

Mandatory software

  • Git
  • C++ compilers and debuggers
  • CMake
  • Boost

Recommended software

  • Ninja
  • Valgrind

Installations

Git

In a terminal run the command:

sudo apt-get install git

C++ compilers and debuggers

Two possible compilers for medInria G++ and CLang. For G++, it is likely that it is already installed by default in your Linux distribution.
To install G++ in a terminal:

sudo apt-get install g++

If you prefer installing Clang, Clang-Tidy helps to verify coding rules.
To install Clang in a terminal:

sudo apt-get install clang clang-tidy

To debug it, it is likely that it is already installed by default in your linux distribution.
Install GDB in a terminal run the command:
sudo apt-get install gdb

CMake

Install CMake, in a terminal:

sudo apt-get install cmake cmake-curses-gui cmake-qt-gui

cmake-curses-gui an cmake-qt-gui are the two interfaces, command line and GUI to control CMake.

Boost

Install Boost, in a terminal:

sudo apt-get install libboost-all-dev

Valgrind

Install Valgrind, in a terminal:

sudo apt-get install valgrind

Ninja

Ninja replaces Cmake and allows faster compilations, it is more naturally multi-threaded and multi-process. Install Ninja, in a terminal run the command:

sudo apt-get install ninja-build

Tips and advice

No LSB modules are available

Suppress “No LSB modules are available.” warning:

sudo apt-get install lsb-core 

See https://askubuntu.com/questions/230766/how-lsb-module-affects-system-and-can-be-made-available-to-the-system

OpenGL

For some light distributions such as XUbuntu it is necessary to install OpenGL development libs explicitly.

sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev

Summary of orders

sudo apt-get install git
sudo apt-get install g++ gdb clang clang-tidy 
sudo apt-get install libboost-all-dev
sudo apt-get install cmake cmake-curses-gui cmake-qt-gui
sudo apt-get install valgrind
sudo apt-get install ninja-build
sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev

Next step

Installation of Qt and Qt-Creator Qt/Qt-Creator