Differences between revisions 6 and 7
Revision 6 as of 2009-09-18 17:14:28
Size: 6033
Comment:
Revision 7 as of 2009-09-21 12:22:57
Size: 7274
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma section-numbers on
Line 14: Line 16:
 * Windows, using [[http://www.mingw.org|MinGW]]
 * Windows, using [[http://www.cygwin.com|Cygwin]]
 * Windows 32-bit, using [[http://www.mingw.org|MinGW]]
 * Windows 32-bit, using [[http://www.cygwin.com|Cygwin]]

/!\ Here, when we refer to 32-bit or 64-bit, we refer to the type of MATLAB installation, not the type of Windows installation. It is perfectly possible to run a 32-bit MATLAB on a 64-bit Windows: in that case, instructions for Windows 32-bit should be followed. To determine the type of your MATLAB installation, type: {{{
>> computer
}}} at the MATLAB prompt: if it returns {{{PCWIN}}}, then you have a 32-bit MATLAB; if it returns {{{PCWIN64}}}, then you have a 64-bit MATLAB.
Line 118: Line 124:

= Windows 32-bit, using Cygwin =

First, you need to setup a Cygwin environment, following the instructions at [[http://www.cygwin.com]].

Then, install the following packages:
 * {{{make}}}
 * {{{gcc}}}, {{{gcc-g++}}} and {{{gcc-g77}}}
 * {{{gcc-mingw}}}, {{{gcc-mingw-g++}}} and {{{gcc-mingw-g77}}}
 * {{{bison}}}
 * {{{flex}}}
 * {{{autoconf}}} and {{{autoconf2.5}}}
 * {{{automake}}} and {{{automake1.11}}}
 * {{{octave}}} and {{{octave-devel}}} (will install BLAS and LAPACK)
 * {{{tetex}}} and {{{tetex-extra}}}
 * {{{libxslt}}} (for xsltproc)
 * {{{docbook-xsl}}}
 * {{{doxygen}}}

/!\ If you want to use the graphics capabilities of Octave, note that you must install an X11 server.

This page explains how to build from source:

  • Dynare (unstable version), including preprocessor and MEX files for MATLAB and Octave
  • Dynare++
  • all the associated documentation (PDF and HTML) from source

This source can be retrieved in two forms:

Note that if you use the SVN version, you will need to install more tools (see below).

The first section of this page gives general instructions, which apply to all platforms. Then some specific platforms are discussed:

  • Linux (Debian or Ubuntu)
  • Windows 32-bit, using MinGW

  • Windows 32-bit, using Cygwin

/!\ Here, when we refer to 32-bit or 64-bit, we refer to the type of MATLAB installation, not the type of Windows installation. It is perfectly possible to run a 32-bit MATLAB on a 64-bit Windows: in that case, instructions for Windows 32-bit should be followed. To determine the type of your MATLAB installation, type:

>> computer

at the MATLAB prompt: if it returns PCWIN, then you have a 32-bit MATLAB; if it returns PCWIN64, then you have a 64-bit MATLAB.

For Windows users, there is no pareto-optimum between MinGW and Cygwin, it depends on what you want to do:

  • MinGW is simpler to setup if you just want to quickly compile the binaries,
  • Cygwin is recommended for those who update through SVN, or who want to build documentation.

1. General instructions

1.1. Prerequisites

A number of tools and libraries are needed in order to recompile everything. You don't necessarily need to install everything, depending on what you want to compile.

  • A POSIX compliant shell and an implementation of Make (mandatory)
  • The GNU Compiler Collection (GCC) (mandatory)

  • MATLAB (if you want to compile MEX for MATLAB)

  • GNU Octave, with the development headers (if you want to compile MEX for Octave)

  • Boost libraries, version 1.34 or later. Actually only the Graph library is needed. (mandatory)

  • Bison, version 2.3 or later (only if you get the source through SVN)

  • Flex, version 2.5.4 or later (only if you get the source through SVN)

  • Autoconf, version 2.61 or later (only if you get the source through SVN)

  • Automake (only if you get the source through SVN)

  • CWEB, with its tools ctangle and cweave (only if you want to build Dynare++ and get the source through SVN)

  • An implementation of BLAS and LAPACK: either ATLAS, Netlib (BLAS, LAPACK) or MKL (only if you want to build Dynare++)

  • An implementation of POSIX Threads (only if you want to build Dynare++)

  • A decent LaTeX distribution (if you want to compile PDF documentation). The following extra components may be needed:
    • The Econometrica bibliography style: you need harvard and economic packages from CTAN (only if you want to build Dynare user guide)

    • Eplain TeX macros (only if you want to build Dynare++ source documentation)

    • Beamer (for some PDF presentations)

  • DBLaTeX (if you want to build Dynare reference manual in PDF)

  • xsltproc and DocBook XSL Stylesheets (if you want to build Dynare reference manual in HTML)

  • Doxygen (if you want to build Dynare preprocessor source documentation)

1.2. Preparing the sources

If you have downloaded the sources from an official source archive or the snapshot, just unpack it.

/!\ If you are using the snapshot, since it contains a build tree for Windows, you first need to clean it with:

make clean

If you want to use SVN, do the following from a terminal:

svn checkout https://www.dynare.org/svn/dynare/trunk dynare
cd dynare
autoreconf -s -i

The last line runs Autoconf and Automake in order to prepare the build environment (this is not necessary if you got the sources from an official source archive or the snapshot).

1.3. Configuring the build tree

You just launch the configure script from a terminal:

./configure

If you have MATLAB, you need to indicate both MATLAB location and MATLAB version. For example, on Linux:

./configure --with-matlab=/usr/local/matlab78 MATLAB_VERSION=7.8

Note that MATLAB version can also specified via the MATLAB family product release (R2009a, R2008b, ...).

You may need to specify additional options to the configure script, see the platform specific instructions below.

If the configuration goes well, the script will tell you which components are correctly configured and will be built.

1.4. Building

Binaries are built with:

make

PDF and HTML documentation are respectively built with:

make pdf
make html

The testsuites can be run with:

make check

2. Debian or Ubuntu

All the prerequisites are packaged. If you want to build everything, install the following packages:

  • build-essential (for gcc, g++ and make)

  • octave3.2-headers or octave3.0-headers (will install ATLAS)

  • libboost-graph1.40-dev, libboost-graph1.39-dev, libboost-graph1.38-dev, libboost-graph1.37-dev, libboost-graph1.35-dev or libboost-graph-dev

  • flex

  • bison

  • autoconf

  • automake

  • texlive

  • texlive-publishers (for Econometrica bibliographic style)

  • texlive-extra-utils (for CWEB)

  • texlive-formats-extra (for Eplain)

  • latex-beamer

  • dblatex

  • xsltproc

  • docbook-xsl

  • doxygen

3. Windows 32-bit, using Cygwin

First, you need to setup a Cygwin environment, following the instructions at http://www.cygwin.com.

Then, install the following packages:

  • make

  • gcc, gcc-g++ and gcc-g77

  • gcc-mingw, gcc-mingw-g++ and gcc-mingw-g77

  • bison

  • flex

  • autoconf and autoconf2.5

  • automake and automake1.11

  • octave and octave-devel (will install BLAS and LAPACK)

  • tetex and tetex-extra

  • libxslt (for xsltproc)

  • docbook-xsl

  • doxygen

/!\ If you want to use the graphics capabilities of Octave, note that you must install an X11 server.

DynareWiki: BuildingDynareFromSource (last edited 2013-06-19 16:52:12 by HoutanBastani)