Page 1 of 2

Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Sat Nov 26, 2016 11:43 pm
by lombard
Hi,
I've tried to install Dynare from repository in Ubuntu 16.04 LTS, as well as compiling it, but I always get this error message
error: unknown type name ‘char16_t’
typedef char16_t mxChar;


I'm using Matlab 2010a. In the past I've never faced this problem (I think).

I've tried also with Fedora 25, with similar results.

Does anybody know a solution?

Thanks

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Sun Nov 27, 2016 9:29 am
by jpfeifer
Hi, where exactly does this error appear? To check the status of the problem, see https://github.com/DynareTeam/dynare/issues/1344

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Sun Nov 27, 2016 4:38 pm
by MichelJuillard
Hi Gianni,

can you tell us what is the version of your compiler:

gcc --version

We don't have access to Ubuntu machines and can't test it directly.

Best,

Michel

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Sun Nov 27, 2016 5:38 pm
by lombard
Hi Michel,
Good to hear from you, and thanks for picking up this help message.
I encountered the same problem in Fedora.
... meanwhile I managed to fix it at least under Ubuntu. The fix consists of replacing the Matlab headers (in external/include) of Matlab 2010, with newer versions.
Then the Ubuntu binary (.deb) worked out of the box.

I'm now giving a try with Fedora. You will hear from me if it doesn't work 8)
Best,
Gianni

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Sun Nov 27, 2016 7:44 pm
by lombard
Hi, and here I'm again.
Compiling from source is not as easy (as it used to be)
Here is what I get when I run dynare after compilation

[mex] Generalized QZ.
[m] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[m] Local state space iteration (second order).
[mex] Bytecode evaluation.
[no] k-order perturbation solver.
[no] k-order solution simulation.
[no] Quasi Monte-Carlo sequence (Sobol).
[no] Markov Switching SBVAR.

Using 64-bit preprocessor
"/home/gianni/gitdynare/dynare/matlab/preprocessor64/dynare_m" bkk.mod: Aborted
Starting Dynare (version 4.5-unstable).
Starting preprocessing of the model file ...
Substitution of endo leads >= 2: added 9 auxiliary variables and equations.
Substitution of endo lags >= 2: added 10 auxiliary variables and equations.
Found 42 equation(s).
Evaluating expressions...done
terminate called after throwing an instance of 'SymbolTable::SearchFailedException'


Note that a number of mex were not compiled and it failed to compile dynare++ as well

Configuration went through ok. The only missing package, I guess, is slicot, which I couldn't find anywhere for fedora (.rpm)

Best

Gianni

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Sun Nov 27, 2016 7:47 pm
by lombard
And I'm using
g++ --version
g++ (GCC) 6.2.1 20160916 (Red Hat 6.2.1-2)

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Mon Nov 28, 2016 12:58 pm
by jpfeifer
Hi,
1. Are all the required packages mentioned at https://github.com/DynareTeam/dynare installed?
2. What exact command did you use for
Code: Select all
./configure
, i.e. which options did you invoke?
3. Could you please provide the output from the configure and make commands.

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Mon Nov 28, 2016 3:26 pm
by lombard
Hi,
Thanks!
I'm calling with
./configure --with-matio=/usr/lib/ --with-matlab=/opt/matlab10/ MATLAB_VERSION=10.1


I have all the packages up to slicot (I've just got the scripts from SLICOT but not compiled yet)

the output of config attached in the text file

Gianni

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Mon Nov 28, 2016 3:58 pm
by jpfeifer
The config-file looks good. You don't necessarily need SLICOT, only for the steady state Kalman filter. What is puzzling is that many mex-files that should be compiled were not created, like e.g.
Code: Select all
k-order perturbation solver

When you run
Code: Select all
make all
, are there any error messages related to these files?

P.S: I am not sure it makes a difference, but your Matlab version cannot be 10.1. Releaste 2016b has version number 9.1.

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Tue Nov 29, 2016 9:19 am
by lombard
Hi,
Thanks. The version was a typo (10.1 for 2010a).
I've now upgraded to 2015a. Things work up to a point: same missing mex functions
[mex] Generalized QZ.
[m] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[m] Local state space iteration (second order).
[mex] Bytecode evaluation.
[no] k-order perturbation solver.
[no] k-order solution simulation.
[no] Quasi Monte-Carlo sequence (Sobol).
[no] Markov Switching SBVAR.

The error message is indeed related to dynare++, I think
make[2]: Entering directory '/home/gianni/gitdynare/dynare/mex/build/matlab/libdynare++'
make[2]: *** No rule to make target '../../../../dynare++/kord/faa_di_bruno.cpp', needed by 'libdynare___a-faa_di_bruno.o'. Stop.
make[2]: Leaving directory '/home/gianni/gitdynare/dynare/mex/build/matlab/libdynare++'
Makefile:408: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/gianni/gitdynare/dynare/mex/build/matlab'
Makefile:425: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Tue Nov 29, 2016 10:21 am
by lombard
Hi,
The problem was with Dynare from git. I've downloaded the zip file with the scripts directly (not through git as described in the instructions) and everything works fine.
Thanks
Gianni

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Tue Nov 29, 2016 10:22 am
by HoutanBastani
Hi,

In the root Dynare directory, please type:
Code: Select all
$ make distclean
$ autoreconf -si
$ ./configure <<with your options>>
$ make


Please post all of the output of each of these commands.

Check error

PostPosted: Wed Apr 05, 2017 1:07 pm
by lombard
Hi,
I've recently upgraded to master-2017-03-16-1022e67 (Matlab 2016b on Fedora 24 )
and got this error
Function 'subsindex' is not defined for values of class 'struct'.
Error in GB_subsidy (line 1102)
oo_.dr.eigval = check(M_,options_,oo_);
Error in dynare (line 223)



Dynare works fine if I comment out "check;" in the mod file.

Best,
Gianni

Re: Compiling Dynare error: unknown type name ‘char16_t’

PostPosted: Wed Apr 05, 2017 3:52 pm
by jpfeifer
Hi Gianni,
what is line 1102 of GB_subsidy.m where the error appears?

Error with Check in Dynare unstable

PostPosted: Thu Apr 06, 2017 9:43 am
by lombard
Hi Johannes,
it's
oo_.dr.eigval = check(M_,options_,oo_);


Are the inputs in check still expected to be structures in the new unstable Dynare?

Gianni
PS: sorry for the subject of the thread. I've changed it. I don't know why the old one was sticky.