Back to the main page.

Bug 3330 - Invalid MEX File

Status CLOSED DUPLICATE
Reported 2017-08-08 19:05:00 +0200
Modified 2019-08-10 12:41:03 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P5 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Brady Williamson - 2017-08-08 19:05:58 +0200

Hi, When I try to run ft_prepare_headmodel I get the following error: Invalid MEX-file '/Applications/MATLAB Toolboxes/fieldtrip/external/spm8/spm_bwlabel.mexmaci64': '/Applications/MATLAB Toolboxes/fieldtrip/external/spm8/spm_bwlabel.mexmaci64' is not a valid shared library.. Error in volumethreshold (line 34) [cluster, n] = spm_bwlabel(output, 6); Error in prepare_mesh_segmentation (line 143) seg = volumethreshold(seg, 0.5, tissue); Error in ft_prepare_mesh (line 147) bnd = prepare_mesh_segmentation(cfg, mri); Error in ft_prepare_headmodel (line 337) geometry = ft_prepare_mesh(tmpcfg, data); I have had some trouble with this type of issue after upgrading to MATLAB2017a on my MacOS 10.12.3 but am not sure how to resolve this specific problem. Thanks very much for any help, Brady Williamson


Jan-Mathijs Schoffelen - 2017-08-09 09:17:40 +0200

You may need to recompile the mex-files yourself. To get started, please have a look at ft_compile_mex, and the corresponding documentation.


Brady Williamson - 2017-08-09 16:23:33 +0200

I have followed all of the documentation and performed ft_compile_mex and still receive the same error. It only seems to be happening with functions called from the external/spm8 folder. Thanks, Brady


Robert Oostenveld - 2017-08-14 16:48:49 +0200

This is a known issue on OS X in combination with R2017. It is possible to recompile the SPM8 mex files on R2017. We have not yet been able to get a set of mex files that works both on older and newer MATLAB versions. please note that the external/spm8 mex files are not compiled by ft_compile_mex. You will have to look at SPM for compilation instructions. *** This bug has been marked as a duplicate of bug 3288 ***


Robert Oostenveld - 2019-08-10 12:34:53 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.


Robert Oostenveld - 2019-08-10 12:41:03 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.