Compiling under GNU/Linux

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Compiling under GNU/Linux

Postby rasmus » Mon Jan 30, 2012 2:29 pm

Hi,
I am trying to install Dynare under Archlinux. So far I have been rather unsuccesful. I have never used Octave (Matlab) before and I am solely using it for Dynare.

When I do the configure, make, make install rota I only get the following file.
Code: Select all
$ pacman -Ql dynare
dynare /usr/
dynare /usr/bin/
dynare /usr/bin/dynare++
dynare /usr/lib/
dynare /usr/lib/matlab/
dynare /usr/lib/matlab/dynare_m
dynare /usr/share/
dynare /usr/share/info/
dynare /usr/share/info/dynare.info.gz


Peeking at the Ubuntu package it seems that I should also get some mex files, whatever they might be. In any case, adding the path /usr/lib/matlab to Octave yields no result. It does not recognize the command dynare.

In my installation script should I simply copy over the mex files from root of the src folder to my package?

I am wondering whether the distributed Octave I am using might miss something. When I run make check I often get the following error
Code: Select all
 MSG: dmperm: not available in this version of Octave


But it seems that when I enter Octave and enter dmperm it is well aware of dmperm. . .

Thanks,
Rasmus

Some more info:

Here is the full log from ./configure
Code: Select all
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ar... ar
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for flex... no
checking for lex... no
checking for bison... bison
checking for boostlib >= 1.36... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking boost/graph/adjacency_list.hpp usability... yes
checking boost/graph/adjacency_list.hpp presence... yes
checking for boost/graph/adjacency_list.hpp... yes
checking boost/algorithm/string/trim.hpp usability... yes
checking boost/algorithm/string/trim.hpp presence... yes
checking for boost/algorithm/string/trim.hpp... yes
checking boost/algorithm/string/split.hpp usability... yes
checking boost/algorithm/string/split.hpp presence... yes
checking for boost/algorithm/string/split.hpp... yes
checking boost/lexical_cast.hpp usability... yes
checking boost/lexical_cast.hpp presence... yes
checking for boost/lexical_cast.hpp... yes
checking for dlopen in -ldl... yes
checking for makeinfo... ${SHELL} /home/rasmus/build/dynare/src/dynare-4.2.4/missing --run makeinfo
checking for pdftex... pdftex
checking for pdfetex... pdfetex
checking for eplain... no
checking for pdflatex... pdflatex
checking for bibtex... bibtex
checking for texi2html... no
checking for latex2html... no
checking for econometrica BST... no
checking for usability of class beamer... yes
checking for doxygen... no
checking for octave... octave
checking for ctangle... ctangle
checking for cweave... cweave
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking how to get verbose linking output from gfortran... -v
checking for Fortran 77 libraries of gfortran...  -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../.. -lgfortran -lm -lquadmath
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking for sgemm_... no
checking for ATL_xerbla in -latlas... no
checking for sgemm_ in -lblas... yes
checking for dgemm_ in -ldgemm... no
checking for sgemm_ in -lmkl... no
checking for sgemm_... (cached) no
checking for sgemm_ in -lcxml... no
checking for sgemm_ in -ldxml... no
checking for sgemm_ in -lscs... no
checking for sgemm_ in -lcomplib.sgimath... no
checking for sgemm_ in -lblas... (cached) yes
checking for sgemm_ in -lessl... no
checking for sgemm_ in -lblas... (cached) yes
checking for cheev_... no
checking for cheev_ in -llapack... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for MATLAB prefix... not found
checking whether to enable MATLAB support... no
configure:

Dynare is now configured for building the following components...

Binaries (with "make"):
 Dynare preprocessor:                   yes
 Dynare++:                              yes

PDF documentation (with "make pdf"):
 Dynare reference manual:               yes
 Dynare user guide:                     no (missing one of: pdflatex, bibtex, econometrica BST)
 Dynare++ developer documentation:      no (missing one of: cweave, pdftex, eplain)
 Beamer presentations:                  yes
 Various other documents:               yes

HTML documentation (with "make html"):
 Dynare reference manual:               yes (but with ugly math formulas, missing texi2html or latex2html)
 Dynare preprocessor developer doc:     no (missing doxygen)
 Dynare internal doc:                   no (Org export not enabled)

Info documentation (with "make info"):  yes

Testsuites (run with "make check"):
 Dynare for Octave:                     yes
 Dynare++:                              yes

