【问题标题】:Error compiling SPM12 for MATLAB on a Mac M1 with Big Sur在带有 Big Sur 的 Mac M1 上为 MATLAB 编译 SPM12 时出错
【发布时间】:2021-10-01 15:13:19
【问题描述】:

我有一些问题,试图在我的 Mac M1 上使用 Big Sur 安装 SPM12。我的配置是:

  • Mac M1 Big Sur (11.3.1) - 512/16GB
  • MATLAB_R2020a
  • SPM12

我遵循了here的指示

  1. 在 Matlab 上:addpath ./Downloads/spm12/; savepath
  2. 终端:export PATH=/Applications/MATLAB_R2020a.app/bin:$PATH
  3. 在终端上(用于允许 mex 文件):sudo xattr -r -d com.apple.quarantine ./Downloads/spm12/
  4. 在终端sudo find ./Downloads/spm12/ -name \*.mexmaci64 -exec spctl --add {} \;
  5. 在终端 (spm12/src):make distclean
  6. 在终端 (spm12/src):make && make install 并在那里崩溃:
mc@MCs-MacBook-Air src % make && make install
_____________________________________________________________

         MacOS compilation (Intel 64 bit)
_____________________________________________________________

mex -O -largeArrayDims -c spm_vol_utils.c -DSPM_UNSIGNED_CHAR 

    Sorry! We could not determine the machine architecture
           for your host. Please contact:

               MathWorks Technical Support

           for further assistance.

/Applications/MATLAB_R2020a.app/bin/mex: line 295: cleanup: command not found
make: *** [utils_uchar.mexmaci64.o] Error 1

如何让 SPM12 构建?

【问题讨论】:

  • 它显示“请联系:MathWorks 技术支持以获得进一步的帮助。”这是你做的吗?
  • 另外,您链接的说明说预构建 MEX 文件随发行版一起提供,您不需要自己构建它们。 “编译”下的部分不是必须的,只要修改源代码即可。
  • @CrisLuengo 我没有联系他们,因为我认为这可能是我不知道的“常见错误”。老实说,我在这个领域还很陌生,而且我只关注一些教程。我不需要自己构建它们是什么意思?由于我不想修改源代码,可能只是为了让它在硅 puce 中运行

标签: macos matlab apple-m1 matlab-spm


【解决方案1】:

知道了!所以正如你所说,我不应该进行编译。因为我在 Big Sure 我只需要这样做:

sudo xattr -r -d com.apple.quarantine SPM_PATH
sudo find SPM_PATH -name \*.mexmaci64 -exec spctl --add {} \;

感谢您的帮助;)

【讨论】:

    猜你喜欢
    • 2021-04-17
    • 1970-01-01
    • 2021-06-29
    • 1970-01-01
    • 2021-06-13
    • 1970-01-01
    • 1970-01-01
    • 2021-03-31
    • 2021-04-18
    相关资源
    最近更新 更多