# Building Slicer on El Capitan

**URL:** <https://discourse.slicer.org/t/building-slicer-on-el-capitan/345>\
**Category:** Development\
**Created:** [May 19, 2017, 4:09pm UTC](https://discourse.slicer.org/t/building-slicer-on-el-capitan/345 "2017-05-19T16:09:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xliu](https://avatars.discourse-cdn.com/v4/letter/x/ecccb3/32.png) [@xliu](https://discourse.slicer.org/u/xliu)\
**Post date:** [May 19, 2017, 4:09pm UTC](https://discourse.slicer.org/t/building-slicer-on-el-capitan/345/1 "2017-05-19T16:09:05Z")

</div>

Hi all,

I am trying to build Slicer on my Mac. ~~Qt4 installer does not work on El Capitan. I have tried homebrew, but it only installs Qt5 now. I also tried compile Qt4 with the homebrew patch, still failed. Is there any other way to get Qt4 working?~~

I have successfully installed Qt4 with ‘brew install cartr/qt4/qt’ according to the post [http://slicer-devel.65872.n3.nabble.com/Struggling-with-Sierra-build-td4037945.html](http://slicer-devel.65872.n3.nabble.com/Struggling-with-Sierra-build-td4037945.html). Thanks Christian!  
While building Slicer, I run into the error “This platform’s pyconfig.h needs to define PY\_FORMAT\_LONG\_LONG”. I tried configure python-cmake-buildsystem directly but still got the same error. Anyone has any idea why?

Thanks

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [May 19, 2017, 5:31pm UTC](https://discourse.slicer.org/t/building-slicer-on-el-capitan/345/2 "2017-05-19T17:31:43Z")

</div>

Hi xliu,

~~Would be great to share the error so that other building on MacOSX can help you.~~

Also since we build the official Slicer installer on a older MacOSX, we do not have a regularly tested solution.

As a side note, we are also actively working on finalizing the transition to Qt5.

Jc

---

<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 19, 2017, 5:58pm UTC](https://discourse.slicer.org/t/building-slicer-on-el-capitan/345/3 "2017-05-19T17:58:23Z")

</div>

I haven’t build Qt4 from scratch on mac osx for quite a while. It used to work but it’s entirely possible that it no longer works.

Following up on Jc’s note, it is possible to build mostly-working Slicer using the regular Qt5 download binaries.

[https://www.slicer.org/wiki/Documentation/Labs/Qt5](https://www.slicer.org/wiki/Documentation/Labs/Qt5)

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [May 19, 2017, 7:35pm UTC](https://discourse.slicer.org/t/building-slicer-on-el-capitan/345/4 "2017-05-19T19:35:12Z")

</div>

@che85 also reported problems building on El Capitan that he could not resolve.

---

<div class="post-metadata">

**Author:** ![che85](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/che85/32/636_2.png) [@che85](https://discourse.slicer.org/u/che85)\
**Post date:** [May 19, 2017, 8:09pm UTC](https://discourse.slicer.org/t/building-slicer-on-el-capitan/345/5 "2017-05-19T20:09:55Z")

</div>

I don’t use El Capitan anymore. I am sure that you can specify the version of qt when using brew.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [May 19, 2017, 8:27pm UTC](https://discourse.slicer.org/t/building-slicer-on-el-capitan/345/6 "2017-05-19T20:27:34Z")

</div>

Ah, I forgot that El Capitan is no longer the latest one.

Does it work for you on Sierra Christian?

---

<div class="post-metadata">

**Author:** ![che85](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/che85/32/636_2.png) [@che85](https://discourse.slicer.org/u/che85)\
**Post date:** [May 19, 2017, 11:12pm UTC](https://discourse.slicer.org/t/building-slicer-on-el-capitan/345/7 "2017-05-19T23:12:10Z")

</div>

On Sierra it works.

Take a look at this post:

[http://slicer-devel.65872.n3.nabble.com/Struggling-with-Sierra-build-td4037945.html](http://slicer-devel.65872.n3.nabble.com/Struggling-with-Sierra-build-td4037945.html)