configure: creating ./config.status
config.status: creating Makefile
config.status: creating preprocessor/macro/Makefile
config.status: creating preprocessor/Makefile
config.status: creating doc/Makefile
config.status: creating doc/preprocessor/Makefile
config.status: creating doc/macroprocessor/Makefile
config.status: creating doc/userguide/Makefile
config.status: creating doc/parallel/Makefile
config.status: creating doc/internals/Makefile
config.status: creating tests/Makefile
config.status: creating matlab/dynare_version.m
config.status: creating windows/dynare-version.nsi
config.status: creating dynare++/Makefile
config.status: creating dynare++/parser/cc/Makefile
config.status: creating dynare++/sylv/Makefile
config.status: creating dynare++/sylv/cc/Makefile
config.status: creating dynare++/sylv/testing/Makefile
config.status: creating dynare++/tl/Makefile
config.status: creating dynare++/tl/cc/Makefile
config.status: creating dynare++/tl/testing/Makefile
config.status: creating dynare++/doc/Makefile
config.status: creating dynare++/utils/cc/Makefile
config.status: creating dynare++/integ/Makefile
config.status: creating dynare++/integ/cc/Makefile
config.status: creating dynare++/integ/src/Makefile
config.status: creating dynare++/integ/testing/Makefile
config.status: creating dynare++/kord/Makefile
config.status: creating dynare++/src/Makefile
config.status: creating mex/sources/Makefile
config.status: executing depfiles commands
=== configuring in mex/build/matlab (/home/rasmus/build/dynare/src/dynare-4.2.4/mex/build/matlab)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for MATLAB prefix... not found
checking whether to enable MATLAB support... no
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether the Fortran 77 compiler works... yes
checking for Fortran 77 compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for boostlib >= 1.36... yes
checking for dlopen in -ldl... yes
configure:

Dynare is now configured for building the following components...

Binaries (with "make"):
 MEX files for MATLAB:     no (missing MATLAB, or unknown version, or unknown architecture)
 M2HTML documentation:     no


configure: creating ./config.status
config.status: creating Makefile
config.status: creating mjdgges/Makefile
config.status: creating kronecker/Makefile
config.status: creating bytecode/Makefile
config.status: creating libdynare++/Makefile
config.status: creating gensylv/Makefile
config.status: creating k_order_perturbation/Makefile
config.status: creating dynare_simul_/Makefile
config.status: executing depfiles commands
=== configuring in mex/build/octave (/home/rasmus/build/dynare/src/dynare-4.2.4/mex/build/octave)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for mkoctfile... mkoctfile
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether the Fortran 77 compiler works... yes
checking for Fortran 77 compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether ln -s works... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for boostlib >= 1.36... yes
checking for dlopen in -ldl... yes
configure:

Dynare is now configured for building the following components...

Binaries (with "make"):
 MEX files for Octave:     yes


configure: creating ./config.status
config.status: creating Makefile
config.status: creating mjdgges/Makefile
config.status: creating kronecker/Makefile
config.status: creating bytecode/Makefile
config.status: creating libdynare++/Makefile
config.status: creating gensylv/Makefile
config.status: creating k_order_perturbation/Makefile
config.status: creating dynare_simul_/Makefile
config.status: creating qzcomplex/Makefile
config.status: creating ordschur/Makefile
config.status: executing depfiles commands


Here is my version of Octave
Code: Select all

pank:rasmus:[dynare-4.2.4] $ pacman -Qi octave
Name           : octave
Version        : 3.4.3-1
URL            : http://www.octave.org
Licenses       : GPL
Groups         : None
Provides       : None
Depends On     : fftw  pcre  curl  lapack  libx11  graphicsmagick  glpk  hdf5  gcc-libs  qhull
Optional Deps  : texinfo: for help-support in octave
                 gnuplot: alternative plotting
                 umfpack: LU decomposition of some large sparse matrices
                 fltk: alternative plotting
Required By    : dynare  octave-miscellaneous  octave-optim  octave-struct
Conflicts With : None
Replaces       : None
Installed Size : 50576,00 KiB
Packager       : Ronald van Haren <ronald@archlinux.org>
Architecture   : x86_64
Build Date     : 2011-10-27T13:01:33 BST
Install Date   : 2012-01-23T23:25:04 GMT
Install Reason : Explicitly installed
Install Script : Yes
Description    : A high-level language, primarily intended for numerical computations.
rasmus
 
