Install MicMac Ubuntu

De MicMac
Révision de 7 juin 2024 à 05:57 par Harlock (discussion | contributions)

(diff) ← Version précédente | Voir la version courante (diff) | Version suivante → (diff)
Aller à : navigation, rechercher

MicMac is an open source project and you can download the source code and compile the project yourself. This page presents the steps of the installation on a Linux system using apt-get (such as Ubuntu), but similar steps work on other systems.

Beware : the code available in the latest revision might not be stable or might not compile in a given OS.

Get the source

The MicMac project is now hosted on the GitHub platform.

Install Git

sudo apt-get install git

Install other prerequisites

 sudo apt-get install make imagemagick libimage-exiftool-perl exiv2 proj-bin qt5-default cmake build-essential

Download the source

Go to the installation directory, where you want to install MicMac.

For “optimisation” reasons, the project files were divided into three GitHub sub-projects:

To retrieve the source code to micmac folder:

git clone https://github.com/micmacIGN/micmac.git micmac

Build from sources

Automatically

The script_jenkins.sh available in micmac repository (or here : [1]) can be used for an automatic compilation from sources.

Manually

From the installation directory, move to the 'micmac' directory :

cd micmac/

Then, you have to create a build directory and go in it :

mkdir build
cd build

Then we have to generate the makefile with the right options. To generate the defaut makefile, run :

cmake -DWITH_QT5=1 -DWITH_CPP11=1 ..
About option -DWITH_QT5=1

Use this option if you want to use tools GUI such : SaisieAppuisInitQT, SaisieMasqQT etc... If not, simply use :

cmake ../

You have perhaps to install QT if it's not done :

sudo apt-get install qt5-default qttools5-dev-tools

NB : Version 5 is used here, use "-DWITH_QT4=1" instead if ou have QT v4.

Now we can finally build the sources by launching :

make install -jK

Where K="number of processor in your computer" (if you are not sure how many cores you have, just write a big number and all of the cores will be used).

Add MicMac to path

We have now to edit the file wich contains environnement path which is located in "/etc/bash.bashrc". The file is maybe hidden, so press CTRL+H, or activate "Hidden files" in Display (Top bar). So open a terminal and type :

sudo gedit /etc/bash.bashrc

NB : files in "/etc/" have to be opened in super user mode.
Add the following lines at the bottom of the file :
export PATH=/micmac_install_directory/micmac/bin:$PATH

Check Installation

List of MicMac tools

To check if MicMac is well installed, you can type in a terminal :

mm3d

This will return the list of all tools available for micmac library.

Check dependencies

Sometimes, even when the MicMac installation is good, you can encounter messages in the terminal such as :

  • "Warning Exiftool not installed"

This warnings means that MicMac can't find an external tools. MicMac integrates a module which can check if all dependencies are correctly installed. It can be called by typing :

mm3d CheckDependencies
Exemple d'image en hauteur
Screenshot 1

You will get an output like Screenshot 1, with different informations :

  • MicMac revision : micmac source code version number
  • Qt : "enabled" permit you to use graphical interfaces such SaisieAppuisQT
  • Kakadu : Image library for JPEG2000 management
  • MicMac directory : Directory where MicMac is installed
  • make :
  • exiftool : library of image metadata management
  • exiv2 : library of image metadata management
  • convert :
  • proj : library for cartographic projection
  • cs2cs :

Update sources

To update the sources, go in the installtion directory ("installation_directory/micmac") and type:

git pull

You have now to build again the sources:

cd build
cmake ..
make install -j8

NB : if you want still use QT, don't forget to use cmake -DWITH_QT5=1 ../

Troubleshooting

Errors with cmake

  • ...Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)... => Try to install Qt. If qt5-default is not available, try : sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
  • No CMAKE_CXX_COMPILER could be found. => install g++ (sudo apt-get install g++)
  • ...Could not find a package configuration file provided by "Qt5OpenGL"... => install libqt5opengl5-dev