Problems with 4.5.4-1 on Ubuntu 18.04
Ubuntu 18.04 LTS has Dynare 4.5.4-1 in the repositories (funny enough Debian has newer packages but I can't install them because they require the newer dependencies as well). This version, however, is not playing nicely with Matlab 2018b and fails to configure everything. Dynare works through Matlab but every time I run apt upgrade
or apt install somepackagename
it tries to finish configuring and exits with the following error:
Setting up dynare-matlab (4.5.4-1) ...
Building Matlab extensions (logfile at /tmp/dynare-matlab-mexbuild-1542385181.sBPwNf2)
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: '9.5
Invalid configuration `'9.5': machine `'9.5' not recognized
configure: error: /bin/bash ./config.sub '9.5 failed
dpkg: error processing package dynare-matlab (--configure):
installed dynare-matlab package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
dynare-matlab
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried to tinker with the configure
file in /usr/src/matlab/dynare-matlab/mex/build/matlab
but to no avail.
If I run
cd /usr/src/matlab/dynare-matlab
cd mex/build/matlab && ./configure --with-matlab=$(dirname $(dirname $(readlink -f `which matlab`))) MATLAB_VERSION=9.5 && make
It performs many operations but fails with:
Making all in mjdgges
make[1]: Entering directory '/usr/src/matlab/dynare-matlab/mex/build/matlab/mjdgges'
gcc -fexceptions -fPIC -pthread -g -O2 -fno-omit-frame-pointer -Wall -Wno-parentheses -shared -Wl,--no-undefined -Wl,-rpath-link,/usr/local/MATLAB/R2018b/bin/glnxa64 -L/usr/local/MATLAB/R2018b/bin/glnxa64 -Wl,--version-script,/usr/local/MATLAB/R2018b/extern/lib/glnxa64/mexFunction.map -o mjdgges.mexa64 mjdgges.o -lmx -lmex -lmat -lm -lstdc++ -lmwlapack -lmwblas
mjdgges.o: In function `mexFunction':
/usr/src/matlab/dynare-matlab/mex/build/matlab/mjdgges/../../../sources/mjdgges/mjdgges.c:123: undefined reference to `mxGetPiIsDeprecated'
collect2: error: ld returned 1 exit status
Makefile:393: recipe for target 'mjdgges.mexa64' failed
make[1]: *** [mjdgges.mexa64] Error 1
make[1]: Leaving directory '/usr/src/matlab/dynare-matlab/mex/build/matlab/mjdgges'
Makefile:405: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1