Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
diana:autotools [2014-02-28 14:37:29]
davidb [Ubuntu 12.04 (Precise)]
diana:autotools [2022-05-31 09:29:31] (current)
Line 1: Line 1:
 ====== Building Metlibs and Diana with Autotools ====== ====== Building Metlibs and Diana with Autotools ======
  
-**Warning:** //This page is currently being revised. Details may be incorrect and are subject to change.//+**OUTDATED:** //This page is no longer up to date, diana and metlibs are now built using cmake.//
  
 +This document describes how to build the Diana application and its main dependencies (Fimex and Metlibs) from source code, focusing on Ubuntu 12.04 (Precise) and Fedora 20. We provide commands to install further dependencies as they are needed, but this assumes that previous steps have been followed. For example, we list the common dependencies between Metlibs and Fimex as Fimex dependencies.
 ===== General Prerequisites ===== ===== General Prerequisites =====
  
Line 20: Line 21:
  
 <code> <code>
-sudo yum -y install gcc-c++ make wget tar subversion autoconf automake findutils libtool +sudo yum install gcc-c++ make wget tar subversion autoconf automake \ 
-                    flex bison autoconf-archive gcc-gfortran+                 findutils libtool flex bison autoconf-archive 
 +                 gcc-gfortran file
 </code> </code>
  
 ===== Obtaining the source code ===== ===== Obtaining the source code =====
  
-Obtain the latest source code from the subversion repositories:+Obtain the latest source code from the source code repositories. Currently, fimex, metlibs and Diana are held in git repositories:
  
 **fimex:** **fimex:**
 <code> <code>
-svn co https://svn.met.no/fimex/tags/version0_51 fimex+git clone https://github.com/metno/fimex.git
 </code> </code>
  
 **metlibs:** **metlibs:**
 <code> <code>
-svn co https://svn.met.no/metlibs/common +git clone https://github.com/metno/metlibs-milogger.git 
-svn co https://svn.met.no/metlibs/diana-support +git clone https://github.com/metno/metlibs-puctools.git 
-svn co https://svn.met.no/metlibs/gl-support +git clone https://github.com/metno/metlibs-putools.git 
-svn co https://svn.met.no/metlibs/tseries-support +git clone https://github.com/metno/metlibs-pudatatypes.git 
-svn co https://svn.met.no/metlibs/qt-utilities+git clone https://github.com/metno/metlibs-qutilities.git 
 +git clone https://github.com/metno/metlibs-coserver.git
 </code> </code>
  
 **Diana:** **Diana:**
 <code> <code>
-svn co https://svn.met.no/diana/trunk diana+git clone https://github.com/metno/diana.git
 </code> </code>
  
Line 54: Line 57:
  
 <code> <code>
-sudo apt-get install libboost-dev libxml2-dev libproj-dev libudunits2-dev \+sudo apt-get install libxml2-dev libproj-dev libudunits2-dev \
                      libnetcdf-dev libgrib-api-dev libjasper-dev libpng12-dev \                      libnetcdf-dev libgrib-api-dev libjasper-dev libpng12-dev \
-                     libjpeg-dev libpq-dev liblog4cpp5-dev+                     libjpeg-dev libpq-dev liblog4cpp5-dev \ 
 +                     libboost-filesystem-dev libboost-system-dev \ 
 +                     libboost-iostreams-dev libboost-program-options-dev \ 
 +                     libboost-regex-dev libboost-test-dev \ 
 +                     libboost-date-time-dev
 </code> </code>
  
-==== Fedora ====+==== Fedora 20 ====
  
 Install the dependencies using the following command: Install the dependencies using the following command:
  
 <code> <code>
-sudo yum -y install boost-devel libxml2-devel udunits2-devel \ +sudo yum install boost-devel libxml2-devel udunits2-devel \ 
-                    netcdf-devel grib_api-devel jasper-devel libpng-devel \ +                 netcdf-devel grib_api-devel jasper-devel libpng-devel \ 
-                    libjpeg-turbo-devel libpqxx-devel log4cpp-devel \ +                 libjpeg-turbo-devel libpqxx-devel log4cpp-devel \ 
-                    proj-devel udunits-devel+                 proj-devel udunits-devel
 </code> </code>
  
