Install problem w 32-bit matlab 64-bit *nix OS

I am back, because my preprocessor is failing undoubtedly due to build issues.

[quote=“SébastienVillemot”]Hi,

Your problem seems complicated, for two reasons: you’re using your own Octave build, and your MATLAB 32-bit doesn’t match your 64-bit arch.

I suggest the following:
[ul]
*] configure Dynare without specifying a PATH to matlab, or even with the “–disable-matlab” option. Then “make” and “make check”. You should get a fully working version of Dynare for Octave. If that fails, it is a problem with your Octave setup. Note that there is no “make install”: you run Dynare from the place where you unpacked the source archive
[/quote]

Ok I did this.

./configure
make
make check

Everything seems to be ok, except a test error due to my ATLAS install handled here.

[quote=“SébastienVillemot”]/*:m]
] then, compile the MEX files from the MATLAB prompt by running the “build_matlab.m” script under “mex/sources”/:m][/ul]
[/quote]

Ok so I go into mex/sources and after changing my matlab/bin/mexopts.sh to use gcc-4.2 and g+±4.2, I get the following errors

$ matlab -nodesktop

build_matlab

Delete old mex files.

Compiling mjdgges…
→ mexopts.sh sourced from directory (DIR = $MATLAB/bin)
FILE = /home/skipper/matlab/bin/mexopts.sh

→ MATLAB = /home/skipper/matlab
→ CC = gcc-4.2
→ CC flags:
CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread
CDEBUGFLAGS =
COPTIMFLAGS = -O3
CLIBS = -Wl,-rpath-link,/home/skipper/matlab/bin/glnxa64 -L/home/skipper/matlab/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
arguments = -DMATLAB_MEX_FILE -DMATLAB_VERSION=0x0708 -DMX_COMPAT_32
→ CXX = g+±4.2
→ CXX flags:
CXXFLAGS = -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
CXXDEBUGFLAGS =
CXXOPTIMFLAGS = -O3
CXXLIBS = -Wl,-rpath-link,/home/skipper/matlab/bin/glnxa64 -L/home/skipper/matlab/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMATLAB_MEX_FILE -DMATLAB_VERSION=0x0708 -DMX_COMPAT_32
→ FC = g95
→ FC flags:
FFLAGS = -fexceptions -fPIC -fno-omit-frame-pointer
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O
FLIBS = -Wl,-rpath-link,/home/skipper/matlab/bin/glnxa64 -L/home/skipper/matlab/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMATLAB_MEX_FILE -DMATLAB_VERSION=0x0708 -DMX_COMPAT_32
→ LD = gcc-4.2
→ Link flags:
LDFLAGS = -pthread -shared -Wl,–version-script,/home/skipper/matlab/extern/lib/glnxa64/mexFunction.map -Wl,–no-undefined
LDDEBUGFLAGS =
LDOPTIMFLAGS = -O3
LDEXTENSION = .mexa64
arguments = -lmwlapack
→ LDCXX =
→ Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments = -lmwlapack

→ gcc-4.2 -c -I. -I/home/skipper/matlab/extern/include -I/home/skipper/matlab/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMATLAB_MEX_FILE -DMATLAB_VERSION=0x0708 -DMX_COMPAT_32 -O3 “mjdgges/mjdgges.c” -o …/matlab/mjdgges.o

→ gcc-4.2 -O3 -pthread -shared -Wl,–version-script,/home/skipper/matlab/extern/lib/glnxa64/mexFunction.map -Wl,–no-undefined -o “…/matlab/mjdgges.mexa64” …/matlab/mjdgges.o -lmwlapack -Wl,-rpath-link,/home/skipper/matlab/bin/glnxa64 -L/home/skipper/matlab/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++

/usr/bin/ld: cannot find -lmwlapack
collect2: ld returned 1 exit status

mex: link of ' "../matlab/mjdgges.mexa64"' failed.

??? Error using ==> mex at 218
Unable to complete successfully.

Error in ==> build_matlab at 94
eval( COMPILE_COMMAND ’ -I. mjdgges/mjdgges.c ’ LAPACK_PATH ]);

Two things that I notice.

One, I do not have a matlab/bin/glnxa64 but I am used to this with the 32-bit matlab so I make a symlink there from glnxa64 to glnx86 and it still is the same output.

Two, I don’t have this lmwlapack, lmwblas, but I do have a system-wide liblapack.so can I just use this? If so, how do I point to /usr/lib/liblapack.so etc.

Thanks!

Skipper