Hi I'm having problems compiling some files (mex files for matlab).
In the makefile they use "uname -m" to determine the HARDWARE and do not give an option for my output (i686), The nearest option is (i386)
PHP Code:
HARDWARE = $(shell uname -m)
ifeq (i386,$(HARDWARE))
SUF = mexglx
CC = gcc
CFLAGS = -O3 -funroll-loops -fPIC -fexceptions
MEXOPTS = COPTIMFLAGS='-O3 -funroll-loops -fexceptions'
endif
The variables SUF and CC look appropriate, I have no idea about CFLAGS and MEXOPTS but I tried just substituting i386 for i686 instead and ran make...
PHP Code:
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
I understand that this mex function cannot be found, albeit that grepping the c files indicates multiple files with the line
PHP Code:
#include "mex.h"
When I run 'make -d && make install' in debug mode I get the following as the last few lines of output.
PHP Code:
Trying pattern rule with stem `spm_mapping'.
Rejecting impossible implicit prerequisite `spm_mapping.w'.
No implicit rule found for `spm_mapping.c'.
Finished prerequisites of target file `spm_mapping.c'.
No need to remake target `spm_mapping.c'.
Considering target file `spm_mapping.h'.
Looking for an implicit rule for `spm_mapping.h'.
Trying pattern rule with stem `spm_mapping.h'.
Trying implicit prerequisite `spm_mapping.h,v'.
Trying pattern rule with stem `spm_mapping.h'.
Trying implicit prerequisite `RCS/spm_mapping.h,v'.
Trying pattern rule with stem `spm_mapping.h'.
Trying implicit prerequisite `RCS/spm_mapping.h'.
Trying pattern rule with stem `spm_mapping.h'.
Trying implicit prerequisite `s.spm_mapping.h'.
Trying pattern rule with stem `spm_mapping.h'.
Trying implicit prerequisite `SCCS/s.spm_mapping.h'.
No implicit rule found for `spm_mapping.h'.
Finished prerequisites of target file `spm_mapping.h'.
No need to remake target `spm_mapping.h'.
Pruning file `spm_vol_access.h'.
Pruning file `spm_datatypes.h'.
Finished prerequisites of target file `spm_mapping.mexglx.o'.
Must remake target `spm_mapping.mexglx.o'.
mex COPTIMFLAGS='-O3 -funroll-loops -fexceptions' -c spm_mapping.c
make: mex: Command not found
Putting child 0x0808a070 (spm_mapping.mexglx.o) PID 11002 on the chain.
Live child 0x0808a070 (spm_mapping.mexglx.o) PID 11002
Reaping losing child 0x0808a070 PID 11002
make: *** [spm_mapping.mexglx.o] Error 127
Removing child 0x0808a070 PID 11002 from chain.
am0032@linux-vvi7:~/spm5/src>
Does any kind soul have an idea what is going wrong? I am sure the source files are fine so I am just being a newbie-muppet.
Zest