I am trying to run spm12 with matlab 2023b on my macOS but I got this error when I type spm and I have already installed xcode14 from App Store
387 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
>> spm
Error using spm_check_installation>check_basic
SPM uses a number of MEX files, which are compiled functions.
These need to be compiled for the various platforms on which SPM
is run. It seems that the compiled files for your computer platform
are missing or not compatible. See
https://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Mac_OS_(Intel)
for information about how to compile MEX files for MACA64
in MATLAB 23.2.0.2391609 (R2023b) Update 2.
11 Commenti
Amir
il 25 Set 2024
download the updated files from github (for apple silicon). copy & replace into your installation directory. then run spm12 in matlab. it works
Risposte (2)
Laurent Lamalle
il 27 Ott 2023
Modificato: Laurent Lamalle
il 27 Ott 2023
Hello,
For SPM12, on my M2-based PowerBook Pro, I succeeded compiling mexmaca64 mex files using the following procedure:
- In spm12/src, I edited "Makefile.var" and replaced "mexmaci64" with "mexmaca64" in the MacOS section:
- ##### MacOS #####
- ifeq (Darwin,$(PLATFORM))
- MEXEXT = mexmaca64
- ...
- In spm12/src, I edited "Makefile" and added in the "Display Messages" section a line to handle mexmaca64:
- verb.mexmaci64:
- $(call verb, "MacOS compilation (Intel 64 bit)")
- verb.mexmaca64:
- $(call verb, "MacOS compilation (ARM 64 bit)")
- After that, the commands "make" and "make install" both run successfully (current directory being spm12/src).
- I edited spm12/external/src/geometry.c, to add:
- #include "mex.h"
- after #include "geometry.h".
- Then, the command:
- CFLAGS="-I/PathTo/MATLAB_R2023b.app//extern/include/" make external
- succeeds, as well as
- make external-install.
- I further edited spm12/spm_platform.m to insert the line:
- 'MACA64', 'unx', 0;...
- after the line
- 'MACI64', 'unx', 0;...
- and changed
- case {'MAC','MACI','MACI64'}
- to
- case {'MAC','MACI','MACI64','MACA64'}
- in the switch comp cases.
It should be easy to further adapt so that both mexmaci64 and mexmaca64 could be compiled depending on the CPU architecture underlying the particular Darwin platform.
Now, it seems that the developer version of SPM (on github.com) includes already mexmaca64 files...
4 Commenti
Xiaoqing
il 6 Gen 2024
Modificato: Walter Roberson
il 6 Gen 2024
hello, I met the same issue. I did as the steps mentioned above.
But at the step make && make install step, I got this message:
cp -f spm_sample_vol.mexmaca64 spm_slice_vol.mexmaca64 spm_brainwarp.mexmaca64 spm_conv_vol.mexmaca64 spm_render_vol.mexmaca64 spm_global.mexmaca64 spm_resels_vol.mexmaca64 spm_bsplinc.mexmaca64 spm_bsplins.mexmaca64 spm_unlink.mexmaca64 spm_existfile.mexmaca64 spm_gamrnd.mexmaca64 spm_hist.mexmaca64 spm_krutil.mexmaca64 spm_project.mexmaca64 spm_hist2.mexmaca64 spm_dilate_erode.mexmaca64 spm_bwlabel.mexmaca64 spm_get_lm.mexmaca64 spm_voronoi.mexmaca64 spm_mesh_dist.mexmaca64 spm_mesh_utils.mexmaca64 spm_mrf.mexmaca64 spm_diffeo.mexmaca64 spm_field.mexmaca64 spm_cat.mexmaca64 spm_jsonread.mexmaca64 spm_mesh_reduce.mexmaca64 spm_mesh_geodesic.mexmaca64 spm_mesh_ray_triangle.mexmaca64 spm_gmmlib.mexmaca64 ..
cp: spm_sample_vol.mexmaca64: No such file or directory
cp: spm_slice_vol.mexmaca64: No such file or directory
cp: spm_brainwarp.mexmaca64: No such file or directory
cp: spm_conv_vol.mexmaca64: No such file or directory
cp: spm_render_vol.mexmaca64: No such file or directory
cp: spm_global.mexmaca64: No such file or directory
cp: spm_resels_vol.mexmaca64: No such file or directory
cp: spm_bsplinc.mexmaca64: No such file or directory
cp: spm_bsplins.mexmaca64: No such file or directory
cp: spm_unlink.mexmaca64: No such file or directory
cp: spm_existfile.mexmaca64: No such file or directory
cp: spm_gamrnd.mexmaca64: No such file or directory
cp: spm_hist.mexmaca64: No such file or directory
cp: spm_krutil.mexmaca64: No such file or directory
cp: spm_project.mexmaca64: No such file or directory
cp: spm_hist2.mexmaca64: No such file or directory
cp: spm_dilate_erode.mexmaca64: No such file or directory
cp: spm_bwlabel.mexmaca64: No such file or directory
cp: spm_get_lm.mexmaca64: No such file or directory
cp: spm_voronoi.mexmaca64: No such file or directory
cp: spm_mesh_dist.mexmaca64: No such file or directory
cp: spm_mesh_utils.mexmaca64: No such file or directory
cp: spm_mrf.mexmaca64: No such file or directory
cp: spm_diffeo.mexmaca64: No such file or directory
cp: spm_field.mexmaca64: No such file or directory
cp: spm_cat.mexmaca64: No such file or directory
cp: spm_jsonread.mexmaca64: No such file or directory
cp: spm_mesh_reduce.mexmaca64: No such file or directory
cp: spm_mesh_geodesic.mexmaca64: No such file or directory
cp: spm_mesh_ray_triangle.mexmaca64: No such file or directory
cp: spm_gmmlib.mexmaca64: No such file or directory
make: *** [main-install] Error 1
I tried download the dev version spm again, but it still failed.
Do you have any suggestion, here is my system.
Apple M2 Sonoma
Stefan Möller
il 29 Gen 2024
Modificato: Stefan Möller
il 29 Gen 2024
I had similar issues as NADA and Lorenzo. What worked for me was doing the changes to Makefile and Makefile.var as Laurent suggested. In Makefile.var I also changed MEXBIN to
MEXBIN = /Applications/MATLAB_R2023b.app/bin/mex
and in this line
MEXOPTS = -O -largeArrayDims
I changed the "-" because it might have gotten misread by the system. I don't know if that changed anythong though.
I then changed MACI64 to MACA64 in a few places in spm_platform to get SPM to start.
Amir Dehsarvi
il 9 Apr 2024
Just install SPM12 the developers version.
11 Commenti
Luca
il 14 Nov 2024
Hi Drew, I am struggling with the same problem but haven´t found anyone with the old developers version yet. Would you be willing to send it to me? Thank you!
Best
luca
Vedere anche
Categorie
Scopri di più su Environment and Settings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!