GeneRisi
(Gene Risi)
April 24, 2024, 3:58am
1
PyTorch has support for using the shaders in the M series chips, but to use it, one has to use the arm64 version of Python. Should a native (in this case, M3) build of Slicer3D be possible? If yes, where should I get the 5.15.2 Qt package (for MacOS arm64)?
Thank you!
Gene
Support for a macOS arm64 version of Slicer is something planned though not for the immediate short term. If you have technical build experience you can try following the collection of work arounds to get something working posted in the following issue:
opened 05:46PM - 12 Oct 21 UTC
Type: Bug
Domain: build-system
## Steps to reproduce
I followed all the instructions from the [docs](https:/… /slicer.readthedocs.io/en/latest/developer_guide/build_instructions/macos.html#prerequisites) to build slicer from source.
Build halts with the following error while trying to build DCMTK:
```
make[2]: *** [DCMTK-prefix/src/DCMTK-stamp/DCMTK-configure] Error 1
make[1]: *** [CMakeFiles/DCMTK.dir/all] Error 2
-- OpenSSL: Errors detected - See below.
ld: warning: double slash removed from -install_name (/Users/kliron/opt/slicer/OpenSSL//libcrypto.1.1.dylib)
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Users/kliron/opt/slicer/zlib-install/lib/libz.a, building for macOS-i386 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libSystem.tbd (3 slices)
Undefined symbols for architecture i386:
"__DefaultRuneLocale", referenced from:
_CONF_parse_list in conf_mod.o
"___bzero", referenced from:
_ASN1_BIT_STRING_set_bit in a_bitstr.o
_asn1_item_embed_new in tasn_new.o
_addr_strings in b_addr.o
_mem_ctrl in bss_mem.o
_BLAKE2b_Final in blake2b.o
_BLAKE2s_Final in blake2s.o
_bn_div_fixed_top in bn_div.o
...
[...an extensive output of a lot more missing symbols...]
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [libcrypto.dylib] Error 1
make[3]: *** [build_libs] Error 2
CMake Error at /Users/kliron/Projects/slicer/CMake/ExternalProjectForNonCMakeProject.cmake:104 (message):
OpenSSL: build step failed with exit code '2'.
```
## Expected behavior
A successful build.
## Environment
- Slicer version: latest source tree
- Operating system: MacOS Big Sur 11.6
Has anyone been able to compile slicer from source on a M1 Mac? How do I bypass the missing i386 openssl library?
Some uses of PyTorch in things like TotalSegmentator are still not optimized for the MPS usage in PyTorch as seen at:
opened 05:56PM - 29 Dec 23 UTC
I'm running TotalSegmentator on my M3Max chip (16-core CPU 40-core GPU) Macbook … Pro and it's taking over 600 seconds to fully segment a 3D CT image of size 512*512*54, whereas it tends to take about 60 seconds on my 3070 GPU desktop. Is it possible that the latest version of totalsegmentator just uses the Macbook's CPU instead of calling the Macbook's "MPS" when using pytorch?
Therefore I can’t say for sure how much benefit you may get at this time.
GeneRisi
(Gene Risi)
July 16, 2025, 5:16pm
3
Hi James. I am still wondering about a Universal MacOS build or specifically an ARM64 MacOS build.
mau_igna_06
(Mauro I. Dominguez)
July 16, 2025, 5:23pm
4
Do you mean something like this guide below?
GeneRisi
(Gene Risi)
July 16, 2025, 7:32pm
5
Does a native ARM64 version exist? I didn’t see a status update for the plan you pointed me to. Thanks!
mau_igna_06
(Mauro I. Dominguez)
July 16, 2025, 8:39pm
6
See point 6 of section ProgressAndNextSteps or the link below:
README.md
# Slicer on ARM aarch64
These scripts were initially created to support building Slicer on ARM aarch64 associated with NVIDIA IGX running Ubuntu.
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
This file has been truncated. show original
build-CTKAppLauncher.sh
#!/bin/bash
# SPDX-FileCopyrightText: 2025 Jean-Christophe Fillion-Robin <jcfr@kitware.com>
# SPDX-License-Identifier: Apache-2.0
set -eo pipefail
script_dir=$(cd $(dirname $0) || exit 1; pwd)
err() { echo -e >&2 ERROR: $@\\n; }
This file has been truncated. show original
build-Slicer.sh
#!/bin/bash
# SPDX-FileCopyrightText: 2025 Jean-Christophe Fillion-Robin <jcfr@kitware.com>
# SPDX-License-Identifier: Apache-2.0
set -eo pipefail
script_dir=$(cd $(dirname $0) || exit 1; pwd)
err() { echo -e >&2 ERROR: $@\\n; }
This file has been truncated. show original
There are more than three files. show original
Hope it helps
@GeneRisi There are some various scripts around that people have tried to build Slicer from source to build a ARM64 variant, but nothing official yet such as Slicer preview build of such a version.
The below issue is still in progress and various Slicer developers have been actively working on a long chain of dependency updates including Qt5 → Qt6 that is part of bringing in ARM64 support across all the various libraries that Slicer uses. It is currently being worked on and I expect it to continue for a month or two.
opened 05:46PM - 12 Oct 21 UTC
Type: Bug
Domain: build-system
## Steps to reproduce
I followed all the instructions from the [docs](https:/… /slicer.readthedocs.io/en/latest/developer_guide/build_instructions/macos.html#prerequisites) to build slicer from source.
Build halts with the following error while trying to build DCMTK:
```
make[2]: *** [DCMTK-prefix/src/DCMTK-stamp/DCMTK-configure] Error 1
make[1]: *** [CMakeFiles/DCMTK.dir/all] Error 2
-- OpenSSL: Errors detected - See below.
ld: warning: double slash removed from -install_name (/Users/kliron/opt/slicer/OpenSSL//libcrypto.1.1.dylib)
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Users/kliron/opt/slicer/zlib-install/lib/libz.a, building for macOS-i386 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libSystem.tbd (3 slices)
Undefined symbols for architecture i386:
"__DefaultRuneLocale", referenced from:
_CONF_parse_list in conf_mod.o
"___bzero", referenced from:
_ASN1_BIT_STRING_set_bit in a_bitstr.o
_asn1_item_embed_new in tasn_new.o
_addr_strings in b_addr.o
_mem_ctrl in bss_mem.o
_BLAKE2b_Final in blake2b.o
_BLAKE2s_Final in blake2s.o
_bn_div_fixed_top in bn_div.o
...
[...an extensive output of a lot more missing symbols...]
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [libcrypto.dylib] Error 1
make[3]: *** [build_libs] Error 2
CMake Error at /Users/kliron/Projects/slicer/CMake/ExternalProjectForNonCMakeProject.cmake:104 (message):
OpenSSL: build step failed with exit code '2'.
```
## Expected behavior
A successful build.
## Environment
- Slicer version: latest source tree
- Operating system: MacOS Big Sur 11.6
Has anyone been able to compile slicer from source on a M1 Mac? How do I bypass the missing i386 openssl library?