Differences
This shows you the differences between two versions of the page.
diana:autotools [2016-09-26 13:24:14] alexanderb [Diana] drop libavformat |
diana:autotools [2022-05-31 09:29:31] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Building Metlibs and Diana with Autotools ====== | ||
- | **Warning: | ||
- | |||
- | 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 ===== | ||
- | |||
- | 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 Precise (12.04) install, you will first need to install build tools: | ||
- | |||
- | < | ||
- | sudo apt-get install build-essential autoconf automake libtool subversion \ | ||
- | | ||
- | </ | ||
- | |||
- | ==== Fedora 20 ==== | ||
- | |||
- | On Fedora 20, this command has been found to install a reasonable base set of tools: | ||
- | |||
- | < | ||
- | sudo yum install gcc-c++ make wget tar subversion autoconf automake \ | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | ===== 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: | ||
- | |||
- | ==== Ubuntu 12.04 (Precise) ==== | ||
- | |||
- | **Without optional libraries: | ||
- | < | ||
- | sudo apt-get install ftgl-dev libhdf4g-dev libtiff4-dev libqt4-dev proj \ | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | **With optional libraries: | ||
- | < | ||
- | sudo apt-get install ftgl-dev libhdf4g-dev libhdf5-serial-dev libtiff4-dev \ | ||
- | | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | ==== Fedora 20 ==== | ||
- | |||
- | < | ||
- | sudo yum install ftgl-devel libgeotiff-devel mesa-libGL-devel mesa-libGLU-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) ==== | ||
- | |||
- | < | ||
- | sudo apt-get install libemos-dev libgrib-api-dev libshp-dev libxt-dev | ||
- | </ | ||
- | |||
- | ==== Fedora 20 ==== | ||
- | |||
- | For observation buffer support in Diana, install EMOSLIB [[https:// | ||
- | |||
- | < | ||
- | sudo yum install grib_api-devel shapelib-devel | ||
- | </ | ||
- | |||
- | ===== Installing Fimex ===== | ||
- | |||
- | Enter the '' | ||
- | |||
- | < | ||
- | ./configure | ||
- | </ | ||
- | |||
- | 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: | ||
- | |||
- | < | ||
- | ./configure --prefix=$HOME/ | ||
- | </ | ||
- | |||
- | 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, | ||
- | |||
- | ==== Ubuntu 12.04 (Precise) ==== | ||
- | |||
- | < | ||
- | #/bin/sh | ||
- | |||
- | set -e | ||
- | |||
- | THIS_DIR=`pwd` | ||
- | |||
- | 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 | ||
- | </ | ||
- | |||
- | ==== Fedora 20 ==== | ||
- | |||
- | < | ||
- | #/bin/sh | ||
- | |||
- | set -e | ||
- | |||
- | THIS_DIR=`pwd` | ||
- | |||
- | 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 | ||
- | </ | ||
- | |||
- | |||
- | ===== 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 | ||
- | </ | ||
- | |||
- | You may need root privileges to install the application unless you specified a prefix in the configuration step. | ||
- | |||
- | ===== Next Steps ===== | ||
- | |||
- | See the [[gettingstarted# |