# Trouble Building Slicer on macOS

**URL:** <https://discourse.slicer.org/t/trouble-building-slicer-on-macos/43821>\
**Category:** Support\
**Created:** [July 23, 2025, 8:57am UTC](https://discourse.slicer.org/t/trouble-building-slicer-on-macos/43821 "2025-07-23T08:57:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![tas47](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tas47/32/78529_2.png) [@tas47](https://discourse.slicer.org/u/tas47)\
**Post date:** [July 30, 2025, 5:30pm UTC](https://discourse.slicer.org/t/trouble-building-slicer-on-macos/43821/5 "2025-07-30T17:30:21Z")

</div>

I hear your frustration, and honestly i dont really have a solution. Since every computer and configuration feels different. I read alot of post here and it seems alot of people having build trouble with arm.

First try to get the QT path ahead of your slicer build path in your .bash or .zsh file first

-update xcode

my qt version is this  
**Qt 5.15.16 from Homebrew so install this**

which qt: to get bath and add it to your path variable,  
export Qt5\_DIR=/opt/homebrew/opt/qt@5/lib/cmake/Qt5

and then make sure you clean up your slicer and build from source:

my configuration:

based on my cache and path cmake used it looks like this (dont copy this but it can maybe help u diagnose)

```auto
cmake \
  -DADDITIONAL_CXX_FLAGS:STRING="" \
  -DADDITIONAL_C_FLAGS:STRING="" \
  -DBUILD_TESTING:BOOL=ON \
  -DCMAKE_BUILD_TYPE:STRING=Debug \
  -DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk \
  -DQt5_DIR:PATH=/opt/homebrew/opt/qt@5/lib/cmake/Qt5 \
  -DSlicer_BUILD_APPLICATIONUPDATE_SUPPORT:BOOL=ON \
  -DSlicer_BUILD_BRAINSTOOLS:BOOL=ON \
  -DSlicer_BUILD_CLI:BOOL=ON \
  -DSlicer_BUILD_DICOM_SUPPORT:BOOL=ON \
  -DSlicer_BUILD_DIFFUSION_SUPPORT:BOOL=ON \
  -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=ON \
  -DSlicer_BUILD_MULTIMEDIA_SUPPORT:BOOL=ON \
  -DSlicer_BUILD_MULTIVOLUME_SUPPORT:BOOL=ON \
  -DSlicer_BUILD_PYTHONQT:BOOL=ON \
  -DSlicer_BUILD_QTLOADABLEMODULES:BOOL=ON \
  -DSlicer_BUILD_QTSCRIPTEDMODULES:BOOL=ON \
  -DSlicer_BUILD_WEBENGINE_SUPPORT:BOOL=ON \
  -DSlicer_DEFAULT_FAVORITE_MODULES:STRING="Data,Volumes,Models,Transforms,Markups,SegmentEditor" \
  -DSlicer_DEFAULT_HOME_MODULE:STRING="Welcome" \
  -DSlicer_ORGANIZATION_DOMAIN:STRING=slicer.org \
  -DSlicer_ORGANIZATION_NAME:STRING=slicer.org \
  -DSlicer_RELEASE_TYPE:STRING=Experimental \
  -DSlicer_REQUIRED_QT_VERSION:STRING=5.15 \
  -DSlicer_SUPERBUILD:BOOL=ON \
  -DSlicer_USE_CTKAPPLAUNCHER:BOOL=ON \
  -DSlicer_USE_NUMPY:BOOL=ON \
  -DSlicer_USE_PYTHONQT:BOOL=ON \
  -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=ON \
  -DSlicer_USE_QtTesting:BOOL=ON \
  -DSlicer_USE_SCIPY:BOOL=ON \
  -DSlicer_USE_SimpleITK:BOOL=ON \
  -DSlicer_USE_SimpleITK_SHARED:BOOL=ON \
  -DSlicer_VTK_SMP_IMPLEMENTATION_TYPE:STRING=STDThread \
  -DSlicer_VTK_VERSION_MAJOR:STRING=9 \
  -DSlicer_VTK_VERSION_MINOR:STRING=4 \
  ~/Slicer-source

```

Try to follow these links:

> <https://github.com/Slicer/Slicer/issues/5944>
>
> \## 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?

“I confirm that the last Slicer version successfully compiles on apple m1 only with OpenSSL built outside of Slicer (configured for darwin x86\_64) and SimpleITK disabled.

These should be the relevant flags:

`-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64`  
`-DSlicer_USE_SYSTEM_OpenSSL:BOOL=ON`  
`-DSlicer_USE_SimpleITK:BOOL=OFF`

I think the issue is the configuration step of the default slicer openssl build, which allows various dependencies of OpenSSL to be compiled in 32 bit mode, which I believe is not supported in M1 chips.

In fact, OpenSSL on its own (1.1.1g in this example) builds very nicely with a very simple `./Configure darwin64-x86_64-cc shared`"

Another post:

> [@Build Slicer in apple silicon - error "arm64"](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549):
>
> 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: Installed Qt5 and CMake using Homebrew. brew install qt@5 brew install cmake Build OpenSSL: 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-…

[“I haven’t tried building on mac arm in a long time, so more recent changes in the dependencies may have broken things.](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549/2)

[One idea is to turn off this flag:”](https://discourse.slicer.org/t/build-slicer-in-apple-silicon-error-arm64/39549/2)

I also just want to preface that although my build was successful, it didn’t pass all the tests, I also used a lot of ai to help me so I am not too savvy with cmake at all. I mainly build slicer so i could extract lsp and get a configuration.json file to get access to autocomplete.

---

_[View the full topic](https://discourse.slicer.org/t/trouble-building-slicer-on-macos/43821)._
