Compilation problem with: OS Sierra, Xcode 8, ROOT 6.06.08

I’m using with OS: MAC Sierra 10.12.1
Xcode: 8.0
I’ve installed: xcode-select --install
I’m trying to compile: root_v6.06.08
I’m configuring root with the following command:
./configure macosx64 --enable-cocoa --enable-roofit --enable-minuit2 --with-gsl-incdir=/Users/dinardo/GSL_v2.01/include --with-gsl-libdir=/Users/dinardo/GSL_v2.01/lib

After running make I get the following message:
clang++ -dynamiclib -single_module -undefined suppress -install_name /Users/dinardo/root/lib/libCore.dylib -O2 -DNDEBUG -m64 -mmacosx-version-min=10.12 -stdlib=libc++ -Wl,-rpath,@loader_path/…/lib -bind_at_load -o lib/libCore.dylib core/base/src/G__Core.o core/base/src/InitGui.o core/base/src/Match.o core/base/src/String.o core/base/src/Stringio.o core/base/src/TApplication.o core/base/src/TApplicationImp.o core/base/src/TAtt3D.o core/base/src/TAttAxis.o core/base/src/TAttBBox.o core/base/src/TAttBBox2D.o core/base/src/TAttFill.o core/base/src/TAttLine.o core/base/src/TAttMarker.o core/base/src/TAttPad.o core/base/src/TAttText.o core/base/src/TBase64.o core/base/src/TBenchmark.o core/base/src/TBrowser.o core/base/src/TBrowserImp.o core/base/src/TBuffer.o core/base/src/TBuffer3D.o core/base/src/TCanvasImp.o core/base/src/TColor.o core/base/src/TColorGradient.o core/base/src/TContextMenu.o core/base/src/TContextMenuImp.o core/base/src/TControlBarImp.o core/base/src/TDatime.o core/base/src/TDirectory.o core/base/src/TEnv.o core/base/src/TError.o core/base/src/TException.o core/base/src/TExec.o core/base/src/TFileCollection.o core/base/src/TFileInfo.o core/base/src/TFolder.o core/base/src/TGuiFactory.o core/base/src/TInetAddress.o core/base/src/TInspectorImp.o core/base/src/TListOfTypes.o core/base/src/TMD5.o core/base/src/TMacro.o core/base/src/TMathBase.o core/base/src/TMemberInspector.o core/base/src/TMessageHandler.o core/base/src/TNamed.o core/base/src/TObjString.o core/base/src/TObject.o core/base/src/TObjectSpy.o core/base/src/TPRegexp.o core/base/src/TParameter.o core/base/src/TPluginManager.o core/base/src/TProcessID.o core/base/src/TProcessUUID.o core/base/src/TQCommand.o core/base/src/TQConnection.o core/base/src/TQObject.o core/base/src/TROOT.o core/base/src/TRef.o core/base/src/TRefCnt.o core/base/src/TRegexp.o core/base/src/TRemoteObject.o core/base/src/TStopwatch.o core/base/src/TStorage.o core/base/src/TString.o core/base/src/TStringLong.o core/base/src/TStyle.o core/base/src/TSysEvtHandler.o core/base/src/TSystem.o core/base/src/TSystemDirectory.o core/base/src/TSystemFile.o core/base/src/TTask.o core/base/src/TTime.o core/base/src/TTimeStamp.o core/base/src/TTimer.o core/base/src/TUUID.o core/base/src/TUri.o core/base/src/TUrl.o core/base/src/TVirtualFFT.o core/base/src/TVirtualGL.o core/base/src/TVirtualMonitoring.o core/base/src/TVirtualMutex.o core/base/src/TVirtualPS.o core/base/src/TVirtualPad.o core/base/src/TVirtualPadEditor.o core/base/src/TVirtualPadPainter.o core/base/src/TVirtualPerfStats.o core/base/src/TVirtualViewer3D.o core/base/src/TVirtualX.o core/cont/src/TArray.o core/cont/src/TArrayC.o core/cont/src/TArrayD.o core/cont/src/TArrayF.o core/cont/src/TArrayI.o core/cont/src/TArrayL.o core/cont/src/TArrayL64.o core/cont/src/TArrayS.o core/cont/src/TBits.o core/cont/src/TBtree.o core/cont/src/TClassTable.o core/cont/src/TClonesArray.o core/cont/src/TCollection.o core/cont/src/TExMap.o core/cont/src/THashList.o core/cont/src/THashTable.o core/cont/src/TIterator.o core/cont/src/TList.o core/cont/src/TMap.o core/cont/src/TObjArray.o core/cont/src/TObjectTable.o core/cont/src/TOrdCollection.o core/cont/src/TRefArray.o core/cont/src/TRefTable.o core/cont/src/TSeqCollection.o core/cont/src/TSortedList.o core/meta/src/TBaseClass.o core/meta/src/TClass.o core/meta/src/TClassGenerator.o core/meta/src/TClassMenuItem.o core/meta/src/TClassRef.o core/meta/src/TDataMember.o core/meta/src/TDataType.o core/meta/src/TDictAttributeMap.o core/meta/src/TDictionary.o core/meta/src/TEnum.o core/meta/src/TEnumConstant.o core/meta/src/TFunction.o core/meta/src/TFunctionTemplate.o core/meta/src/TGenericClassInfo.o core/meta/src/TGlobal.o core/meta/src/TInterpreter.o core/meta/src/TIsAProxy.o core/meta/src/TListOfDataMembers.o core/meta/src/TListOfEnums.o core/meta/src/TListOfEnumsWithLock.o core/meta/src/TListOfFunctionTemplates.o core/meta/src/TListOfFunctions.o core/meta/src/TMethod.o core/meta/src/TMethodArg.o core/meta/src/TMethodCall.o core/meta/src/TProtoClass.o core/meta/src/TRealData.o core/meta/src/TSchemaRule.o core/meta/src/TSchemaRuleSet.o core/meta/src/TStreamerElement.o core/meta/src/TToggle.o core/meta/src/TToggleGroup.o core/meta/src/TViewPubDataMembers.o core/meta/src/TViewPubFunctions.o core/meta/src/TVirtualStreamerInfo.o core/unix/src/TUnixSystem.o core/macosx/src/CocoaUtils.o core/macosx/src/TMacOSXSystem.o core/zip/src/ZDeflate.o core/zip/src/ZInflate.o core/zip/src/RZip.o core/zip/src/Compression.o core/lzma/src/ZipLZMA.o core/clib/src/Demangle.o core/clib/src/attach.o core/clib/src/detach.o core/clib/src/getpagesize.o core/clib/src/keys.o core/clib/src/mcalloc.o core/clib/src/mfree.o core/clib/src/mmalloc.o core/clib/src/mmapsup.o core/clib/src/mmcheck.o core/clib/src/mmemalign.o core/clib/src/mmstats.o core/clib/src/mmtrace.o core/clib/src/mrealloc.o core/clib/src/mvalloc.o core/clib/src/sbrksup.o core/clib/src/snprintf.o core/clib/src/strlcat.o core/clib/src/strlcpy.o core/metautils/src/RConversionRuleParser.o core/metautils/src/TClassEdit.o core/textinput/src/Getline.o core/textinput/src/Getline_color.o core/textinput/src/textinput/Editor.o core/textinput/src/textinput/History.o core/textinput/src/textinput/KeyBinding.o core/textinput/src/textinput/Range.o core/textinput/src/textinput/SignalHandler.o core/textinput/src/textinput/StreamReader.o core/textinput/src/textinput/StreamReaderUnix.o core/textinput/src/textinput/StreamReaderWin.o core/textinput/src/textinput/TerminalConfigUnix.o core/textinput/src/textinput/TerminalDisplay.o core/textinput/src/textinput/TerminalDisplayUnix.o core/textinput/src/textinput/TerminalDisplayWin.o core/textinput/src/textinput/TextInput.o core/textinput/src/textinput/TextInputContext.o -ldl -Llib -lCore -framework Cocoa -lz lib/liblzma.a lib/libpcre.a
ld: library not found for -lCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lib/libCore.dylib] Error 1

