Help needed with Dynare-Maltab 4.4.1 Install on Ubuntu 14.04

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.

Help needed with Dynare-Maltab 4.4.1 Install on Ubuntu 14.04

Postby gazia21 » Thu Jan 08, 2015 11:18 pm

Hi,

I am trying to install 'dynare-matlab' on Ubuntu 14.04 but I am getting the following error message:

Code: Select all
Building Matlab extensions (logfile at /tmp/dynare-matlab-mexbuild-1420758439.EWAvdAo)
<command-line>:0:16: error: invalid suffix "x" on integer constant
../../../sources/dynmex.h:30:33: note: in expansion of macro ‘MATLAB_VERSION’
 #if defined(MATLAB_MEX_FILE) && MATLAB_VERSION < 0x0703
                                 ^
In file included from ../../../sources/mjdgges/mjdgges.c:23:0:
../../../sources/dynmex.h:31:13: error: conflicting types for ‘mwIndex’
 typedef int mwIndex;
             ^
In file included from /usr/local/MATLAB/R2014b/extern/include/matrix.h:25:0,
                 from /usr/local/MATLAB/R2014b/extern/include/mex.h:57,
                 from ../../../sources/dynmex.h:27,
                 from ../../../sources/mjdgges/mjdgges.c:23:
/usr/local/MATLAB/R2014b/extern/include/tmwtypes.h:796:19: note: previous declaration of ‘mwIndex’ was here
 typedef size_t    mwIndex;        /* unsigned pointer-width integer */
                   ^
In file included from ../../../sources/mjdgges/mjdgges.c:23:0:
../../../sources/dynmex.h:32:13: error: conflicting types for ‘mwSize’
 typedef int mwSize;
             ^
In file included from /usr/local/MATLAB/R2014b/extern/include/matrix.h:25:0,
                 from /usr/local/MATLAB/R2014b/extern/include/mex.h:57,
                 from ../../../sources/dynmex.h:27,
                 from ../../../sources/mjdgges/mjdgges.c:23:
/usr/local/MATLAB/R2014b/extern/include/tmwtypes.h:795:19: note: previous declaration of ‘mwSize’ was here
 typedef size_t    mwSize;         /* unsigned pointer-width integer */
                   ^
<command-line>:0:16: error: invalid suffix "x" on integer constant
../../../sources/dynlapack.h:33:33: note: in expansion of macro ‘MATLAB_VERSION’
 #if defined(MATLAB_MEX_FILE) && MATLAB_VERSION >= 0x0708
                                 ^
make[1]: *** [mjdgges.o] Error 1
make: *** [all-recursive] Error 1
dpkg: error processing package dynare-matlab (--configure):
 subprocess installed post-installation script returned error exit status 2
Processing triggers for libc-bin (2.19-0ubuntu6.4) ...
Errors were encountered while processing:
 dynare-matlab
E: Sub-process /usr/bin/dpkg returned an error code (1)



The following the log from \tmp\ file:

Code: Select all
debian-matlab-mexhelper 0.0.18

Copyright (C) 2010-2011 Michael Hanke <michael.hanke@gmail.com>

Licensed under GNU Public License version 3 or later.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Written by Michael Hanke.

Attempt to build Matlab extensions

