# Can't build root 6 on macOS sierra 10.12.1

**URL:** <https://root-forum.cern.ch/t/cant-build-root-6-on-macos-sierra-10-12-1/22129>\
**Category:** ROOT\
**Created:** [October 31, 2016, 8:53am UTC](https://root-forum.cern.ch/t/cant-build-root-6-on-macos-sierra-10-12-1/22129 "2016-10-31T08:53:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbittric](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/f08c70/32.png) [@cbittric](https://root-forum.cern.ch/u/cbittric)\
**Post date:** [October 31, 2016, 8:53am UTC](https://root-forum.cern.ch/t/cant-build-root-6-on-macos-sierra-10-12-1/22129/1 "2016-10-31T08:53:04Z")

</div>

Hi all,

after updating to 10.12.1 I was trying to build root6 and had quite some problems with it. The main problem seems to be, that it can’t build freetype (and it doesn’t accept my already installed freetype version).

After several tries, here is what I tried in the end:

`
git clone http://root.cern.ch/git/root.git root
mkdir root-built10
cd root-built10
cmake -DLZMA_INCLUDE_DIR=/usr/local/include -DLZMA_LIBRARY=/usr/local/lib/liblzma.dylib -DPCRE_INCLUDE_DIR=/usr/local/Cellar/pcre/8.39/include -DPCRE_LIBRARY=/usr/local/lib/libpcre.dylib -Dlibcxx=ON -Dmacos_native=ON -Dcocoa=ON ../root > cmake.log`  
I also had problems with lzma and pcre before and installed them using brew. See also the attached log

The building crashed at about 61%, when trying to install freetype. I think this is the problematic part of the log, but I also attached the full log for freetype.

Maybe anyone has an idea how to fix this?

Thanks,  
Carsten

* * *

Btw: I already tried several other methods. I was able to build root-6.06.08 using xcode (cmake -G Xcode …), but then I couldn’t create any TBrowser, pdf, or similar. (As already mentioned by llista here: [Compilation problem with: OS Sierra, Xcode 8, ROOT 6.06.08](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/1))  
[freetype\_config.txt](https://root-forum.cern.ch/uploads/default/original/2X/e/e9aa94e66d7c8610da008e29627b2981dbab502f.txt) (8.35 KB)  
[cmake.txt](https://root-forum.cern.ch/uploads/default/original/2X/5/534635883ae1d1598be546de4cf5e05c0347d2a2.txt) (11 KB)

---

<div class="post-metadata">

**Author:** ![mato](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mato/32/12317_2.png) [@mato](https://root-forum.cern.ch/u/mato)\
**Post date:** [November 1, 2016, 8:56am UTC](https://root-forum.cern.ch/t/cant-build-root-6-on-macos-sierra-10-12-1/22129/2 "2016-11-01T08:56:03Z")

</div>

After upgrading the MacOS you need to ‘re-install’ the Xcode command line tools. After the upgrade the directory /usr/include is gone ☹ , which should have essential C header files like stdio.h. Just execute:

```auto
xcode-select --install
```

---

<div class="post-metadata">

**Author:** ![cbittric](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/f08c70/32.png) [@cbittric](https://root-forum.cern.ch/u/cbittric)\
**Post date:** [November 1, 2016, 9:57am UTC](https://root-forum.cern.ch/t/cant-build-root-6-on-macos-sierra-10-12-1/22129/3 "2016-11-01T09:57:17Z")

</div>

Well that was a surprisingly (and embarrassingly) easy solution. I was convinced I already did reinstall Xcode. Turns out, I didn’t and this fixed my problem.  
Thanks!
