Skip to content

Fix Apple Silicon (MACA64) support in GetSystemCommand#22

Open
AmitSubhash wants to merge 1 commit into
nirfast-admin:masterfrom
AmitSubhash:fix/apple-silicon-maca64
Open

Fix Apple Silicon (MACA64) support in GetSystemCommand#22
AmitSubhash wants to merge 1 commit into
nirfast-admin:masterfrom
AmitSubhash:fix/apple-silicon-maca64

Conversation

@AmitSubhash
Copy link
Copy Markdown

Summary

  • GetSystemCommand.m did not recognize MACA64 (Apple Silicon MATLAB), causing it to select the 32-bit image2mesh_cgal-mac.exe instead of the 64-bit image2mesh_cgal-mac64.exe
  • macOS 10.15+ dropped 32-bit support entirely, so this breaks all meshing on Apple Silicon Macs
  • One-line fix: add strcmpi(os,'MACA64') alongside the existing MACI64 check

Details

MATLAB R2023b+ on Apple Silicon reports computer() as MACA64. The existing code only checked for MACI64 when deciding whether to append the 64 suffix to the binary name. Without this fix, NIRFAST attempts to run image2mesh_cgal-mac.exe (Mach-O i386), which fails with "bad CPU type in executable".

Test plan

  • Verified computer returns MACA64 on MATLAB R2025b, MacBook Pro M4 Pro
  • After fix, GetSystemCommand('image2mesh_cgal') correctly resolves to image2mesh_cgal-mac64.exe
  • NirfastMesh_Region successfully generates meshes locally on Apple Silicon
  • No impact on Intel Mac (MACI64) or other platforms

MATLAB on Apple Silicon reports computer() as 'MACA64', which was not
handled alongside 'MACI64'. This caused the mesher to fall back to the
32-bit binary (image2mesh_cgal-mac.exe) instead of the 64-bit one
(image2mesh_cgal-mac64.exe). The 32-bit binary cannot run on macOS 11+.

Tested on MATLAB R2025b, MacBook Pro M4 Pro, macOS 15.
@AmitSubhash AmitSubhash force-pushed the fix/apple-silicon-maca64 branch from 9af6cf5 to bb67c60 Compare April 3, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant