Menu

Installation problems with Fieldtrip

Help
2020-05-21
2022-03-19
  • Javier Molto

    Javier Molto - 2020-05-21

    Hi Dr. Dien,

    I have updated the EP Toolkit to the last version (2.891) and I have found some problems in the installation process related to the Fieldtrip. After typing "ft_defaults" I get a message indicating that "CalcMD5.mexmaci64" is impossible to be opened because the developper can not be verified (is like macOS Catalina treat this file as malicious software).

    Later on, if a try to do the dipole analysis I get another error message indidating that "ft_getopt.mexmaci64" again is impossible to be opened because the developper can not be verified (is like macOS Catalina treat this file as malicious software).
    Attached you' ll find the Matlab error message related to the dipole analysis.

    Moreover, if I try to run a robust ANOVA I get another similar error message ("ep_WJGLMml.mexmaci64) indicating that again is impossible to be opened because the developper can not be verified (is like macOS Catalina treat this file as malicious software).

    It seems that all these problems are related to an incorrect installation of the Fieldtrip software.
    I am using the latest versions of all the programs (ft_20200519).
    I have installed the gcc and clang compilers installed (checked by the Terminal).

    Could you figure out what is happening?
    Thanks in advance for your attention and time,
    Javier

     
  • Joe Dien

    Joe Dien - 2020-05-21

    Hi, I've been avoiding updating to Catalina because of these sorts of issues. This is not just FieldTrip as ep_WJGLMml.mexmaci64 is one of my EP Toolkit files. The problem is that the Mac OS has become extremely tight about security. Mex files are Matlab binary files that have been compiled for extra speed (I got something like a ten times boost by doing this but it was a lot of work as I had to recode everything in C++). On the FieldTrip mailing list, I found the following posting by Sendy Caffarra: "I could fix it by updating Catalina, Xcode and allowing all Apps in the Security panel." Try this solution and see if it helps. I'll look into seeing what is required to get a file registered by Apple but it may be too much to do for someone like me.

    Joe

     
  • Javier Molto

    Javier Molto - 2020-05-22

    Hi, thanks so much for your very useful suggestion. It works!
    After installing Xcode, during the EP installation and especially after that and during the dipole analysis, some files were unabled to be opened because were not developped by Apple. So, I have allowed each of them in the Security panel and then the dipole analysis works.
    However, for the robust ANOVA the mex files seem do not work and Matlab functions assume this role, which I understand is correct.
    So, it is possible to bypass the extremely tight restrictions of Catalina OS.
    Thank again
    Javier

     
  • Joe Dien

    Joe Dien - 2020-05-23

    I bit the bullet and updated my Mac to Catalina (I'm mostly using a Linux computer these days). I wasn't able to replicate the problems you ran into. On the Security & Privacy pane of the system Settings, on the General subpane, I have the "App Store and identified developers" checked. Apparently that is enough for my system. Is that what you have? You mentioned something about "allowed each of them" so it sounds like you're doing something different? I don't see any place to do anything like that on my own computer.

     
  • Javier Molto

    Javier Molto - 2020-05-23

    The problems appear during the installation the FieldTrip software. In order to fix the problems, I have the "App Store and identified developers" checked, but it was not enough for my system (macOS 10.15.4). The first error message was related to the "CalcMD5.mexmaci64" file (not developped by Apple). To fix the problem I need to locate this file into the FieldTrip folder and manually (with Control key) I have allowed it to be opened by Matlab and then confirm the permission for this file to be opened in the "App Store and identified developers" pane. I have to follow the same steps with several conflicting files (i.e., ft_getopt.mexmaci64, memprofile.mexmaci64).
    After that, the dipole analysis seem to work fine.
    However, when runnning the robust ANOVA, in the Matlab command window appears repeatedly the message "Mex function failed - attempting Matlab function" until finished ANOVA run. So, it seems that the binary Mex file fails here. Is that correct?

     
  • Joe Dien

    Joe Dien - 2020-05-23

    I still can't replicate your report. I'm not doubting that you are running into something, just that this seems to be particular to your system. On the theory that maybe existing binaries are exempted when upgrading to Catalina, I downloaded a new copy of FieldTrip and did the ft_defaults procedure but still no problem. Then I tested the possibility that it being on Dropbox made a difference but that wasn't it either. I looked on the web more and some folks are saying that when Catalina downloads a binary via a browser, it adds a com.apple.quarantine metadata attribute to it. I'm downloading FieldTrip via Fetch, a wonderful ftp program (free to academics), which may be why I'm not seeing this problem. Unfortunately I'm distributing my EP Toolkit via the web so I can keep track of download totals (for the purposes of seeking grant funding). They say the following command in Terminal can remove the metadata: xattr -d com.apple.quarantine /Users/jdien/Dropbox/Matlab_Programs/EP_Toolkit/Analysis_Functions/subroutines. Perhaps this might work for you? Although it's strange that the permissions procedure is working for FieldTrip but not the EP Toolkit. Could you try the command lasterr in the Matlab Command Window after trying to use the robust ANOVA and tell me what it says?

     
  • Javier Molto

    Javier Molto - 2020-05-24

    Thanks Joe for your useful suggestions.
    After reading some comments on the web regarding how the tighter security in the OS Cataline can cause headaches for developers, I have checked the box of the “Developer Tools” to grant permission to Terminal.pp in order to ignore the quarantine flag and most “Security Assessment” rejections.
    Then, I manually (with Control key) have allowed to the "ep_WJGLMml.mexmaci64" file to be opened by Matlab and then confirm the permission for this file to be opened in the "App Store and identified developers" pane.
    Finally and using Terminal, I have followed your suggestions (attached you'll find the results) looking for metadata. As you can see, it seems now that there is no apple quarantine flag.
    Then, I have checked EP with dipole analysis and it works fine. An the same happens with the robusta ANOVA. Now there is no message about "Mex function failed - attempting Matlab function" (attached file). Thanks again.

     
  • Joe Dien

    Joe Dien - 2020-05-25

    Glad to hear you were able to solve it! Let me know if there is anything further I can help with.

    Joe

     
  • Yasunori Kotani

    Yasunori Kotani - 2022-03-19

    In my case, the following commads in Terminal app solved the problem.

    FT_PATH='/Users/XXXXX/Documents/MATLAB/fieldtrip-20220310'
    sudo xattr -r -d com.apple.quarantine $FT_PATH
    sudo find $FT_PATH -name *.mexmaci64 -exec spctl --add {} \;

    FT_PATH is your path to the fieldtrip.

    I hope this helps.

     

Log in to post a comment.