Line 79: Line 86:
 <code> <code>
 sudo apt-get install ftgl-dev libhdf4g-dev libtiff4-dev libqt4-dev proj \ sudo apt-get install ftgl-dev libhdf4g-dev libtiff4-dev libqt4-dev proj \
-                     libboost-dev libboost-date-time-dev libboost-serialization-dev \ +                     libmysqlclient-dev liblog4cpp5-dev libcurl4-gnutls-dev \ 
-                     libboost-thread-dev libmysqlclient-dev liblog4cpp5-dev libcurl4-gnutls-dev+                     libgeotiff-dev libboost-thread-dev
 </code> </code>
  
Line 86: Line 93:
 <code> <code>
 sudo apt-get install ftgl-dev libhdf4g-dev libhdf5-serial-dev libtiff4-dev \ sudo apt-get install ftgl-dev libhdf4g-dev libhdf5-serial-dev libtiff4-dev \
-                     libqt4-dev proj libboost-dev libboost-date-time-dev \ +                     libqt4-dev proj libmysqlclient-dev libpqxx-dev \ 
-                     libboost-serialization-dev libboost-thread-dev libgeotiff-dev \ +                     libomniorb4-dev omniidl4 libldap2-dev liblog4cpp5-dev \ 
-                     libfimex-dev libmysqlclient-dev libpqxx-dev +                     libcurl4-gnutls-dev libgeotiff-dev libboost-thread-dev
-                     libomniorb4-dev omniidl4 libldap2-dev liblog4cpp5-dev libcurl4-gnutls-dev+
 </code> </code>
  
Line 95: Line 101:
  
 <code> <code>
-sudo yum -y install ftgl-devel libgeotiff-devel mesa-libGL-devel mesa-libGLU-devel qt-devel shapelib-devel+sudo yum install ftgl-devel libgeotiff-devel mesa-libGL-devel mesa-libGLU-devel 
 +                 qt-devel
 </code> </code>
  
Line 104: Line 111:
 ==== Ubuntu 12.04 (Precise) ==== ==== Ubuntu 12.04 (Precise) ====
  
-**Without libavformat:** 
 <code> <code>
 sudo apt-get install libemos-dev libgrib-api-dev libshp-dev libxt-dev sudo apt-get install libemos-dev libgrib-api-dev libshp-dev libxt-dev
-</code> 
- 
-**With libavformat:** 
-<code> 
-sudo apt-get install libemos-dev libgrib-api-dev libshp-dev libavformat-dev libxt-dev 
 </code> </code>
  
 ==== Fedora 20 ==== ==== Fedora 20 ====
  