Can you please help me to solve this issue ?
Many thanks and kind regards,

  • Mauro.

Try to use cmake instead of configure

mkdir root_bld
cd root_bld
cmake ../root_src
make -j4

many thanks.
I’ll try that. Can you please tell me how can i give to
cmake the same options that I used to use for configure ?


  • Mauro.

Check the flags here:


cmake -D roofit=On ../root_src

cmake is not working for me on Sierra 10.12.1. That’s what I did:

mkdir root_bld
cd root_bld/
cd root_bld/
cmake …/root-6.06.08 -DCMAKE_INSTALL_PREFIX=/usr/local/root -Droofit=ON -Dtmva=ON -j 4
make -j 4


In file included from input_line_12:6:
In file included from /Users/lista/Desktop/root_bld/include/TKSocket.h:10:
In file included from /Users/lista/Desktop/root_bld/include/Krb5Auth.h:47:
/opt/local/include/krb5/krb5.h:8020:10: fatal error: ‘et/com_err.h’ file not found
#include <et/com_err.h>

Any clue?


Hi Luca,

I see that you have software installed in /opt/local probably installed by MacPorts. So, I would recommend to avoid looking for software in this area by adding the option -Dmacos_native=ON. This should work for the 6.08 candidate release and master.


Better don’t use -j4 when using cmake, just when using make.

