[Pkg-octave-devel] Dynare: git, matlab, testsuite
Sébastien Villemot
sebastien.villemot at ens.fr
Mon May 25 13:51:52 UTC 2009
Rafael Laboissiere <rafael at debian.org> a écrit :
>> My understanding is that the most basic installation of Matlab, without
>> any toolbox, is able to compile MEX files. It relies on gcc.
>
> This is precisely my question: does it require more than just gcc, e.g. a
> library provided by Matlab? There is mex support in Octave and I am
> wondering whether we could generate the binaries entirely in Debian.
I think this is not possible because of linking problems.
In most of our MEX files we use Matlab MEX primitive functions (such
as mxCreateDoubleMatrix...) and BLAS and LAPACK functions.
For the MEX functions, we have no way of linking against the Matlab
library from pure Debian.
Moreover, at execution, Matlab modifies the path for the dynamic
loader (LD_LIBRARY_PATH env var). In particular, it provides its own
version of BLAS and LAPACK dynamic libraries, and of course those
differ from that of Debian.
And those dynamic libraries are not consistent across Matlab versions.
Up to 2007a, BLAS and LAPACK were in the same binary. They have been
separated since. This is the reason why in Dynare Windows package we
provide separate MEX binaries for older and newer versions of Matlab.
So my understanding is that compiling from pure Debian would be
possible if neither MEX functions nor BLAS/LAPACK functions were
called from the MEX file, but not otherwise.
--
Sébastien Villemot
More information about the Pkg-octave-devel
mailing list