-For observation buffer support in Diana, install EMOSLIB [[http://www.ecmwf.int/products/data/software/interpolation.html|from source]]). The optional libavformat library is not available in the standard Fedora repositories. If you really need to produce video files of products created with Diana, you may be able to find a suitable package for Fedora in one of the [[http://fedoraproject.org/wiki/Third_party_repositories|third party repositories]].+For observation buffer support in Diana, install EMOSLIB [[https://software.ecmwf.int/wiki/display/EMOS/Emoslib|from source]].
  
-**Without libavformat:** 
 <code> <code>
 sudo yum install grib_api-devel shapelib-devel sudo yum install grib_api-devel shapelib-devel
 </code> </code>
  
-===== Installing Metlibs ======+===== Installing Fimex =====
  
-Enter the subdirectories for each of the metlibs modules, configuring, building and installing them using the scripts listed below. Note that, by default, the libraries will be installed under ''/usr/local'' unless you specify a prefix to the configure script, such as <html>--prefix=$HOME/diana</html> to install the libraries in the ''diana'' directory inside the user's home directory. +Enter the ''fimex'' directory and configure the library with the following command:
- +
-==== Ubuntu 12.04 (Precise) ====+
  
 <code> <code>
-#/bin/sh+./configure 
 +</code>
  
-set -e+If you want to install the library in an alternative location, specify it using the <nowiki>--prefix</nowiki> 
 +option; for example, use the following command to specify a directory inside the user's home directory:
  
-THIS_DIR=`pwd`+<code> 
 +./configure --prefix=$HOME/diana 
 +</code>
  
-cd $THIS_DIR/common/miLogger/trunk +Build and install the library with the following commands:
-./autogen.sh && ./configure && make +
-sudo make install+
  
-cd $THIS_DIR/common/puCtools/trunk +<code> 
-./autogen.sh && ./configure && make +make 
-sudo make install+make install 
 +</code>
  
-cd $THIS_DIR/common/puTools/trunk +You may need root privileges to install the library unless you specified a 
-./autogen.sh && ./configure && make +prefix in the configuration step
-sudo make install+===== Installing Metlibs ======
  
-cd $THIS_DIR/tseries-support/puDatatypes/trunk +Enter the subdirectories for each of the metlibs modules, configuring, building and installing them using the scripts listed belowNote that, by default, the libraries will be installed under ''/usr/local'' unless you specify a prefix to the configure script, such as <nowiki>--prefix=$HOME/diana</nowiki> to install the libraries in the ''diana'' directory inside the user's home directory.
-./autogen.sh && ./configure && make +
-sudo make install +
- +
-cd $THIS_DIR/diana-support/diField/trunk +
-./autogen.sh && ./configure && make +
-sudo make install +
- +
-cd $THIS_DIR/diana-support/miRaster/trunk +
-./autogen.sh && ./configure --with-geotiff && make +
-sudo make install +
- +
-cd $THIS_DIR/gl-support/glp/trunk +
-./autogen.sh && ./configure && make +
-sudo make install +
- +
-cd $THIS_DIR/gl-support/miFTGL/trunk +
-./autogen.sh && ./configure && make +
-sudo make install +
- +
-cd $THIS_DIR/gl-support/glText/trunk +
-./autogen.sh && ./configure --enable-xfonts && make +
-sudo make install +
- +
-cd $THIS_DIR/qt-utilities/qUtilities/trunk +
-./autogen.sh && ./configure && make +
-sudo make install +
- +
-cd $THIS_DIR/qt-utilities/coserver/trunk +
-./autogen.sh && ./configure && make +
-sudo make install +
-</code> +
- +
-==== Fedora 20 ====+
  
 <code> <code>
Line 189: Line 157:
  
 THIS_DIR=`pwd` THIS_DIR=`pwd`
 +# uncomment next line on Fedora
 +#PREFIX="--prefix=/usr/local"
 +SUDO=sudo
  
-cd $THIS_DIR/common/miLogger/trunk +for l in milogger puctools putools pudatatypes qutilities coserver; do 
-./autogen.sh && ./configure --prefix=/usr/local && make +  cd "$THIS_DIR/metlibs-$l" 
-sudo make install +  ./autogen.sh && ./configure $PREFIX && make 
- +  $SUDO make install 
-cd $THIS_DIR/common/puCtools/trunk +done
-./autogen.sh && ./configure --prefix=/usr/local && make +
-sudo make install +
- +
-cd $THIS_DIR/common/puTools/trunk +
-./autogen.sh && ./configure --prefix=/usr/local && make +
-sudo make install +
- +
-cd $THIS_DIR/tseries-support/puDatatypes/trunk +
-./autogen.sh && ./configure --prefix=/usr/local && make +
-sudo make install +
- +
-cd $THIS_DIR/diana-support/diField/trunk +
-./autogen.sh && ./configure --prefix=/usr/local && make +
-sudo make install +
- +
-cd $THIS_DIR/diana-support/miRaster/trunk +
-./autogen.sh && ./configure --prefix=/usr/local --with-geotiff && make +
-sudo make install +
- +
-cd $THIS_DIR/gl-support/glp/trunk +
-./autogen.sh && ./configure --prefix=/usr/local && make +
-sudo make install +
- +
-cd $THIS_DIR/gl-support/miFTGL/trunk +
-./autogen.sh && ./configure --prefix=/usr/local && make +
-sudo make install +
- +
-cd $THIS_DIR/gl-support/glText/trunk +
-./autogen.sh && ./configure --prefix=/usr/local --enable-xfonts && make +
-sudo make install +
- +
-cd $THIS_DIR/qt-utilities/qUtilities/trunk +
-./autogen.sh && ./configure --prefix=/usr/local && make +
-sudo make install +
- +
-cd $THIS_DIR/qt-utilities/coserver/trunk +
-./autogen.sh && ./configure --prefix=/usr/local && make +
-sudo make install+
 </code> </code>
  
-==== Building ==== 
- 
-Build and install the library with the following commands: 
- 
-<code> 
-make 
-make install 
-</code> 
- 
-You may need root privileges to install the library unless you specified a 
-prefix in the configuration step. 
 ===== Installing Diana ===== ===== Installing Diana =====
  
-By default, support for observation buffers is conditionally enabled and video export is enabled. To disable video support, append the <html>--disable-video-support</html> option to the command line you use to configure the build.+**Note:** By default, support for observation buffers is conditionally enabled and video export is enabled. To disable video support, append the <nowiki>--disable-video-support</nowiki> option to the command line you use to configure the build.
  
 ==== Ubuntu 12.04 (Precise) ==== ==== Ubuntu 12.04 (Precise) ====
Line 255: Line 177:
  
 <code> <code>
 +./autogen.sh
 ./configure --enable-xlib --enable-geotiff ./configure --enable-xlib --enable-geotiff
 </code> </code>
  
-To configure the library for installation in a directory where you have permission to write files (for example, $HOME/diana for a directory in the user's home directory), use the <html>--prefix</html> option to specify the installation directory:+To configure the library for installation in a directory where you have permission to write files (for example, $HOME/diana for a directory in the user's home directory), use the <nowiki>--prefix</nowiki> option to specify the installation directory:
  
 <code> <code>
 +./autogen.sh
 ./configure --enable-xlib --enable-geotiff --prefix=$HOME/diana ./configure --enable-xlib --enable-geotiff --prefix=$HOME/diana
 </code> </code>
Line 269: Line 193:
  
 <code> <code>
-./configure --enable-xlib --enable-geotiff --disable-video-export --with-png-libdir=/usr/lib64+./autogen.sh 
 +./configure --enable-xlib --enable-geotiff --prefix=/usr/local \ 
 +            --with-png-libdir=/usr/lib64 --enable-vcross-v2 --with-udunits2-includedir=/usr/include/udunits2
 </code> </code>
  
-To configure the library for installation in a directory where you have permission to write files (for example, $HOME/diana for a directory in the user's home directory), use the <html>--prefix</html> option to specify the installation directory:+To configure the library for installation in a directory where you have permission to write files (for example, $HOME/diana for a directory in the user's home directory), use the <nowiki>--prefix</nowiki> option to specify the installation directory:
  
 <code> <code>
-./configure --enable-xlib --enable-geotiff --prefix=$HOME/diana --disable-video-export --with-png-libdir=/usr/lib64+./autogen.sh 
 +./configure --enable-xlib --enable-geotiff --prefix=$HOME/diana 
 +            --with-png-libdir=/usr/lib64 --enable-vcross-v2 --with-udunits2-includedir=/usr/include/udunits2
 </code> </code>
  
Line 289: Line 217:
 You may need root privileges to install the application unless you specified a prefix in the configuration step. You may need root privileges to install the application unless you specified a prefix in the configuration step.
  
 +If you want to use the video export function, you have to install the ''avconv'' utility.
 +
 +  * Ubuntu/Debian: ''sudo apt-get install libav-tools''
 +
 +===== Next Steps =====
 +
 +See the [[gettingstarted#installing_data_files|Installing Data Files]] section of the [[gettingstarted|Getting Started]] document for instructions about configuring and running Diana.
  • diana/autotools.1393598249.txt.gz
  • Last modified: 2022-05-31 09:23:13
  • (external edit)