From a1a194b4c645a466a3ce2870ec4001e48a5153b4 Mon Sep 17 00:00:00 2001 From: Manuel Grizonnet <manuel.grizonnet@cnes.fr> Date: Tue, 4 Oct 2016 16:35:28 +0200 Subject: [PATCH] DOC: update doc in SG after Monteverdi integration as a module --- Documentation/SoftwareGuide/Latex/FAQ.tex | 3 +- .../SoftwareGuide/Latex/Installation.tex | 189 +++++++++++------- .../SoftwareGuide/Latex/SoftwareGuide.tex | 4 +- 3 files changed, 122 insertions(+), 74 deletions(-) diff --git a/Documentation/SoftwareGuide/Latex/FAQ.tex b/Documentation/SoftwareGuide/Latex/FAQ.tex index 278d521f46..f720f447ac 100644 --- a/Documentation/SoftwareGuide/Latex/FAQ.tex +++ b/Documentation/SoftwareGuide/Latex/FAQ.tex @@ -223,7 +223,7 @@ point for any new OTB user. The code source for these examples is distributed with the toolbox. Another information source is the on-line API documentation which is available at \url{http://www.orfeo-toolbox.org/doxygen}. -You can also find some information about how to use Monteverdi, Monteverdi2 and the OTB-Applications into the Cookbook at \url{http://www.orfeo-toolbox.org/CookBook/}. +You can also find some information about how to use Monteverdi and the OTB-Applications into the Cookbook at \url{http://www.orfeo-toolbox.org/CookBook/}. \section{Contributing to OTB}\label{sec:contributing} @@ -394,6 +394,7 @@ following: \item Support Spuperbuild mechanism to build OTB and all dependencies from source \item No more internal versions of most third parties + \item Monteverdi as a module in OTB \end{itemize} \end{itemize} diff --git a/Documentation/SoftwareGuide/Latex/Installation.tex b/Documentation/SoftwareGuide/Latex/Installation.tex index d2d1fe8b33..319e049a18 100644 --- a/Documentation/SoftwareGuide/Latex/Installation.tex +++ b/Documentation/SoftwareGuide/Latex/Installation.tex @@ -6,13 +6,18 @@ There are two ways to install OTB library on your system: installing from a binary distribution or compiling from sources. You can find information about the installation of binary packages for OTB and Monteverdi in the OTB-Cookbook. -This chapter covers compilation of OTB library from source. -OTB has been developed and tested across different combinations of operating systems, compilers, and hardware platforms including Windows, Linux and Mac OSX. It is known to work with the following compilers in 32/64 bit: +This chapter covers compilation of OTB library from source. Note that it covers +also the compilation of Monteverdi which is integrated as an OTB module since +version 5.8. + +OTB has been developed and tested across different combinations of operating +systems, compilers, and hardware platforms including Windows, Linux and Mac OSX. +It is known to work with the following compilers in 32/64 bit: \begin{itemize} \item Visual Studio 2015 on Windows -\item GCC 4.x on GNU/Linux -\item AppleClang on MacOSX (10.8 or higher) +\item GCC 4.x,5.x or CLang 3.x on GNU/Linux +\item AppleClang on Mac~OS~X (10.8 or higher) \end{itemize} \index{CMake} @@ -66,9 +71,9 @@ For more information on CMake, check : \end{center} \index{Dependencies} -OTB depends on a number of external libraries. -Some are mandatory, meaning that OTB cannot be compiled without them, while others are optional and can be activated or -not during the build process. +OTB depends on a number of external libraries. Some are mandatory, meaning that +OTB cannot be compiled without them, while others (the majority) are optional +and can be activated or not during the build process. See table \ref{tab:otb-dependencies} for the full list of dependencies. \begin{center} \begin{tiny} @@ -83,36 +88,53 @@ See table \ref{tab:otb-dependencies} for the full list of dependencies. \hline \textbf{OSSIM} & \url{http://www.ossim.org} & yes & 1.8.20-3 \\ \hline -\textbf{Curl} & \url{http://www.curl.haxx.se} & no & - \\ -\hline -\textbf{FFTW} & \url{http://www.fftw.org} & no & - \\ -\hline \textbf{libgeotiff} & \url{http://trac.osgeo.org/geotiff/} & yes & - \\ \hline -\textbf{OpenJPEG} & \url{http://code.google.com/p/openjpeg/} & no & - \\ -\hline \textbf{boost} & \url{http://www.boost.org} & yes & - \\ \hline \textbf{openthreads} & \url{http://www.openscenegraph.org} & yes & - \\ \hline -\textbf{Mapnik} & \url{http://www.mapnik.org} & no & - \\ -\hline \textbf{tinyXML} & \url{http://www.grinninglizard.com/tinyxml} & yes & - \\ \hline \textbf{6S} & \url{http://6s.ltdri.org} & no & - \\ \hline -\textbf{SiftFast} & \url{http://libsift.sourceforge.net} & no & - \\ +\textbf{Curl} & \url{http://www.curl.haxx.se} & no & - \\ \hline -\textbf{MuParser} & \url{http://www.muparser.sourceforge.net} & no & - \\ +\textbf{FFTW} & \url{http://www.fftw.org} & no & - \\ \hline -\textbf{MuParserX} & \url{http://muparserx.beltoforion.de} & no & 3.0.5 \\ +\textbf{GLEW} & \url{http://glew.sourceforge.net/} & no & - \\ +\hline +\textbf{GLFW} & \url{http://www.glfw.org/} & no & 3 \\ +\hline +\textbf{GLUT} & \url{https://www.opengl.org/resources/libraries/glut/} & no & - \\ +\hline +\textbf{libKML} & \url{https://github.com/google/libkml} & no & 1.2 \\ \hline \textbf{libSVM} & \url{http://www.csie.ntu.edu.tw/~cjlin/libsvm} & no & 2.0 \\ \hline -\textbf{Qt} & \url{http://qt-project.org/} & no & 4 \\ +\textbf{Mapnik} & \url{http://www.mapnik.org} & no & 2.x \\ +\hline +\textbf{MPI} & \url{https://www.open-mpi.org/} & no & - \\ +\hline +\textbf{MuParser} & \url{http://www.muparser.sourceforge.net} & no & - \\ +\hline +\textbf{MuParserX} & \url{http://muparserx.beltoforion.de} & no & 3.0.5 \\ \hline \textbf{OpenCV} & \url{http://opencv.org} & no & 2 \\ \hline +\textbf{OPENGL} & \url{https://www.opengl.org/} & no & - \\ +\hline +\textbf{Qt} & \url{http://qt-project.org} & no & 4 \\ +\hline +\textbf{QWT} & \url{http://qwt.sourceforge.net} & no & 5 \\ +\hline +\textbf{Shark} & \url{http://image.diku.dk/shark/} & no & 3.1 \\ +\hline +\textbf{SiftFast} & \url{http://libsift.sourceforge.net} & no & - \\ +\hline +\textbf{SPTW} & \url{https://github.com/kornholi/sptw.git} & no & - \\ +\hline + \end{tabular} \caption{External libraries used in OTB.} \label{tab:otb-dependencies} @@ -199,52 +221,66 @@ If you do not know which method to use and just want to compile OTB with all its \subsection{SuperBuild: Build OTB and all dependencies} \label{sec:installation-linux-superbuild} -The SuperBuild is a way of compiling dependencies to a project just before you build the project. Thanks to CMake and -its ExternalProject module, it is possible to download a source archive, configure and compile it when building -the main project. This feature has been used in other CMake-based projects (ITK, Slicer, ParaView,...). -In OTB, the SuperBuild is implemented with no impact on the library sources : the sources for SuperBuild are located in -the 'OTB/SuperBuild' subdirectory. It is made of CMake scripts and source patches that allow to compile all the -dependencies necessary for OTB. Once all the dependencies are compiled and installed, the OTB library is built using -those dependencies. - -OTB's compilation is customized by specifying configuration variables. -The most important configuration variables are shown in table~\ref{tab:installation-cmake-variables}. -The simplest way to provide configuration variables is via the command line \texttt{-D} option: +The SuperBuild is a way of compiling dependencies to a project just before you +build the project. Thanks to CMake and its ExternalProject module, it is +possible to download a source archive, configure and compile it when building +the main project. This feature has been used in other CMake-based projects (ITK, +Slicer, ParaView,...). In OTB, the SuperBuild is implemented with no impact on +the library sources : the sources for SuperBuild are located in the +'OTB/SuperBuild' subdirectory. It is made of CMake scripts and source patches +that allow to compile all the dependencies necessary for OTB. Once all the +dependencies are compiled and installed, the OTB library is built using those +dependencies. + +OTB's compilation is customized by specifying configuration variables. The most +important configuration variables are shown in +table~\ref{tab:installation-cmake-variables}. The simplest way to provide +configuration variables is via the command line \texttt{-D} option: \begin{verbatim} $ cd ~/OTB/build $ cmake -D CMAKE_INSTALL_PREFIX=~/OTB/install ../otb/SuperBuild \end{verbatim} A pre-load script can also be used with the \texttt{-C} options (see \url{https://cmake.org/cmake/help/v3.4/manual/cmake.1.html#options}). -Another option is to set variables manually with \texttt{cmake-gui} or \texttt{ccmake}. +Another option is to set variables manually with \texttt{cmake-gui} +or \texttt{ccmake}. Please note that the \texttt{CMAKE\_INSTALL\_PREFIX} variable is important because the SuperBuild will install some targets during the compilation step. Therefore this directory will be used even if you don't use make install target. In fact there is no make install target for the SuperBuild. -By default, SuperBuild will not use any of libraries installed on system. All \texttt{USE\_SYSTEM\_\textit{XXX}} are -are set to FALSE. This is our recommended way of using SuperBuild. You are however free to use a system library -if you want!. You must be very much aware of dependencies of those libraries you use from system. For example, -if libjpeg is not used from superbuild using \texttt{USE\_SYSTEM\_JPEG=TRUE} then you should not use zlib from superbuild -because zlib is a dependency of libjpeg. Here SuperBuild will not automagically set \texttt{USE\_SYSTEM\_ZLIB=FALSE}. -You must do it yourself. The example of libjpeg - zlib dependency chain is so simple. -Imagine the same case for GDAL which depends on zlib, libjpeg, libtiff(with big tiff support), geotiff, -sqlite, curl, geos, libkml, openjpeg. This is one of the reasons we recommend to use SuperBuild exclusively or not. - -All dependencies are configured and built in a way that help us to get an efficient build OTB. -So we enable geotiff (with proj4 support), openjpeg, geos in GDAL build. - -It is also important to note that SuperBuild is tested daily on all three platforms that makes us clear that -there is no issue with new changes in OTB and its dependencies. It simply works! +By default, SuperBuild will not use any of libraries installed on +system. All \texttt{USE\_SYSTEM\_\textit{XXX}} are are set to FALSE. This is our +recommended way of using SuperBuild. You are however free to use a system +library if you want!. You must be very much aware of dependencies of those +libraries you use from system. For example, if libjpeg is not used from +superbuild using \texttt{USE\_SYSTEM\_JPEG=TRUE} then you should not use zlib +from superbuild because zlib is a dependency of libjpeg. Here SuperBuild will +not automagically set \texttt{USE\_SYSTEM\_ZLIB=FALSE}. You must do it +yourself. The example of libjpeg - zlib dependency chain is so simple. Imagine +the same case for GDAL which depends on zlib, libjpeg, libtiff(with big tiff +support), geotiff, sqlite, curl, geos, libkml, openjpeg. This is one of the +reasons we recommend to use SuperBuild exclusively or not. + +All dependencies are configured and built in a way that help us to get an +efficient build OTB. So we enable geotiff (with proj4 support), openjpeg, geos +in GDAL build. + +It is also important to note that SuperBuild is tested daily on all three +platforms. It simply works! (see table~\ref{tab:installation-cmake-variables}). -SuperBuild downloads dependencies into the \texttt{DOWNLOAD\_LOCATION} directory, which will be +SuperBuild downloads dependencies into the \texttt{DOWNLOAD\_LOCATION} +directory, which will be \texttt{$\sim$/OTB/build/Downloads} in our example. -Dependencies can be downloaded manually into this directory before the compilation step. -This can be useful if you wish to bypass a proxy, intend to compile OTB without an internet connection, or other network -constraint. You can find an archive with sources of all our dependencies on the Orfeo ToolBox website (pick the 'SuperBuild-archives' corresponding to the OTB version you want to build) : +Dependencies can be downloaded manually into this directory before the +compilation step. This can be useful if you wish to bypass a proxy, intend to +compile OTB without an internet connection, or other network constraint. You can +find an archive with sources of all our dependencies on the Orfeo ToolBox +website (pick the 'SuperBuild-archives' corresponding to the OTB version you +want to build) : \begin{center} \url{https://www.orfeo-toolbox.org/packages} \end{center} @@ -272,9 +308,12 @@ We recommend adding OTB build directory to your PATH for easy access: export PATH=$PATH:~/OTB/build/OTB/build/bin \end{verbatim} -Monteverdi is also compiled by the SuperBuild (as long as you activate it with -ENABLE\_MONTEVERDI). To use OTB applications from within Monteverdi you will need -to define the OTB\_APPLICATION\_PATH environment variable. +Monteverdi is integrated as an OTB module since release 5.8 and it is compiled +by the SuperBuild (as long as GLEW, GLUT, OPENGL, Qt and QWT modules are +activated). + +To use OTB applications from within Monteverdi you will need to define the +OTB\_APPLICATION\_PATH environment variable. \begin{verbatim} export OTB_APPLICATION_PATH=~/OTB/build/OTB/build/lib/otb/applications monteverdi @@ -291,36 +330,42 @@ Once all OTB dependencies are availables on your system, use CMake to generate a $ cd ~/OTB/build $ cmake -C configuration.cmake ../otb \end{verbatim} -The script \texttt{configuration.cmake} needs to contain dependencies location if CMake cannot find them automatically. -This can be done with the \texttt{\textit{XXX}\_DIR} variables containing the directories which contain the -FindXXX.cmake scripts, or with the \texttt{\textit{XXX}\_INCLUDEDIR} and \texttt{\textit{XXX}\_LIBRARY} variables. - -Additionally, decide which module you wish to enable, together with tests and examples. -Refer to table~\ref{tab:installation-cmake-variables} for the list of CMake variables. - -Since OTB is modularized, it is possible to only build some modules instead of the whole set. -To deactivate a module (and the ones that depend on it) switch off the CMake variable OTB\_BUILD\_DEFAULT\_MODULES, -configure, and then switch off each \texttt{Module\_module\_name} variable. -To provide an overview on how things work, the option \texttt{COMPONENTS} of the CMake command find\_package is used in -order to only load the requested modules. -This module-specific list prevent CMake from performing a blind search; it is also a convienent way to monitor the -dependencies of each module. +The script \texttt{configuration.cmake} needs to contain dependencies location +if CMake cannot find them automatically. This can be done with +the \texttt{\textit{XXX}\_DIR} variables containing the directories which +contain the FindXXX.cmake scripts, or with the \texttt{\textit{XXX}\_INCLUDEDIR} +and \texttt{\textit{XXX}\_LIBRARY} variables. + +Additionally, decide which module you wish to enable, together with tests and +examples. Refer to table~\ref{tab:installation-cmake-variables} for the list of +CMake variables. + +Since OTB is modularized, it is possible to only build some modules instead of +the whole set. To deactivate a module (and the ones that depend on it) switch +off the CMake variable OTB\_BUILD\_DEFAULT\_MODULES, configure, and then switch +off each \texttt{Module\_module\_name} variable. To provide an overview on how +things work, the option \texttt{COMPONENTS} of the CMake command find\_package +is used in order to only load the requested modules. This module-specific list +prevent CMake from performing a blind search; it is also a convienent way to +monitor the dependencies of each module. \begin{verbatim} find_package(OTB COMPONENTS OTBCommon OTBTransform [...]) \end{verbatim} -Some of the OTB capabilities are considered as optional, and you can deactivate the related modules thanks to a set of -CMake variables starting with \texttt{OTB\_USE\_\textit{XXX}}. -Table~\ref{tab:optional} shows which modules are associated to these variables. It is very important to notice that +Some of the OTB capabilities are considered as optional, and you can deactivate +the related modules thanks to a set of CMake variables starting +with \texttt{OTB\_USE\_\textit{XXX}}. Table~\ref{tab:optional} shows which +modules are associated to these variables. It is very important to notice that these variable override the variable OTB\_BUILD\_DEFAULT\_MODULES. -You are now ready to compile OTB! -Simply use the make command (other targets can be generated with CMake's \texttt{-G} option): +You are now ready to compile OTB! Simply use the make command (other targets +can be generated with CMake's \texttt{-G} option): \begin{verbatim} $ make \end{verbatim} -The installation target will copy the binaries and libraries to the installation location: +The installation target will copy the binaries and libraries to the installation +location: \begin{verbatim} $ make install \end{verbatim} diff --git a/Documentation/SoftwareGuide/Latex/SoftwareGuide.tex b/Documentation/SoftwareGuide/Latex/SoftwareGuide.tex index 4affc164b8..90a8f0cf5d 100644 --- a/Documentation/SoftwareGuide/Latex/SoftwareGuide.tex +++ b/Documentation/SoftwareGuide/Latex/SoftwareGuide.tex @@ -245,7 +245,9 @@ colorlinks,linkcolor={blue},citecolor={blue},urlcolor={blue}, \input{Introduction.tex} \input{Installation.tex} -\input{CompilingMonteverdi.tex} +%Monteverdi is integrated in OTB as a module since release 5.8 so there is no +%need to maintain a specific section regarding monteverdi compilation. +%\input{CompilingMonteverdi.tex} \input{SystemOverview.tex} -- GitLab