Invalid MEX-file error

248 views
Skip to first unread message

Marcelo Febo

unread,
May 4, 2018, 4:35:56 PM5/4/18
to NODDI
Hello
The NODDI toolbox is working fine on two laptops (one Windows and one Mac, both with Matlab 2016a or 2017a) in our lab, but for some reason the toolbox will not function on our two iMac desktops. We get the following error message:

Invalid MEX-file '/Users/febo/Documents/MATLAB/noddi/niftimatlib-1.2/matlab/@file_array/private/file2mat.mexmaci64':
dlopen(/Users/febo/Documents/MATLAB/noddi/niftimatlib-1.2/matlab/@file_array/private/file2mat.mexmaci64, 6): Library not loaded:
@loader_path/libmex.dylib
Referenced from: /Users/febo/Documents/MATLAB/noddi/niftimatlib-1.2/matlab/@file_array/private/file2mat.mexmaci64
Reason: image not found.

We compile the mex file, as per recommendations in make.m and get an error related to file2mat (citing matrix dimensions that are exceedingly high)

Thank you in advance. Im sure we are overlooking some details of the installation, but any suggestions are welcome.

Marcelo

Hui Zhang

unread,
May 9, 2018, 2:11:55 PM5/9/18
to no...@googlegroups.com
Hi,

niftimatlib is a third party software so my help will be quite limited.  My guess is that you may need to recompile the software on your imac for some reason.

Gary


Marcelo

--
You received this message because you are subscribed to the Google Groups "NODDI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to noddi+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcelo Febo

unread,
Jul 12, 2018, 9:41:36 AM7/12/18
to NODDI

Dear Gary,
Thank you so much. Yes, it is a imac compiler issue. We are working to resolve. In the meantime, matlab on windows works fine.

Best
Marcelo
To unsubscribe from this group and stop receiving emails from it, send an email to noddi+un...@googlegroups.com.

Ioannis Mourginakis

unread,
Sep 12, 2018, 6:50:56 PM9/12/18
to NODDI
We have had the same problem and have figured out how to resolve it for anybody still wondering.

You must recompile niftimatlib with specific options to work on the mac compiler, as it throws errors otherwise
    1. Open matlab [following commands are to be executed within matlab]

    2. Cd to directory /[niftimatlib folder]/matlab/@file_array/private/src

    3. “mex -O -compatibleArrayDims file2mat.c”

    4. “mex -O -compatibleArrayDims mat2file.c”

    5. The sources are recompiled. Move the new .mexmaci64 (executable) files into the directory above, click replace. (to clarify, move them to /[niftimatlib folder]/matlab/@file_array/private/)

Reply all
Reply to author
Forward
0 new messages