Problem building ROOT 6.12 on Mac OS X High Sierra

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

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] - https://root.cern.ch/building-root
[2] - Cannot find -lXMLParser while installing ROOT: Release 6.10/06 - 2017-09-19

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

I attached the log to this reply.

heico
buildlog.txt (399.7 KB)

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!

$ cmake --build . --target XMLParser
$ cmake --build .

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.

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

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

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:

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

Thanks so much!

Cheers,
heico

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,

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