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-26 13:36:20] davidb [Fedora] |
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 \ |
+ | | ||
+ | | ||
</ | </ | ||
- | ===== Prerequisites | + | ===== Obtaining the source code ===== |
- | ==== Ubuntu 12.04 (Precise) ==== | + | Obtain the latest source code from the source code repositories. Currently, fimex, metlibs and Diana are held in git repositories: |
- | 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 51: | 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 75: | 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 92: | Line 101: | ||
< | < | ||
- | sudo yum -y install | + | sudo yum install |
+ | | ||
</ | </ | ||
===== Diana ===== | ===== Diana ===== | ||
- | * '' | + | Diana can be configured to be used for creating animations. If this is desired then libavformat |
- | * '' | + | |
- | * libxt-dev | + | ==== 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: |
- | ==== Metlibs ==== | + | < |
+ | make | ||
+ | make install | ||
+ | </ | ||
+ | |||
+ | You may need root privileges to install the library unless you specified a | ||
+ | prefix in the configuration step. | ||
+ | ===== Installing | ||
- | Enter the subdirectories for each of the metlibs modules, configuring, | + | Enter the subdirectories for each of the metlibs modules, configuring, |
< | < | ||
Line 135: | Line 157: | ||
THIS_DIR=`pwd` | THIS_DIR=`pwd` | ||
+ | # uncomment next line on Fedora | ||
+ | # | ||
+ | SUDO=sudo | ||
- | cd $THIS_DIR/common/ | + | for l in milogger puctools putools pudatatypes qutilities coserver; do |
- | ./ | + | |
- | sudo make install | + | ./ |
+ | | ||
+ | done | ||
+ | </ | ||
- | cd $THIS_DIR/ | + | ===== Installing Diana ===== |
- | ./ | + | |
- | sudo make install | + | |
- | cd $THIS_DIR/ | + | **Note:** By default, support for observation buffers is conditionally enabled and video export is enabled. To disable video support, append the < |
- | ./autogen.sh && ./ | + | |
- | sudo make install | + | |
- | cd $THIS_DIR/ | + | ==== Ubuntu 12.04 (Precise) ==== |
- | ./autogen.sh && ./configure --prefix=/usr/local && make | + | |
- | sudo make install | + | |
- | cd $THIS_DIR/diana-support/ | + | Enter the '' |
- | ./autogen.sh && ./configure --prefix=/ | + | |
- | 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 | + | |
- | </ | + | |
- | + | ||
- | Otherwise, to configure the library | + | |
- | have permission to write files, run the '' | + | |
- | way: | + | |
< | < | ||
- | ./configure --enable-xfonts | + | ./ |
+ | ./configure --enable-xlib --enable-geotiff | ||
</ | </ | ||
- | where, in this example, | + | To configure the library for installation in a directory |
- | '' | + | |
- | + | ||
- | Build and install | + | |
< | < | ||
- | make | + | ./ |
- | make install | + | ./configure --enable-xlib --enable-geotiff --prefix=$HOME/ |
</ | </ | ||
- | You may need root privileges to install the library unless you specified a | + | ==== Fedora 20 ==== |
- | prefix in the configuration step. | + | |
- | ==== Diana ==== | + | |
- | + | ||
- | By default, support for '' | + | |
- | Unpack | + | Enter the '' |
< | < | ||
- | ./configure --enable-xlib --enable-geotiff | + | ./ |
+ | ./configure --enable-xlib --enable-geotiff | ||
+ | --with-png-libdir=/ | ||
</ | </ | ||
- | Otherwise, 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), | + | 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), |
< | < | ||
- | ./configure --enable-xlib --enable-geotiff --prefix=$HOME/ | + | ./ |
+ | ./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 226: | 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# |