# Build on MacOS10.15

**URL:** <https://discourse.slicer.org/t/build-on-macos10-15/9070>\
**Category:** Development\
**Tags:** build\
**Created:** [November 7, 2019, 7:58pm UTC](https://discourse.slicer.org/t/build-on-macos10-15/9070 "2019-11-07T19:58:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![radiosp412](https://avatars.discourse-cdn.com/v4/letter/r/a88e4f/32.png) [@radiosp412](https://discourse.slicer.org/u/radiosp412)\
**Post date:** [November 7, 2019, 7:58pm UTC](https://discourse.slicer.org/t/build-on-macos10-15/9070/1 "2019-11-07T19:58:55Z")

</div>

I am having difficulty building Slicer. My system configuration is as follows

MacBook Pro 2017 , 2.3 GHz Dual-Core Intel Core i5  
MacOS. 10.15.1  
Xcode 11.2

After cloning slicer, I execute the following commands in a terminal window

mkdir DebugXcode  
cd DebugXcode  
cmake -Xcode -DCMAKE\_BUILD\_TYPE:STRING=DEBUG -DQt5\_DIR:PATH=/Users/radiosp/Development/Qt/5.11.2/clang\_64/lib/cmake/Qt5 -DCMAKE\_OSX\_DEPLOYMENT\_TARGET:STRING=10.15 -DSlicer\_USE\_PYTHONQT\_WITH\_TCL:BOOL=OFF …

CMake ran to completion w/o errors or warnings. I then opened the Slicer.xcodeproj file and selected the build icon. After about 30 min the build crapped out during the python build with the following error

cd /Users/radiosp/Development/Slicer/DebugXcode/python-build/bin && env DYLD\_LIBRARY\_PATH=/Users/radiosp/Development/Slicer/DebugXcode/python-build/lib /Users/radiosp/Development/Slicer/DebugXcode/python-build/bin/Release/python -E -S -m sysconfig --generate-posix-vars  
dyld: Library not loaded: /Users/radiosp/Development/Slicer/DebugXcode/python-install/lib/libpython3.6m.dylib  
Referenced from: /Users/radiosp/Development/Slicer/DebugXcode/python-build/bin/Release/python  
Reason: image not found  
/bin/sh: line 1: 91877 Abort trap: 6 env DYLD\_LIBRARY\_PATH=/Users/radiosp/Development/Slicer/DebugXcode/python-build/lib /Users/radiosp/Development/Slicer/DebugXcode/python-build/bin/Release/python -E -S -m sysconfig --generate-posix-vars  
make[1]: \*\*\* [/Users/radiosp/Development/Slicer/DebugXcode/python-build/bin/pybuilddir.txt] Error 134  
Command /bin/sh failed with exit code 2

Apparently it is looking for a library in the python-install directory which does not exist at this point.

Please advise

---

<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:** [November 8, 2019, 12:33am UTC](https://discourse.slicer.org/t/build-on-macos10-15/9070/2 "2019-11-08T00:33:30Z")

</div>

I’ve never tried Slicer with the cmake Xcode generator. If you just use the default Makefiles and then use make to build it should work. You can still use Xcode for debugging.

Here’s an example command I use:

```auto
cmake \
	-DCMAKE_BUILD_TYPE:STRING=Debug \
	-DQt5_VERSION:STRING=5.12 \
	-DSlicer_REQUIRED_QT_VERSION:STRING=5.12 \
	-DQt5_DIR:PATH=/usr/local/opt/qt5/lib/cmake/Qt5 \
	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.14 \
	../Slicer

```
