# Slicer build failed on Mac OS 10.12 Sierra

**URL:** https://discourse.slicer.org/t/slicer-build-failed-on-mac-os-10-12-sierra/445
**Category:** Support
**Created:** [June 6, 2017, 3:37pm UTC](https://discourse.slicer.org/t/slicer-build-failed-on-mac-os-10-12-sierra/445 "2017-06-06T15:37:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)
#### Post date: [June 6, 2017, 3:37pm UTC](https://discourse.slicer.org/t/slicer-build-failed-on-mac-os-10-12-sierra/445/1 "2017-06-06T15:37:40Z")

</div>

I’m having difficulty building Slicer on Sierra.  
Operating system: OSX 10.12.5  
Slicer: Newest nightly (Jun 6 2017)  
Qt: cartr/qt4/qt  
CMake: 3.8.0  
Xcode: 8.3.2  
I’ve tried CMAKE\_BUILD\_TYPE set to Debug and Release, CMAKE\_OSX\_DEPLOYMENT\_TARGET set to 10.12 and 10.9. CMAKE\_C\_COMPILER is set to /usr/bin/clang and CMAKE\_CXX\_COMPILER is set to /usr/bin/clang++. QT\_QMAKE\_EXECUTABLE is set to /usr/local/bin/qmake, which has a symbolic link to qmake in the Cellar directory.

The build fails on the “python” target. Error output is:

PhaseScriptExecution CMake\ Rules /Users/michaelschumaker/Packages/Slicer-SuperBuild-Debug/Slicer.build/Debug/python.build/Script-30496EF0E9A74020BE818B09.sh  
cd /Users/michaelschumaker/Packages/Slicer  
/bin/sh -c /Users/michaelschumaker/Packages/Slicer-SuperBuild-Debug/Slicer.build/Debug/python.build/Script-30496EF0E9A74020BE818B09.sh

make: \*\*\* No rule to make target `/Users/michaelschumaker/Packages/Slicer-SuperBuild-Debug/python-source-prefix/src/python-source-stamp/Release/python-source-done', needed by`/Users/michaelschumaker/Packages/Slicer-SuperBuild-Debug/python-prefix/src/python-stamp/Release/python-configure’. Stop.  
Command /bin/sh failed with exit code 2

What’s interesting is that, even when I set it to the Debug build type, the directories of python-source-done and python-configure in the error are still “Release”. Is there a mistake in the configuration script?

---

<div class="post-metadata">

### Author: ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)
#### Post date: [June 12, 2017, 2:47pm UTC](https://discourse.slicer.org/t/slicer-build-failed-on-mac-os-10-12-sierra/445/2 "2017-06-12T14:47:46Z")

</div>

I’m just moving this to the top. Can anyone suggest a solution?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [June 12, 2017, 2:52pm UTC](https://discourse.slicer.org/t/slicer-build-failed-on-mac-os-10-12-sierra/445/3 "2017-06-12T14:52:20Z")

</div>

I don’t use a Mac, but on Windows Python is always built in Release mode (regardless of the application is built in debug or release).

Have you tried to build/get Qt as described on Slicer build instructions page?

---

<div class="post-metadata">

### Author: ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)
#### Post date: [June 12, 2017, 3:11pm UTC](https://discourse.slicer.org/t/slicer-build-failed-on-mac-os-10-12-sierra/445/4 "2017-06-12T15:11:11Z")

</div>

Ok, thanks, I won’t worry about the build mode for the Python job. I was trying to identify any reason it might be the job that’s failing to build.  
I installed cartr/qt4/qt before compiling Slicer. I had previously installed Qt5.8, though.

---

<div class="post-metadata">

### Author: ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)
#### Post date: [June 12, 2017, 3:14pm UTC](https://discourse.slicer.org/t/slicer-build-failed-on-mac-os-10-12-sierra/445/5 "2017-06-12T15:14:56Z")

</div>

> [@mschumaker](#):
>
> What’s interesting is that, even when I set it to the Debug build type, the directories of python-source-done and python-configure in the error are still “Release”. Is there a mistake in the configuration script?

No, Slicer [always builds python in Release](https://github.com/Slicer/Slicer/blob/a27c91d2adbd390b7524f1c41aa1d4d3e4fc3e4e/SuperBuild/External_python.cmake#L104-L111) (IIRC because of symbol export variations when built in debug).

For what it’s worth, I did a successful clean build of all python dependencies (`rm python-*` in the superbuild folder) in a Release build on Sierra within the past two weeks, and my folders look like this:

```auto
:r4nj inorton$ ls python-source-prefix/src/python-source-stamp/
download-python-source.cmake	python-source-configure python-source-install python-source-update
extract-python-source.cmake	python-source-done python-source-mkdir python-source-urlinfo.txt
python-source-build python-source-download python-source-patch verify-python-source.cmake

```

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [June 25, 2018, 12:20pm UTC](https://discourse.slicer.org/t/slicer-build-failed-on-mac-os-10-12-sierra/445/6 "2018-06-25T12:20:20Z")

</div>

A post was split to a new topic: [Slicer build error on MacOSX in DCMTK](https://discourse.slicer.org/t/slicer-build-error-on-macosx-in-dcmtk/3277)
