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

**URL:** <https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102>\
**Category:** ROOT\
**Created:** [October 25, 2016, 10:50am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102 "2016-10-25T10:50:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauroroot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/7c8e57/32.png) [@mauroroot](https://root-forum.cern.ch/u/mauroroot)\
**Post date:** [October 25, 2016, 10:50am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/1 "2016-10-25T10:50:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [October 25, 2016, 11:01am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/2 "2016-10-25T11:01:18Z")

</div>

Try to use cmake instead of configure  
[root.cern.ch/building-root](https://root.cern.ch/building-root)

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

---

<div class="post-metadata">

**Author:** ![mauroroot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/7c8e57/32.png) [@mauroroot](https://root-forum.cern.ch/u/mauroroot)\
**Post date:** [October 25, 2016, 11:18am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/3 "2016-10-25T11:18:30Z")

</div>

Hi,  
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 ?

Regards,

- Mauro.

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [October 25, 2016, 11:37am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/4 "2016-10-25T11:37:43Z")

</div>

Check the flags here:  
[root.cern.ch/building-root](https://root.cern.ch/building-root)

e.g.

```auto
cmake -D roofit=On ../root_src
```

---

<div class="post-metadata">

**Author:** ![luca.lista](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/6f9a4e/32.png) [@luca.lista](https://root-forum.cern.ch/u/luca.lista)\
**Post date:** [October 25, 2016, 1:32pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/5 "2016-10-25T13:32:37Z")

</div>

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?

Luca

---

<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:** [October 25, 2016, 2:50pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/6 "2016-10-25T14:50:04Z")

</div>

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.

Pere

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [October 25, 2016, 2:51pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/7 "2016-10-25T14:51:13Z")

</div>

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

Did you check the prerequisites?  
[root.cern.ch/build-prerequisites](https://root.cern.ch/build-prerequisites)

Try as workaround maybe:

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

---

<div class="post-metadata">

**Author:** ![llista](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@llista](https://root-forum.cern.ch/u/llista)\
**Post date:** [October 27, 2016, 8:21am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/8 "2016-10-27T08:21:32Z")

</div>

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?

Luca

---

<div class="post-metadata">

**Author:** ![llista](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@llista](https://root-forum.cern.ch/u/llista)\
**Post date:** [October 27, 2016, 8:23am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/9 "2016-10-27T08:23:36Z")

</div>

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

c1-\>SaveAs(“c1.pdf”)

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

---

<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:** [October 27, 2016, 8:54am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/10 "2016-10-27T08:54:38Z")

</div>

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

Pere

---

<div class="post-metadata">

**Author:** ![llista](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@llista](https://root-forum.cern.ch/u/llista)\
**Post date:** [October 27, 2016, 9:45am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/11 "2016-10-27T09:45:12Z")

</div>

In attachment is output of:

cmake …/root-6.06.08 -DCMAKE\_INSTALL\_PREFIX=/usr/local/root -Droofit=ON -Dtmva=ON -Dkrb5=OFF \> cmake.txt

Luca

[cmake.txt](https://root-forum.cern.ch/uploads/default/original/2X/5/5c0b58ccc6b603ab21e0adb78cf19fefd14a984c.txt) (8.47 KB)

---

<div class="post-metadata">

**Author:** ![llista](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@llista](https://root-forum.cern.ch/u/llista)\
**Post date:** [October 27, 2016, 9:46am UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/12 "2016-10-27T09:46:12Z")

</div>

… I tried with and without -Dmacos\_native=ON, the result seems identical.

---

<div class="post-metadata">

**Author:** ![llista](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@llista](https://root-forum.cern.ch/u/llista)\
**Post date:** [October 28, 2016, 12:17pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/13 "2016-10-28T12:17:45Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [October 28, 2016, 12:45pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/14 "2016-10-28T12:45:41Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![llista](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@llista](https://root-forum.cern.ch/u/llista)\
**Post date:** [October 28, 2016, 12:53pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/15 "2016-10-28T12:53:07Z")

</div>

I have:

DISPLAY=/private/tmp/com.apple.launchd.kFaP4d1HsI/org.macosforge.xquartz:0

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

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [October 28, 2016, 12:55pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/16 "2016-10-28T12:55:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![llista](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@llista](https://root-forum.cern.ch/u/llista)\
**Post date:** [October 28, 2016, 1:35pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/17 "2016-10-28T13:35:03Z")

</div>

… 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.

---

<div class="post-metadata">

**Author:** ![mauroroot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/7c8e57/32.png) [@mauroroot](https://root-forum.cern.ch/u/mauroroot)\
**Post date:** [October 28, 2016, 4:42pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/18 "2016-10-28T16:42:23Z")

</div>

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

Cheers,

- Mauro.

---

<div class="post-metadata">

**Author:** ![llista](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@llista](https://root-forum.cern.ch/u/llista)\
**Post date:** [November 4, 2016, 12:26pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/19 "2016-11-04T12:26:32Z")

</div>

Hi Mauro,

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

luca

---

<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 4, 2016, 1:49pm UTC](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102/20 "2016-11-04T13:49:04Z")

</div>

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)?

[Next page](https://root-forum.cern.ch/t/compilation-problem-with-os-sierra-xcode-8-root-6-06-08/22102.md?page=2)
