# Problem building ROOT 6.12 on Mac OS X High Sierra

**URL:** <https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797>\
**Category:** ROOT\
**Created:** [April 24, 2018, 10:56am UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797 "2018-04-24T10:56:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![heico](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/e36b37/32.png) [@heico](https://root-forum.cern.ch/u/heico)\
**Post date:** [April 24, 2018, 10:56am UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797/1 "2018-04-24T10:56:19Z")

</div>

Dear experts.

I try to build ROOT (6.12.06) on my Mac (OS X High Sierra 10.13.4) following the instructions in [1]  
using cmake (3.11.1). However, I get the following error:

> clang++ -m64 -std=c++11 -stdlib=libc++ -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -MMD -MP -I. -o hist/unfold/src/G\_\_Unfold.o -c hist/unfold/src/G\_\_Unfold.cxx  
> clang++ -dynamiclib -single\_module -Wl,-dead\_strip\_dylibs -install\_name @rpath/libUnfold.so -O2 -DNDEBUG -m64 -mmacosx-version-min=10.13 -stdlib=libc++ -Wl,-rpath,@loader\_path/…/lib -o lib/libUnfold.so hist/unfold/src/TUnfold.o hist/unfold/src/TUnfoldBinning.o hist/unfold/src/TUnfoldBinningXML.o hist/unfold/src/TUnfoldDensity.o hist/unfold/src/TUnfoldSys.o hist/unfold/src/G\_\_Unfold.o -ldl -Llib -lCore -Llib -lHist -lMatrix -lXMLParser  
> ld: library not found for -lXMLParser  
> clang: error: linker command failed with exit code 1 (use -v to see invocation)  
> make: \*\*\* [lib/libUnfold.so] Error 1

I browsed through ROOT forum entries, found [2] and tried to compile with

```auto
cmake --build . -- -j1

```

as suggested but it didn’t help.

Am I missing a library? Before compilation I installed “libxml2” via homebrew (hoping it is the correct XML library).

Thanks for any suggestion (and sorry if I missed any forum entry that covers this problem already, though I have been searching…)

Regards,  
heico

[1] - [Building ROOT from source - ROOT](https://root.cern.ch/building-root)  
[2] - [Cannot find -lXMLParser while installing ROOT: Release 6.10/06 - 2017-09-19](https://root-forum.cern.ch/t/cannot-find-lxmlparser-while-installing-root-release-6-10-06-2017-09-19/26542)

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [April 24, 2018, 11:03am UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797/2 "2018-04-24T11:03:23Z")

</div>

Please attach the whole build log. The real error probably happened when building libXMLParser (which is now not found).

---

<div class="post-metadata">

**Author:** ![heico](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/e36b37/32.png) [@heico](https://root-forum.cern.ch/u/heico)\
**Post date:** [April 24, 2018, 11:09am UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797/3 "2018-04-24T11:09:15Z")

</div>

I attached the log to this reply.

heico  
[buildlog.txt](https://root-forum.cern.ch/uploads/default/original/3X/2/3/23bba3cec13cc54f5a1120e916baa98441c7338e.txt) (399.7 KB)

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [April 24, 2018, 11:16am UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797/4 "2018-04-24T11:16:21Z")

</div>

It looks like we may still have problems with build dependencies in ROOT 6.12. Could you please try building XMLParser first, then the remaining of the build, as shown below? Thanks!

```auto
$ cmake --build . --target XMLParser
$ cmake --build .

```

---

<div class="post-metadata">

**Author:** ![heico](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/e36b37/32.png) [@heico](https://root-forum.cern.ch/u/heico)\
**Post date:** [April 24, 2018, 11:21am UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797/5 "2018-04-24T11:21:38Z")

</div>

The first command gives me this:

> root-6.12.06 conni$ cmake --build . --target XMLParser  
> clang -O2 -DNDEBUG -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude -pthread -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/cppsetup.o -c /Users/conni/Software/root-6.12.06/build/rmkdepend/cppsetup.c  
> clang -O2 -DNDEBUG -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude -pthread -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/ifparser.o -c /Users/conni/Software/root-6.12.06/build/rmkdepend/ifparser.c  
> clang -O2 -DNDEBUG -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude -pthread -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/include.o -c /Users/conni/Software/root-6.12.06/build/rmkdepend/include.c  
> clang -O2 -DNDEBUG -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude -pthread -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/main.o -c /Users/conni/Software/root-6.12.06/build/rmkdepend/main.c  
> clang -O2 -DNDEBUG -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude -pthread -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/parse.o -c /Users/conni/Software/root-6.12.06/build/rmkdepend/parse.c  
> clang -O2 -DNDEBUG -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude -pthread -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/pr.o -c /Users/conni/Software/root-6.12.06/build/rmkdepend/pr.c  
> clang++ -O2 -DNDEBUG -m64 -std=c++11 -stdlib=libc++ -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/mainroot.o -c /Users/conni/Software/root-6.12.06/build/rmkdepend/mainroot.cxx  
> clang++ -O2 -DNDEBUG -m64 -mmacosx-version-min=10.13 -stdlib=libc++ -Wl,-rpath,@loader\_path/…/lib -o bin/rmkdepend build/rmkdepend/cppsetup.o build/rmkdepend/ifparser.o build/rmkdepend/include.o build/rmkdepend/main.o build/rmkdepend/parse.o build/rmkdepend/pr.o build/rmkdepend/mainroot.o  
> make: \*\*\* No rule to make target `XMLParser’. Stop.

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [April 24, 2018, 11:23am UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797/6 "2018-04-24T11:23:39Z")

</div>

I see. You may have inconsistent settings for XML if you installed libxml2 after a failure to build. Maybe enabling it back can help:

```auto
$ cmake . -Dxml=ON
$ cmake --build . --target XMLParser

```

---

<div class="post-metadata">

**Author:** ![heico](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/e36b37/32.png) [@heico](https://root-forum.cern.ch/u/heico)\
**Post date:** [April 24, 2018, 9:20pm UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797/7 "2018-04-24T21:20:54Z")

</div>

Dear amadio,

Sorry for getting back to this only now, haven’t had time earlier unfortunately.

With your latest suggestion it worked, though I had to execute the first command (cmake . -Dxml=ON) in a separate directory as cmake did not want to spoil the source folder with the build.

So for reference and in case somebody else has similar issues, I did:

```auto
mkdir rootbuild
cd rootbuild
cmake ../root-6.12.06/ -Dxml=ON
cmake --build . --target XMLParser
cmake --build .

```

Thanks so much!

Cheers,  
heico

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [April 24, 2018, 9:23pm UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797/8 "2018-04-24T21:23:38Z")

</div>

No problem, I’m glad I could help. I bet that you could just have proceeded normally once you already had libxml2 installed. The problem was probably a bad cache due to installing things after configuring. Let us know if you encounter problems in the future. Cheers,

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [May 8, 2018, 9:33pm UTC](https://root-forum.cern.ch/t/problem-building-root-6-12-on-mac-os-x-high-sierra/28797/9 "2018-05-08T21:33:08Z")

</div>

Closed on May 8, 2018, 9:33pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
