Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
diana:autotools [2014-02-28 14:13:18] davidb [Installing Diana] |
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 | + | **OUTDATED:** //This page is no longer up to date, diana and metlibs |
- | ===== Obtaining the source code ===== | + | 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 | ||
- | Obtain | + | This section describes |
+ | ==== Ubuntu 12.04 (Precise) ==== | ||
- | **fimex:** | + | On a clean stock Ubuntu Precise (12.04) install, you will first need to install build tools: |
- | < | + | |
- | svn co https:// | + | |
- | </ | + | |
- | **metlibs: | ||
< | < | ||
- | svn co https:// | + | sudo apt-get install build-essential autoconf automake libtool subversion \ |
- | svn co https:// | + | gfortran flex bison |
- | svn co https:// | + | |
- | svn co https:// | + | |
- | svn co https:// | + | |
</ | </ | ||
- | **Diana:** | + | ==== Fedora 20 ==== |
+ | |||
+ | On Fedora 20, this command has been found to install a reasonable base set of tools: | ||
< | < | ||
- | svn co https:// | + | sudo yum install gcc-c++ make wget tar subversion autoconf automake \ |
+ | | ||
+ | | ||
</ | </ | ||
- | ===== General Prerequisites | + | ===== Obtaining the source code ===== |
- | This section describes | + | Obtain |
- | ==== Ubuntu 12.04 (Precise) ==== | + | |
- | On a clean stock Ubuntu Precise (12.04) install, you will first need to install build tools: | + | **fimex:** |
+ | < | ||
+ | git clone https:// | ||
+ | </ | ||
+ | **metlibs: | ||
< | < | ||
- | sudo apt-get install build-essential autoconf automake libtool subversion gfortran | + | git clone https:// |
+ | git clone https:// | ||
+ | git clone https:// | ||
+ | git clone https:// | ||
+ | git clone https:// | ||
+ | git clone https:// | ||
</ | </ | ||
- | ==== Fedora 20 ==== | + | **Diana:** |
- | + | ||
- | On Fedora 20, this command has been found to install a reasonable base set of tools: | + | |
< | < | ||
- | sudo yum -y install gcc-c++ make wget tar subversion automake findutils libtool | + | git clone https:// |
</ | </ | ||
Line 52: | Line 57: | ||
< | < | ||
- | sudo apt-get install | + | sudo apt-get install libxml2-dev libproj-dev libudunits2-dev \ |
| | ||
- | | + | |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
</ | </ | ||
- | ==== Fedora ==== | + | ==== Fedora |
Install the dependencies using the following command: | Install the dependencies using the following command: | ||
< | < | ||
- | sudo yum -y install | + | sudo yum install boost-devel libxml2-devel udunits2-devel \ |
- | netcdf-devel grib_api-devel jasper-devel libpng-devel \ | + | |
- | libjpeg-turbo-devel libpqxx-devel log4cpp-devel \ | + | |
- | proj-devel udunits-devel | + | |
</ | </ | ||
Line 76: | Line 85: | ||
**Without optional libraries: | **Without optional libraries: | ||
< | < | ||
- | sudo apt-get install | + | 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 \ |
- | | + | libgeotiff-dev |
</ | </ | ||
**With optional libraries: | **With optional libraries: | ||
< | < | ||
- | sudo apt-get install | + | sudo apt-get install ftgl-dev libhdf4g-dev libhdf5-serial-dev libtiff4-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 |
- | | + | |
</ | </ | ||
Line 93: | Line 101: | ||
< | < | ||
- | sudo yum -y install | + | sudo yum install |
+ | | ||
</ | </ | ||
Line 102: | Line 111: | ||
==== Ubuntu 12.04 (Precise) ==== | ==== Ubuntu 12.04 (Precise) ==== | ||
- | **Without libavformat: | ||
< | < | ||
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 | ||
- | </ | ||
- | |||
- | **With libavformat: | ||
- | < | ||
- | sudo apt-get install libemos-dev libgrib-api-dev libshp-dev libavformat-dev libxt-dev | ||
</ | </ | ||
==== 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:// | + | For observation buffer support in Diana, install EMOSLIB [[https://software.ecmwf.int/wiki/display/EMOS/Emoslib|from source]]. |
- | **Without libavformat: | ||
< | < | ||
sudo yum install grib_api-devel shapelib-devel | sudo yum install grib_api-devel shapelib-devel | ||
</ | </ | ||
- | ===== Installing | + | ===== Installing |
- | Enter the subdirectories for each of the metlibs modules, configuring, | + | Enter the '' |
- | + | ||
- | ==== Ubuntu 12.04 (Precise) ==== | + | |
< | < | ||
- | #/bin/sh | + | ./configure |
+ | </code> | ||
- | set -e | + | If you want to install the library in an alternative location, specify it using the < |
+ | option; for example, use the following command to specify a directory inside the user's home directory: | ||
- | THIS_DIR=`pwd` | + | < |
+ | ./configure --prefix=$HOME/ | ||
+ | </ | ||
- | cd $THIS_DIR/ | + | Build and install |
- | ./ | + | |
- | sudo make install | + | |
- | cd $THIS_DIR/ | + | < |
- | ./ | + | make |
- | sudo make install | + | make install |
+ | </ | ||
- | cd $THIS_DIR/ | + | 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/ | + | Enter the subdirectories for each of the metlibs modules, configuring, |
- | ./autogen.sh && ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/diana-support/diField/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/diana-support/ | + | |
- | ./autogen.sh && ./configure --with-geotiff && make | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | </ | + | |
- | + | ||
- | ==== Fedora 20 ==== | + | |
< | < | ||
Line 187: | Line 157: | ||
THIS_DIR=`pwd` | THIS_DIR=`pwd` | ||
+ | # uncomment next line on Fedora | ||
+ | # | ||
+ | SUDO=sudo | ||
- | cd $THIS_DIR/ | + | for l in milogger puctools putools pudatatypes qutilities coserver; do |
- | ./ | + | cd "$THIS_DIR/metlibs-$l" |
- | sudo make install | + | ./ |
- | + | $SUDO make install | |
- | cd $THIS_DIR/common/ | + | done |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
- | + | ||
- | cd $THIS_DIR/ | + | |
- | ./ | + | |
- | sudo make install | + | |
</ | </ | ||
- | ==== Building ==== | ||
- | |||
- | Build and install the library with the following commands: | ||
- | |||
- | < | ||
- | make | ||
- | make install | ||
- | </ | ||
- | |||
- | 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> | + | **Note: |
==== Ubuntu 12.04 (Precise) ==== | ==== Ubuntu 12.04 (Precise) ==== | ||
Line 253: | Line 177: | ||
< | < | ||
+ | ./ | ||
./configure --enable-xlib --enable-geotiff | ./configure --enable-xlib --enable-geotiff | ||
</ | </ | ||
- | 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> | + | 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> |
< | < | ||
+ | ./ | ||
./configure --enable-xlib --enable-geotiff --prefix=$HOME/ | ./configure --enable-xlib --enable-geotiff --prefix=$HOME/ | ||
</ | </ | ||
Line 267: | Line 193: | ||
< | < | ||
- | ./configure --enable-xlib --enable-geotiff --disable-video-export | + | ./ |
+ | ./configure --enable-xlib --enable-geotiff --prefix=/ | ||
+ | | ||
</ | </ | ||
- | 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> | + | 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> |
< | < | ||
- | ./configure --enable-xlib --enable-geotiff --prefix=$HOME/ | + | ./ |
+ | ./configure --enable-xlib --enable-geotiff --prefix=$HOME/ | ||
+ | | ||
</ | </ | ||
Line 287: | 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 '' | ||
+ | |||
+ | * Ubuntu/ | ||
+ | |||
+ | ===== Next Steps ===== | ||
+ | |||
+ | See the [[gettingstarted# |