Compiling matlab mex files using make on SUSE 11.

Hiya,

I recently moved on from my comfy SUSE10.3 to SUSE 11.1, I use toolboxes (SPM) which require mex files on matlab and none of them work. >:(

I believe this is most likely due to the glibc version changing. Any other possibilities? :\

I have the binaries and a Makefile, the makefile doesn’t recognize my hardware.


    HARDWARE  = $(shell uname -m)
    ifeq (i386,$(HARDWARE))
      SUF     = mexglx
      CC      = gcc
      CFLAGS  = -O3 -funroll-loops -fPIC -fexceptions
      MEXOPTS = COPTIMFLAGS='-O3 -funroll-loops -fexceptions'
    endif

as my hardware is i686.

I have just changed the i386 to i686 above as I don’t think it makes any major difference. Am I right? :?

The makefile now runs…

am0032@linux-vvi7:~/spm5/src> make && make install
_____________________________________________________________

        Linux compilation (x86-32) - using gcc
_____________________________________________________________

gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_uchar.mexglx.o spm_vol_utils.c -DSPM_UNSIGNED_CHAR
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_short.mexglx.o spm_vol_utils.c -DSPM_SIGNED_SHORT
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_int.mexglx.o spm_vol_utils.c -DSPM_SIGNED_INT
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_schar.mexglx.o spm_vol_utils.c -DSPM_SIGNED_CHAR
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_ushort.mexglx.o spm_vol_utils.c -DSPM_UNSIGNED_SHORT
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_uint.mexglx.o spm_vol_utils.c -DSPM_UNSIGNED_INT
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_float.mexglx.o spm_vol_utils.c -DSPM_FLOAT
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_double.mexglx.o spm_vol_utils.c -DSPM_DOUBLE
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_short_s.mexglx.o spm_vol_utils.c -DSPM_SIGNED_SHORT -DSPM_BYTESWAP
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_int_s.mexglx.o spm_vol_utils.c -DSPM_SIGNED_INT -DSPM_BYTESWAP
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_ushort_s.mexglx.o spm_vol_utils.c -DSPM_UNSIGNED_SHORT -DSPM_BYTESWAP
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_uint_s.mexglx.o spm_vol_utils.c -DSPM_UNSIGNED_INT -DSPM_BYTESWAP
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_float_s.mexglx.o spm_vol_utils.c -DSPM_FLOAT -DSPM_BYTESWAP
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o utils_double_s.mexglx.o spm_vol_utils.c -DSPM_DOUBLE -DSPM_BYTESWAP
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o spm_make_lookup.mexglx.o spm_make_lookup.c
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o spm_getdata.mexglx.o spm_getdata.c
gcc -c -O3 -funroll-loops -fPIC -fexceptions -o spm_vol_access.mexglx.o spm_vol_access.c
mex COPTIMFLAGS='-O3 -funroll-loops -fexceptions' -c spm_mapping.c 
make: mex: Command not found
make: *** [spm_mapping.mexglx.o] Error 127

Searching out matlab links on this site I found a recent thread gcc, matlab and opensuse 11 - openSUSE Forums, which suggests that I may have to install a different version of gcc. Any guidance or suggestions prior to taking that particularly unpleasant path would be greatly appreciated.

Many thanks,

Adam