Did you check the prerequisites?

Try as workaround maybe:

cmake ../root-6.06.08 -DCMAKE_INSTALL_PREFIX=/usr/local/root -Droofit=ON -Dtmva=ON -Dkrb5=OFF

I manage to compile and run ROOT by disabling krb5 and using macos_native:

cmake …/root-6.06.08 -DCMAKE_INSTALL_PREFIX=/usr/local/root -Droofit=ON -Dtmva=ON -Dmacos_native=ON -Dkrb5=OFF

Unfortunately, TCanvas or TBrowser don’t display.

Do you have any clue?


… I also tried to save a Canvas to an output file:


but the file is not created, and no error message is displayed.

Hi Luca,
Can you attack the output of the cmake command when executed on a clean build area?


In attachment is output of:

cmake …/root-6.06.08 -DCMAKE_INSTALL_PREFIX=/usr/local/root -Droofit=ON -Dtmva=ON -Dkrb5=OFF > cmake.txt


cmake.txt (8.47 KB)

… I tried with and without -Dmacos_native=ON, the result seems identical.

I also completely scratched /opt/local, recompiled, and still have no output, neither on screen, nor if I try to save to a file. I’m puzzled…

Maybe something is happening with the DISPLAY environmental variable? What does “printenv” tell you?

CMake already tells you that you will not have graphics output (x11)

-- Building LZMA version 5.2.1 included in ROOT itself -- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR) ... -- Enabled support for: asimage astiff bonjour builtin_afterimage builtin_ftgl builtin_freetype builtin_glew builtin_pcre builtin_lzma builtin_llvm cxx11 libcxx cling cocoa exceptions explicitlink fortran genvector ldap memstat opengl pch python roofit shared sqlite ssl thread tmva vdt xml

Compare with mine:

-- Building LZMA version 5.2.1 included in ROOT itself -- Looking for X11 -- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR) ... -- Enabled support for: asimage astiff bonjour builtin_afterimage builtin_ftgl builtin_gl2ps builtin_glew builtin_unuran builtin_lzma builtin_llvm cxx14 ccache cling exceptions explicitlink fftw3 fitsio fortran gviz genvector http krb5 ldap mathmore memstat mysql opengl pch python root7 shadowpw shared ssl thread tmva vdt xft xml x11

I have:


I can run xeyes. But, shouldn’t I be using cocoa instead of X11?

Ah, ok, sorry, I was thinking about Linux… No idea then

… by the way: the only thing that works is saving files in PNG format using root -b. PDF is ignored, no hope to have any display other than the initial ROOT splash screen, which I can see correctly.

Hi Luca,
I first started this thread, and after the first few posts I managed to run everything smoothly.

Unfortunately I’m not next to my laptop in these days, therefore I can’t tell you exactly which were my cmake options.

I can certainly tell you that to enable cocoa I used the option:
-D cocoa=ON


  • Mauro.

Hi Mauro,

I also tried with -Dcocoa=ON but I get the same problems.


Hi Luca,
I have upgraded by mac to Sierra to try to see if I have a similar problem, which is not the case. ‘cocoa’ is default for Mac, so you do not need to set it. I understand that you cleared the complete area of /opt/local. It must me a difference between your system and mine. So, lets debug it.

  • Send me the file CMakeCache.txt after a configuration with cmake in a clean area.
  • Do you have a .rootrc in $HOME or in the CWD?
  • Have to changed anything in SIP (System Integrity Protection)?