Posts: 5
Joined: Mon Jan 30, 2012 2:09 pm

Re: Compiling under GNU/Linux

Postby rasmus » Mon Jan 30, 2012 3:18 pm

Okay, I now got it working. I had to 'install' files 'manually'. I.e. important files are not copied using the make install function in my case. I have no idea whether this is design, a PEBCAK error or me misreading the mans.

Here is a working installation instruction. Would you like me to upload it to the Arch user repository?
Code: Select all
pkgname=dynare
pkgver=4.2.4
_mpkgver=4.2
pkgrel=1
pkgdesc="A software platform for handling (economic) DSGE and OLG models."
arch=('any')
url="http://www.dynare.org/"
license=('GPL')
depends=('octave' 'boost' 'blas' 'gsl' 'libmatio')
makedepends=('gcc-fortran')
optdepends=('latex')
source=(http://www.dynare.org/download/${pkgname}-{$_mpkgver}/source/${pkgname}-${pkgver}.tar.gz)
md5sums=('b33b294aa58b2d9a82c3057130f171bc')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ./configure --prefix=/usr --libdir=/usr/lib/dynare  #  --enable-org-export --disable-matlab
  make
  make pdf
  make html
  make info
}

check() {
  cd "$srcdir/$pkgname-$pkgver"
 # make check
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make  DESTDIR="$pkgdir/" install
  mkdir -p $pkgdir/usr/lib/dynare/mex/octave
  for i in $srcdir/$pkgname-$pkgver/mex/octave/*.mex;
  do
    install -D -m 644  "$i" "$pkgdir/usr/lib/dynare/mex/octave/";
  done
  cp -r $srcdir/$pkgname-$pkgver/matlab/* $pkgdir/usr/lib/dynare/matlab

  install -D -m 644 "$srcdir/$pkgname-$pkgver/dynare.el" "$pkgdir/usr/share/emacs/site-lisp/dynare.el"
}
rasmus
 
Posts: 5
Joined: Mon Jan 30, 2012 2:09 pm

Re: Compiling under GNU/Linux

Postby SébastienVillemot » Wed Feb 01, 2012 11:21 am

Yes, this would be great to have Dynare in ArchLinux.

As a Debian Maintainer, I personally maintain the Dynare package in Debian (and therefore indirectly in Ubuntu). But I don't have the time and interest to do that for other GNU/Linux distributions. So I encourage you to do so for you favourite distribution.

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Compiling under GNU/Linux

Postby rasmus » Sat Feb 04, 2012 6:47 pm

Cool, I will upload it to AUR.

On a side note, I think the wiki should be corrected to state that when installing from source one needs to include the mentioned subdirs.

Even better, the make install script should install them. (The last comment may be ignorant; if that the case it reflects my lack of knowledge on the Dynare system at this moment in time :)

Cheers,
Rasmus
rasmus
 
Posts: 5
Joined: Mon Jan 30, 2012 2:09 pm

Re: Compiling under GNU/Linux

Postby rasmus » Sat Feb 04, 2012 6:59 pm

The build instruction is available here.

Sébastien, would you look through the depency listand check for any glairing missing depenencies?
Code: Select all
## required for running
depends=('octave' 'boost' 'blas' 'gsl' 'libmatio')
## required for building, but not for running
makedepends=('gcc-fortran')
## Not required
optdepends=('latex: manual etc.'
             'octave-optim: suggested extension'
        'epstools: for some export')
rasmus
 
Posts: 5
Joined: Mon Jan 30, 2012 2:09 pm

Re: Compiling under GNU/Linux

Postby SébastienVillemot » Mon Feb 06, 2012 11:50 am

Actually the GSL and libmatio are not needed for Dynare 4.2. They will only be needed in some future version of Dynare.

Concerning the update of the wiki page, please create an account on the wiki and I will give you the credentials to update the relevant page.

Thanks for your contribution
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Compiling under GNU/Linux

Postby rasmus » Thu Feb 09, 2012 7:35 pm

> please create an account on the wiki and I will give you the credentials to update the relevant page.

My username on wiki is Rasmus
rasmus
 
Posts: 5
Joined: Mon Jan 30, 2012 2:09 pm

Re: Compiling under GNU/Linux

Postby SébastienVillemot » Mon Feb 13, 2012 5:03 pm

Ok you should now be able to edit the wiki.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 5 guests