# Build Slicer in apple silicon - error "arm64"

**URL:** <https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549>\
**Category:** Support\
**Created:** [October 5, 2024, 6:48pm UTC](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549 "2024-10-05T18:48:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![park](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/park/32/5717_2.png) [@park](https://discourse.slicer.org/u/park)\
**Post date:** [October 5, 2024, 6:48pm UTC](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549/1 "2024-10-05T18:48:20Z")

</div>

Hi all,

During the build process as per Steve’s advice, [#5944](https://github.com/Slicer/Slicer/issues/5944)  
I encountered the following issue. Has anyone resolved this?

**Computer Specifications:**

- CPU: M1 Pro
- OS: macOS Ventura
- Xcode: 13.0

**Process:**

1. Installed Qt5 and CMake using Homebrew.

```auto
brew install qt@5
brew install cmake

```

1. Build OpenSSL:

```auto
git clone https://github.com/openssl/openssl.git openssl-git
cd openssl-git
./Configure darwin64-arm64-cc --prefix="/tmp/openssl-arm" no-asm
make && make install
mv OpenSSL-install OpenSSL-install-orig
ln -s /tmp/openssl-arm ./OpenSSL-install

```

3.Configured using CMake command:

```auto
sudo cmake \
  -DCMAKE_OSX_ARCHITECTURES=arm64 \
  -DCMAKE_BUILD_TYPE:STRING=Debug \
  -DSlicer_USE_SYSTEM_OpenSSL:BOOL=ON \
  -DSlicer_USE_SimpleITK:BOOL=OFF \
  -DSlicer_BUILD_DICOM_SUPPORT:BOOL=OFF \
  -DQt5_DIR:PATH=/opt/homebrew/Cellar/qt@5/5.15.13_1/lib/cmake/Qt5 \
  /opt/T/S

```

1. Change cmakelists relates to `ffi`

```auto
+ message("skipping ctypes on mac")
+ #add_python_extension(_ctypes
+ #SOURCES ${ctypes_COMMON_SOURCES}
+ #_ctypes/malloc_closure.c
+ #_ctypes/darwin/dlfcn_simple.c
+ #_ctypes/libffi_osx/ffi.c
+ #_ctypes/libffi_osx/x86/darwin64.S
+ #_ctypes/libffi_osx/x86/x86-darwin.S
+ #_ctypes/libffi_osx/x86/x86-ffi_darwin.c
+ #_ctypes/libffi_osx/x86/x86-ffi64.c
+ #INCLUDEDIRS ${SRC_DIR}/Modules/_ctypes/libffi_osx/include
+ #${SRC_DIR}/Modules/_ctypes/darwin

```

**Then, I got the error like this**

```auto
"tbb::detail::r1::terminate(tbb::detail::d1::task_arena_base&)", referenced from:
    tbb::detail::d1::task_arena::terminate() in vtkSMPToolsImpl.cxx.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

```

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 5, 2024, 7:18pm UTC](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549/2 "2024-10-05T19:18:32Z")

</div>

I haven’t tried building on mac arm in a long time, so more recent changes in the dependencies may have broken things.

One idea is to turn off this flag:

> <https://github.com/Slicer/Slicer/blob/main/SuperBuild/External_VTK.cmake#L9>

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 5, 2025, 1:43am UTC](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549/3 "2025-05-05T01:43:55Z")

</div>

@park - did you ever have luck getting this build to work? Do you have an updated build script you can share that works with current Slicer? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![park](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/park/32/5717_2.png) [@park](https://discourse.slicer.org/u/park)\
**Post date:** [May 5, 2025, 7:12am UTC](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549/4 "2025-05-05T07:12:26Z")

</div>

Hi @pieper .  
No I haven’t succeeded yet, I am sorry couldn’t be of help.

---

<div class="post-metadata">

**Author:** ![MJamal](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@MJamal](https://discourse.slicer.org/u/MJamal)\
**Post date:** [July 22, 2025, 8:06am UTC](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549/5 "2025-07-22T08:06:31Z")

</div>

Hello,

I am also encountering this same error. I have attached the logs:

```auto
  "tbb::detail::r1::terminate(tbb::detail::d1::task_arena_base&)", referenced from:
      vtk::detail::smp::vtkSMPToolsImplTBBInitialize::~vtkSMPToolsImplTBBInitialize() in vtkSMPToolsImpl.cxx.o
      vtk::detail::smp::vtkSMPToolsImpl<(vtk::detail::smp::BackendType)2>::Initialize(int) in vtkSMPToolsImpl.cxx.o
      vtk::detail::smp::vtkSMPToolsImpl<(vtk::detail::smp::BackendType)2>::Initialize(int) in vtkSMPToolsImpl.cxx.o
ld: symbol(s) not found for architecture arm64
c++: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [lib/libvtkCommon-9.5.9.5.dylib] Error 1
make[4]: *** [CMakeFiles/Common.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [VTK-prefix/src/VTK-stamp/VTK-build] Error 2
make[1]: *** [CMakeFiles/VTK.dir/all] Error 2
make: *** [all] Error 2

```

Any solution on how to fix this?

System: mac os version sequoia v15.5

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [July 22, 2025, 8:21am UTC](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549/6 "2025-07-22T08:21:09Z")

</div>

> [@MJamal](#):
>
> Any solution on how to fix this?

I don’t build on Mac but tried once for aarch64 on an x86\_64 system.

TBB is not available for aarch64 so you should configure without this option:

`Slicer_VTK_SMP_IMPLEMENTATION_TYPE:STRING=Sequential`
