Dear Michael,
as Benjamin suggested, the compilation failed because development
headers and libraries are not installed on your system. The following
should get everything set up:
sudo apt-get install build-essential
SPM5 comes with MEX files for Linux compiled with MATLAB 6.5.1 (R13SP1)
(this is the oldest MATLAB version supported by SPM5) and these MEX
files are not compatible anymore with MATLAB R2007b (7.5) onwards:
http://www.mathworks.com/access/helpdesk/help/techdoc/rn/bq80uxu-1.html#braxduy-1
hence the required recompilation.
If you don't want to compile the files by yourself, a file
SPM5_Matlab7.1_Linux_MEX.tar.gz is available on
ftp://ftp.fil.ion.ucl.ac.uk/spm/spm5_updates/
that contains the main SPM5 MEX files for Linux compiled with MATLAB
7.1. They should work with the latest MATLAB versions.
Best regards,
Guillaume.
Michael C. Chen wrote:
> Hi SPM-users,
>
> I'm currently having problems displaying images in SPM5 using Matlab R2007b
> running on Linux 32-Ubuntu 7.1 (I've read a few other reports of a similar
> problem). From reading previous posts, my best guess about the display
> problem is an issue with updated mex files in R2007b, as spm_atranspa spits
> out an error for invalid mex files. An attempt to compile the mex files
> (post: "Re: MEX Error after updates" on 1/25/08) from Update/src results in
> the following:
> ___________________________________________________________
>
> 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
> spm_vol_utils.c:239:18: error: math.h: No such file or directory
> spm_vol_utils.c:240:20: error: stdlib.h: No such file or directory
> spm_vol_utils.c: In function ‘resample_uchar_0’:
> spm_vol_utils.c:257: warning: incompatible implicit declaration of built-in
> function ‘floor’
> spm_vol_utils.c: In function ‘resample_uchar_1’:
> spm_vol_utils.c:290: warning: incompatible implicit declaration of built-in
> function ‘floor’
> spm_vol_utils.c: In function ‘resample_d_uchar_1’:
> spm_vol_utils.c:335: warning: incompatible implicit declaration of built-in
> function ‘floor’
> spm_vol_utils.c: In function ‘slice_uchar_0’:
> spm_vol_utils.c:535: warning: incompatible implicit declaration of built-in
> function ‘floor’
> spm_vol_utils.c: In function ‘slice_uchar_1’:
> spm_vol_utils.c:590: warning: incompatible implicit declaration of built-in
> function ‘floor’
> spm_vol_utils.c: In function ‘slice_uchar’:
> spm_vol_utils.c:719: warning: incompatible implicit declaration of built-in
> function ‘fabs’
> spm_vol_utils.c:719: warning: incompatible implicit declaration of built-in
> function ‘floor’
> make: *** [utils_uchar.mexglx.o] Error 1
>
>
> It seems like there are a few linux users who have encountered similar
> problems, so if anyone has found a successful workaround, it'd be
> tremendously helpful. I appreciate the help!
>
> Thanks all,
> -Michael
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|