# 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:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alientex](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alientex](https://discourse.slicer.org/u/alientex)\
**Post date:** [July 23, 2025, 8:57am UTC](https://discourse.slicer.org/t/trouble-building-slicer-on-macos/43821/1 "2025-07-23T08:57:31Z")

</div>

Hello,

I’ve been trying to build Slicer on my Mac for months now, but still haven’t found a reliable way to do it without running into errors—even after following the documentation carefully.

One of the main blockers is the Qt requirement. The documentation points to a DMG [here](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/macos.html#prerequisites), but it doesn’t include Qt 5.15.2. Since that version is no longer maintained, I’m not sure where to get it, and I’m stuck.

Honestly, I just want to build Slicer on my Mac and get started without all the friction. It’s frustrating that there isn’t a simpler, more end-user-friendly way to do this.

Can anyone please guide me through a working setup or a less painful process?

Thanks in advance!

---

<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 26, 2025, 4:05pm UTC](https://discourse.slicer.org/t/trouble-building-slicer-on-macos/43821/3 "2025-07-26T16:05:50Z")

</div>

I know this is cliche but you need to read this in and out:

> **[macOS — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/macos.html)**

I also spend hours trying to build slicer from sourceand it was very hard. My first recommendation is that if you can avoid installing in your mac, and instead in a new VM, it will make the build much easier.

For mac:  
The most important thing it that you have to make sure you have a version qt 15 and a version of cmake that is not higher than 4x.

make sure you check those first and where they are in your path. Most people install them with brew so try  
﻿﻿﻿ ```  
brew list --formula | grep make

```auto
brew list --formula | grep qt

```

i installed qt with brew and it worked, and if you have the wrong versions delete those too.

```auto
brew install qt@5

```

you can also check using `which` command

-Fix those first, and make sure they are in your path env and have xcode installed.

-Next just like the documentation says make sure you make a directory in the /opt : this will be very helpful

```auto
mkdir /opt/s/

```

```auto
cd /opt/s
cmake \
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=13.0 \
  -DCMAKE_BUILD_TYPE:STRING=Debug \
  -DQt5_DIR:PATH="PUT YOUR QT PATH"

```

Then execute this:

```cd
make -j4

```

also i recommend using cursor you debug the logs

---

<div class="post-metadata">

**Author:** ![alientex](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alientex](https://discourse.slicer.org/u/alientex)\
**Post date:** [July 29, 2025, 11:39am UTC](https://discourse.slicer.org/t/trouble-building-slicer-on-macos/43821/4 "2025-07-29T11:39:22Z")

</div>

Hi @tas47 ,

I followed your provided instructions, but encountered the following errors during the build:

```auto
[65%] Building CXX object CMakeFiles/PythonQt.dir/generated_cpp_515/com_trolltech_qt_network/com_trolltech_qt_network0.cpp.o
In file included from /opt/s/CTK-build/PythonQt/generated_cpp_515/com_trolltech_qt_network/com_trolltech_qt_network0.cpp:1:
In file included from /opt/s/CTK-build/PythonQt/generated_cpp_515/com_trolltech_qt_network/com_trolltech_qt_network0.h:14:
/opt/homebrew/opt/qt@5/lib/QtNetwork.framework/Headers/qdtls.h:52:1: error: static_assert failed due to requirement 'bool(-1 == 1)' "Required feature dtls for file /opt/homebrew/opt/qt@5/lib/QtNetwork.framework/Headers/qdtls.h not available."
QT_REQUIRE_CONFIG(dtls);
^ ~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/opt/qt@5/include/QtCore/qglobal.h:87:36: note: expanded from macro 'QT_REQUIRE_CONFIG'
#define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__" not available.")

138 warnings and 1 error generated.
make[8]: *** [CMakeFiles/PythonQt.dir/generated_cpp_515/com_trolltech_qt_network/com_trolltech_qt_network0.cpp.o] Error 1
make[7]: *** [CMakeFiles/PythonQt.dir/all] Error 2
make[6]: *** [all] Error 2
make[5]: *** [PythonQt-cmake/src/PythonQt-stamp/PythonQt-install] Error 2
make[4]: *** [CMakeFiles/PythonQt.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [CTK-prefix/src/CTK-stamp/CTK-build] Error 2
make[1]: *** [CMakeFiles/CTK.dir/all] Error 2

```

Below is the configuration command:  
`cmake \ `  
`-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=13.0 `  
`-DCMAKE_BUILD_TYPE:STRING=Debug `  
`-DCMAKE_PREFIX_PATH:PATH=/opt/homebrew/qt@5/lib/cmake `  
`-DSlicer_VTK_SMP_IMPLEMENTATION_TYPE:STRING=Sequential `  
`~/Desktop/Slicer`

---

<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.
