Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
diana:autotools [2011-10-04 08:30:11] davidb Added commands to install the required packages for convenience. |
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 |
+ | | ||
+ | | ||
</ | </ | ||
+ | |||
+ | ===== Obtaining the source code ===== | ||
+ | |||
+ | Obtain the latest source code from the source code repositories. Currently, fimex, metlibs and Diana are held in git repositories: | ||
+ | |||
+ | **fimex:** | ||
+ | < | ||
+ | git clone https:// | ||
+ | </ | ||
+ | |||
+ | **metlibs: | ||
+ | < | ||
+ | git clone https:// | ||
+ | git clone https:// | ||
+ | git clone https:// | ||
+ | git clone https:// | ||
+ | git clone https:// | ||
+ | git clone https:// | ||
+ | </ | ||
+ | |||
+ | **Diana:** | ||
+ | < | ||
+ | git clone https:// | ||
+ | </ | ||
+ | |||
+ | ===== Fimex ===== | ||
+ | |||
+ | ==== Ubuntu 12.04 (Precise) ==== | ||
+ | |||
+ | Install the dependencies using the following command: | ||
+ | |||
+ | < | ||
+ | sudo apt-get install libxml2-dev libproj-dev libudunits2-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: | Next, you will need to install various third-party libraries that Metlibs and Diana depend on: | ||
- | == Metlibs | + | ==== Ubuntu 12.04 (Precise) ==== |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
**Without optional libraries: | **Without optional libraries: | ||
< | < | ||
- | sudo apt-get install | + | sudo apt-get install ftgl-dev libhdf4g-dev libtiff4-dev libqt4-dev proj \ |
- | libboost-serialization-dev libboost-thread-dev libmysqlclient-dev liblog4cpp5-dev libcurl4-gnutls-dev | + | |
+ | libgeotiff-dev libboost-thread-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 libfimex-dev libmysqlclient-dev libpqxx-dev \ | + | libqt4-dev proj libmysqlclient-dev libpqxx-dev \ |
- | | + | |
+ | libcurl4-gnutls-dev libgeotiff-dev libboost-thread-dev | ||
</ | </ | ||
- | == Diana == | + | ==== Fedora 20 ==== |
- | * '' | + | < |
- | * '' | + | sudo yum install ftgl-devel libgeotiff-devel mesa-libGL-devel mesa-libGLU-devel \ |
- | * libxt-dev | + | qt-devel |
+ | </ | ||
+ | |||
+ | ===== Diana ===== | ||
+ | |||
+ | 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 exists for the optional EMOSLIB dependency, required to support viewing of observation files. However, it is not available for every distribution. | ||
+ | |||
+ | ==== Ubuntu 12.04 (Precise) ==== | ||
- | **Without optional libraries: | ||
< | < | ||
- | sudo apt-get install libshp-dev libxt-dev | + | sudo apt-get install |
</ | </ | ||
- | **With optional libraries:** | + | ==== Fedora 20 ==== |
+ | |||
+ | For observation buffer support in Diana, install EMOSLIB [[https:// | ||
< | < | ||
- | sudo apt-get | + | sudo yum install |
</ | </ | ||
- | For observation buffer support in Diana: | + | ===== Installing Fimex ===== |
- | * '' | + | |
- | For GRIB support in Metlibs and Diana: | + | Enter the '' |
- | * '' | + | |
- | For fimex support in Metlibs and Diana: | + | < |
- | * '' | + | ./configure |
+ | </code> | ||
- | Except | + | If you want to install the library in an alternative location, specify it using the < |
+ | option; | ||
+ | < | ||
+ | ./configure --prefix=$HOME/ | ||
+ | </ | ||
- | ===== Installation | + | 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 Metlibs | ||
+ | |||
+ | Enter the subdirectories for each of the metlibs modules, configuring, | ||
+ | |||
+ | < | ||
+ | #/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 and video export is enabled. To disable video support, append the < | ||
+ | |||
+ | ==== Ubuntu 12.04 (Precise) ==== | ||
+ | |||
+ | Enter the '' | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | ./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 < | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | ./configure --enable-xlib --enable-geotiff --prefix=$HOME/ | ||
+ | </ | ||
+ | |||
+ | ==== Fedora 20 ==== | ||
+ | |||
+ | Enter the '' | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | ./configure --enable-xlib --enable-geotiff --prefix=/ | ||
+ | --with-png-libdir=/ | ||
+ | </ | ||
+ | |||
+ | 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 < | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | ./configure --enable-xlib --enable-geotiff --prefix=$HOME/ | ||
+ | --with-png-libdir=/ | ||
+ | </ | ||
+ | |||
+ | ==== Building ==== | ||
+ | |||
+ | Build and install the application with the following commands: | ||
+ | |||
+ | < | ||
+ | make | ||
+ | make install | ||
+ | </ | ||
- | ==== Metlibs ==== | + | You may need root privileges to install the application unless you specified a prefix in the configuration step. |
- | By default, all modules are enabled except for '' | + | If you want to use the video export function, you have to install the '' |
- | ==== Diana ==== | + | * Ubuntu/ |
- | By default, support for '' | + | ===== Next Steps ===== |
+ | See the [[gettingstarted# |