Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
diana:autotools [2012-06-19 10:18:23] lisbethb |
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 ====== | ||
- | | + | **OUTDATED:** //This page is no longer up to date, diana and metlibs |
- | | + | |
- | * [[ftp://ftp.met.no/ | + | |
- | They both use a number of specially-written autoconf macros, which can be found in metlibs' | + | 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 ===== | ||
- | ===== Prerequisites ===== | + | This section describes the basic set of packages that will be required to build the software. |
+ | ==== Ubuntu 12.04 (Precise) | ||
- | On a clean stock Ubuntu | + | On a clean stock Ubuntu |
- | * '' | + | < |
- | * '' | + | sudo apt-get install |
- | * '' | + | |
- | * '' | + | </ |
- | * '' | + | |
- | * '' | + | ==== Fedora 20 ==== |
+ | |||
+ | On Fedora 20, this command has been found to install a reasonable base set of tools: | ||
< | < | ||
- | sudo apt-get | + | sudo yum install |
+ | | ||
+ | | ||
</ | </ | ||
- | Next, you will need to install various third-party libraries that Metlibs and Diana depend on: | + | ===== Obtaining the source code ===== |
- | == Metlibs == | + | Obtain the latest source code from the source code repositories. Currently, fimex, metlibs and Diana are held in git repositories: |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | **Without optional libraries:** | + | **fimex:** |
< | < | ||
- | sudo apt-get install flex bison ftgl-dev libhdf4g-dev libtiff4-dev libqt4-dev proj libboost-dev libboost-date-time-dev \ | + | git clone https:// |
- | | + | |
</ | </ | ||
- | **With optional libraries:** | + | **metlibs:** |
< | < | ||
- | sudo apt-get install flex bison ftgl-dev libhdf4g-dev libhdf5-serial-dev libtiff4-dev libqt4-dev proj libboost-dev libboost-date-time-dev \ | + | git clone https:// |
- | libboost-serialization-dev libboost-thread-dev libgeotiff-dev libfimex-dev libmysqlclient-dev libpqxx-dev \ | + | git clone https:// |
- | libomniorb4-dev omniidl4 libldap2-dev liblog4cpp5-dev libcurl4-gnutls-dev | + | git clone https:// |
+ | git clone https:// | ||
+ | git clone https:// | ||
+ | git clone https:// | ||
</ | </ | ||
- | == Diana == | + | **Diana:** |
+ | < | ||
+ | git clone https:// | ||
+ | </ | ||
- | * '' | + | ===== Fimex ===== |
- | * '' | + | |
- | * libxt-dev | + | ==== Ubuntu 12.04 (Precise) ==== |
+ | |||
+ | Install the dependencies using the following command: | ||
+ | |||
+ | < | ||
+ | sudo apt-get install libxml2-dev libproj-dev libudunits2-dev \ | ||
+ | libnetcdf-dev libgrib-api-dev libjasper-dev libpng12-dev \ | ||
+ | libjpeg-dev libpq-dev liblog4cpp5-dev \ | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ==== Fedora 20 ==== | ||
+ | |||
+ | Install the dependencies using the following command: | ||
+ | |||
+ | < | ||
+ | sudo yum install boost-devel libxml2-devel udunits2-devel \ | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ===== Metlibs ===== | ||
+ | |||
+ | Next, you will need to install various third-party libraries that Metlibs and Diana depend on: | ||
+ | |||
+ | ==== Ubuntu 12.04 (Precise) ==== | ||
**Without optional libraries: | **Without optional libraries: | ||
< | < | ||
- | sudo apt-get install | + | sudo apt-get install |
+ | | ||
+ | | ||
</ | </ | ||
**With optional libraries: | **With optional libraries: | ||
< | < | ||
- | sudo apt-get install | + | sudo apt-get install |
+ | | ||
+ | | ||
+ | | ||
</ | </ | ||
- | For observation buffer support in Diana: | + | ==== Fedora 20 ==== |
- | * '' | + | |
- | For GRIB support in Metlibs and Diana: | + | < |
- | * '' | + | sudo yum install |
+ | | ||
+ | </code> | ||
- | For fimex support in Metlibs and Diana: | + | ===== Diana ===== |
- | * '' | + | |
- | Except | + | Diana can be configured to be used for creating animations. If this is desired then libavformat and its development headers need to be installed. On Ubuntu 12.04, a package |
+ | ==== Ubuntu 12.04 (Precise) ==== | ||
- | ===== Installation ====== | + | < |
- | + | sudo apt-get install libemos-dev libgrib-api-dev libshp-dev libxt-dev | |
- | ==== Metlibs ==== | + | </ |
- | By default, all modules are enabled except for '' | + | ==== Fedora 20 ==== |
- | Unpack the metlibs archive and enter the directory containing the source files. | + | For observation buffer support in Diana, install EMOSLIB [[https:// |
- | If you have root privileges on your system, configure the library by running the | + | |
- | '' | + | |
< | < | ||
- | ./ | + | sudo yum install grib_api-devel shapelib-devel |
</ | </ | ||
- | Otherwise, to configure the library for installation in a directory where you | + | ===== Installing Fimex ===== |
- | have permission to write files, run the '' | + | |
- | way: | + | Enter the '' |
< | < | ||
- | ./ | + | ./configure |
</ | </ | ||
- | where, | + | If you want to install the library |
- | '' | + | option; for example, use the following command |
+ | |||
+ | < | ||
+ | ./configure --prefix=$HOME/ | ||
+ | </ | ||
Build and install the library with the following commands: | Build and install the library with the following commands: | ||
Line 122: | Line 147: | ||
You may need root privileges to install the library unless you specified a | You may need root privileges to install the library unless you specified a | ||
prefix in the configuration step. | prefix in the configuration step. | ||
- | ==== Diana ==== | + | ===== Installing Metlibs ====== |
- | By default, | + | Enter the subdirectories for each of the metlibs modules, configuring, |
- | Unpack the diana archive | + | < |
+ | #/bin/sh | ||
+ | |||
+ | set -e | ||
+ | |||
+ | THIS_DIR=`pwd` | ||
+ | # uncomment next line on Fedora | ||
+ | # | ||
+ | SUDO=sudo | ||
+ | |||
+ | for l in milogger puctools putools pudatatypes qutilities coserver; do | ||
+ | cd " | ||
+ | ./ | ||
+ | $SUDO make install | ||
+ | done | ||
+ | </ | ||
+ | |||
+ | ===== Installing Diana ===== | ||
+ | |||
+ | **Note:** By default, support for observation buffers is conditionally enabled | ||
+ | |||
+ | ==== Ubuntu 12.04 (Precise) ==== | ||
+ | |||
+ | Enter the '' | ||
< | < | ||
- | ./configure --enable-xlib --enable-obs-bufr --enable-profet --enable-proddb | + | ./ |
+ | ./configure --enable-xlib --enable-geotiff | ||
</ | </ | ||
- | Otherwise, to configure the library for installation in a directory where you have permission to write files, | + | To configure the library for installation in a directory where you have permission to write files (for example, $HOME/diana for a directory |
< | < | ||
- | ./configure --enable-xlib --enable-obs-bufr --enable-profet --enable-proddb | + | ./ |
+ | ./configure --enable-xlib --enable-geotiff | ||
</ | </ | ||
- | where, in this example, | + | ==== Fedora 20 ==== |
+ | |||
+ | Enter the '' | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | ./configure --enable-xlib --enable-geotiff --prefix=/ | ||
+ | --with-png-libdir=/ | ||
+ | </ | ||
+ | |||
+ | To configure the library for installation | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | ./configure --enable-xlib --enable-geotiff --prefix=$HOME/ | ||
+ | --with-png-libdir=/ | ||
+ | </ | ||
+ | |||
+ | ==== Building ==== | ||
Build and install the application with the following commands: | Build and install the application with the following commands: | ||
Line 147: | Line 215: | ||
</ | </ | ||
- | You may need root privileges to install the library | + | You may need root privileges to install the application |
+ | |||
+ | If you want to use the video export function, you have to install the '' | ||
+ | |||
+ | * Ubuntu/ | ||
+ | |||
+ | ===== Next Steps ===== | ||
+ | See the [[gettingstarted# |