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
461 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
>> 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 Kommentare
Amir
am 25 Sep. 2024
download the updated files from github (for apple silicon). copy & replace into your installation directory. then run spm12 in matlab. it works
Antworten (2)
Laurent Lamalle
am 27 Okt. 2023
Bearbeitet: Laurent Lamalle
am 27 Okt. 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 Kommentare
Xiaoqing
am 6 Jan. 2024
Bearbeitet: Walter Roberson
am 6 Jan. 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
am 29 Jan. 2024
Bearbeitet: Stefan Möller
am 29 Jan. 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
am 9 Apr. 2024
Just install SPM12 the developers version.
10 Kommentare
Drew
am 24 Okt. 2024 um 20:25
UPDATE: I solved this issue but with a non-optimal workaround.
I found somebody with a similar mac M1 infrastructure and simply had them send the spm developers version to me that they downloaded a long time ago.
We noticed that their version does not match the version on github currently (10/24/24), especcially in the src/Makefile.vars and spm_platform.m file. In the current github version, there is nothing to recognize the MACA64 architecture while this seems to be included in the version my colleague had.
For those who are still having issues, I'd recommend finding someone who has spm still working on their mac M1 or M2 and simply have them send you the zip file they have.
Luca
am 14 Nov. 2024 um 15:59
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
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!