Package name:        dynare-matlab
Source directory:    /usr/src/matlab/dynare-matlab
MEX dir:             /usr/lib/matlab/site/dynare-matlab
M dir:               /usr/share/matlab/site/m/dynare-matlab
Build user (if any):
Build command:       cd mex/build/matlab && ./configure --with-matlab=$(dirname $(dirname $(readlink -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | grep -A2 "ans ="|tail -1| cut -d "." -f 1,2) && make
Install command:     mkdir -p /usr/lib/dynare/mex/matlab && install -m644 /usr/src/matlab/dynare-matlab/mex/matlab/* /usr/lib/dynare/mex/matlab
Clean command:       cd mex/build/matlab && make distclean && rmdir /usr/src/matlab/dynare-matlab/mex/matlab

Attempt to build Matlab extensions:
cd mex/build/matlab && ./configure --with-matlab=$(dirname $(dirname $(readlink -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | grep -A2 "ans ="|tail -1| cut -d "." -f 1,2) && make
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for MATLAB prefix... /usr/local/MATLAB/R2014b
checking whether to enable MATLAB support... yes
checking for MATLAB version... >>
checking for MEX-file suffix... mexa64
setting MEX-file suffix to .mexa64
checking for MATLAB machine architecture... glnxa64
checking for a sed that does not truncate output... /bin/sed
checking for options to compile MEX for MATLAB... ok
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 whether gcc understands -c and -o together... yes
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 ar... ar
checking the archiver (ar) interface... ar
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 dlopen in -ldl... yes
checking how to run the C preprocessor... gcc -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 gsl/gsl_cdf.h usability... no
checking gsl/gsl_cdf.h presence... no
checking for gsl/gsl_cdf.h... no
checking for cos in -lm... yes
checking for cblas_dgemm in -lgslcblas... no
checking for gsl_cdf_ugaussian_P in -lgsl... no
checking for compress in -lz... yes
checking matio.h usability... yes
checking matio.h presence... yes
checking for matio.h... yes
checking for Mat_Open in -lmatio... yes
checking how to get verbose linking output from gfortran... -v
checking for Fortran 77 libraries of gfortran...  -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -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 sb02od_ in -lslicot_pic... no
configure:

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

Binaries (with "make"):
 MEX files for MATLAB (except those listed below):                   yes
 k-order and dynare_simul MEX files for MATLAB:                      yes
 MS-SBVAR MEX files for MATLAB:                                      no (missing GSL)
 Kalman Steady State MEX file for MATLAB:                            no (missing SLICOT)
M2HTML documentation:                                               no


checking that generated files are newer than configure... done
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 kalman_steady_state/Makefile
config.status: creating ms_sbvar/Makefile
config.status: creating block_kalman_filter/Makefile
config.status: creating sobol/Makefile
config.status: creating local_state_space_iterations/Makefile
config.status: executing depfiles commands
Making all in mjdgges
make[1]: Entering directory `/usr/src/matlab/dynare-matlab/mex/build/matlab/mjdgges'
gcc -DPACKAGE_NAME=\"dynare\" -DPACKAGE_TARNAME=\"dynare\" -DPACKAGE_VERSION=\"4.4.1\" -DPACKAGE_STRING=\"dynare\ 4.4.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"dynare\" -DVERSION=\"4.4.1\" -DHAVE_MATLAB=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBM=1 -DHAVE_LIBZ=1 -D_GNU_SOURCE -DNDEBUG -DMATLAB_VERSION=0x -DMATLAB_MEX_FILE -DMEXEXT=\".mexa64\" -I.  -I/usr/local/MATLAB/R2014b/extern/include -I../../../sources   -fexceptions -fPIC -pthread -g -O2 -fno-omit-frame-pointer -Wall -Wno-parentheses -MT mjdgges.o -MD -MP -MF .deps/mjdgges.Tpo -c -o mjdgges.o `test -f '../../../sources/mjdgges/mjdgges.c' || echo './'`../../../sources/mjdgges/mjdgges.c
make[1]: Leaving directory `/usr/src/matlab/dynare-matlab/mex/build/matlab/mjdgges'


Dynare is working fine with Octave but I am facing trouble with the Matlab installation on Ubuntu 14.04

PS : My Matlab is installed under /usr/local/MATLAB/2014b/
gazia21
 
Posts: 2
Joined: Thu Jan 08, 2015 11:08 pm

Re: Help needed with Dynare-Maltab 4.4.1 Install on Ubuntu 1

Postby SébastienVillemot » Mon Jan 12, 2015 11:25 am

I think that something is wrong with your MATLAB installation.

Can you please give me the output of the "version" command run from the MATLAB prompt?

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: Help needed with Dynare-Maltab 4.4.1 Install on Ubuntu 1

Postby gazia21 » Tue Jan 13, 2015 2:17 am

Hi Sebastien :

This is the output :

Code: Select all
>> version
ans =
8.4.0.150421 (R2014b)
gazia21
 
Posts: 2
Joined: Thu Jan 08, 2015 11:08 pm

Re: Help needed with Dynare-Maltab 4.4.1 Install on Ubuntu 1

Postby SébastienVillemot » Tue Jan 13, 2015 9:37 am

Is your MATLAB licence limited to only one user of your Ubuntu system? In that case, you should run "sudo dpkg-reconfigure matlab-support", and make sure that the right username is given in the question titled "Authorized user for MATLAB".
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Help needed with Dynare-Maltab 4.4.1 Install on Ubuntu 1

Postby victor302 » Wed Jan 14, 2015 12:46 pm

I had same trouble, but it dissapeared after symlinking the directory: /usr/lib/jvm/default-java --> /usr/lib/jvm/java-8-oracle.
victor302
 
Posts: 1
Joined: Wed Jan 14, 2015 12:39 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests