Can compile root_v5.34/36 on Yosemite but not on Sierra

Dear Rooters,

1, On Yosemite (MacOS 10.10.5) I have installed Xcode 7.1 with command line tools,
and gfortran from: … 13.tar.bz2

I could compile ROOT using:

./configure macosx64 --with-f77="/usr/local/bin/gfortran-4.8"
. bin/

Finally I could compile and install my R/Bioconductor package ‘xps’ which depends on ROOT.

2, On Sierra (macOS 10.12.2) I have installed Xcode 8.1 with command line tools,
and gfortran from:

Now I could compile ROOT with Cmake (as recommended) using:

mkdir /Volumes/T3Data/ROOT/root
cd /Volumes/T3Data/ROOT/root
cmake /Volumes/T3Data/ROOT/src/root
cmake --build .
. bin/

However, when trying to compile my R/Bioconductor package ‘xps’ which depends on ROOT
I get the following error from R CMD INSTALL:

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Users/rabbitus/Library/R/3.3/library/xps/libs/':
  dlopen(/Users/rabbitus/Library/R/3.3/library/xps/libs/, 6): Symbol not found: __ZN10TCanvasImp11ShowMembersER16TMemberInspector
  Referenced from: /Users/rabbitus/Library/R/3.3/library/xps/libs/
  Expected in: flat namespace
 in /Users/rabbitus/Library/R/3.3/library/xps/libs/
Error: loading failed

Could this problem be caused by mixing objects that compiled with libc++ and object
that compiled with libstdc++?

Thus, I tried to compile ROOT the old way using:

./configure macosx64 --with-cc=clang --with-cxx=clang++ --with-ld=clang++ --with-f77="/usr/local/gfortran/bin/gfortran"

Now I get the following error:

clang++ -O2 -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude   -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION    -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY  -I/Volumes/T3Data/ROOT/root/cint/cint/inc -I/Volumes/T3Data/ROOT/root/cint/cint/src -I/Volumes/T3Data/ROOT/root/cint/cint/src/dict -pthread -Icint/cint/lib/libcxxstrm -I. -o cint/cint/src/dict/libcxxstrm.o -c cint/cint/src/dict/libcxxstrm.cxx
clang++ -dynamiclib -single_module -undefined suppress -install_name /Volumes/T3Data/ROOT/root/lib/libCint.dylib -O2 -m64 -mmacosx-version-min=10.12 -Wl,-rpath,@loader_path/../lib -bind_at_load -o lib/libCint.dylib cint/cint/src/g__cfunc.o cint/cint/src/config/strlcpy.o cint/cint/src/config/strlcat.o cint/cint/src/config/snprintf.o cint/cint/main/G__setup.o cint/cint/src/Api.o cint/cint/src/BaseCls.o cint/cint/src/CallFunc.o cint/cint/src/Class.o cint/cint/src/DataMbr.o cint/cint/src/FastAllocString.o cint/cint/src/Method.o cint/cint/src/MethodAr.o cint/cint/src/Shadow.o cint/cint/src/Token.o cint/cint/src/Type.o cint/cint/src/Typedf.o cint/cint/src/auxu.o cint/cint/src/bc_assign.o cint/cint/src/bc_autoobj.o cint/cint/src/bc_cfunc.o cint/cint/src/bc_debug.o cint/cint/src/bc_eh.o cint/cint/src/bc_exec.o cint/cint/src/bc_inst.o cint/cint/src/bc_item.o cint/cint/src/bc_parse.o cint/cint/src/bc_reader.o cint/cint/src/bc_type.o cint/cint/src/bc_vtbl.o cint/cint/src/cast.o cint/cint/src/debug.o cint/cint/src/decl.o cint/cint/src/disp.o cint/cint/src/dump.o cint/cint/src/end.o cint/cint/src/error.o cint/cint/src/expr.o cint/cint/src/fread.o cint/cint/src/func.o cint/cint/src/gcoll.o cint/cint/src/global1.o cint/cint/src/global2.o cint/cint/src/ifunc.o cint/cint/src/inherit.o cint/cint/src/init.o cint/cint/src/input.o cint/cint/src/intrpt.o cint/cint/src/loadfile.o cint/cint/src/macro.o cint/cint/src/malloc.o cint/cint/src/memtest.o cint/cint/src/new.o cint/cint/src/newlink.o cint/cint/src/opr.o cint/cint/src/parse.o cint/cint/src/pause.o cint/cint/src/pcode.o cint/cint/src/pragma.o cint/cint/src/quote.o cint/cint/src/random.o cint/cint/src/rflx_gendict.o cint/cint/src/rflx_gensrc.o cint/cint/src/rflx_tools.o cint/cint/src/scrupto.o cint/cint/src/shl.o cint/cint/src/sizeof.o cint/cint/src/struct.o cint/cint/src/stub.o cint/cint/src/tmplt.o cint/cint/src/typedef.o cint/cint/src/val2a.o cint/cint/src/value.o cint/cint/src/var.o cint/cint/src/dict/Apiif.o cint/cint/src/dict/stdstrct.o cint/cint/src/dict/libcxxstrm.o -ldl -Llib -lCore -lCint
ld: library not found for -lCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lib/libCint.dylib] Error 1

Can someone tell me whether it is still possible to configure root for make (w/o the
need to downgrade to Xcode 7.1), and show me how to do it?

Thank you in advance.

Best regards

Hi Christian,
It seems the problem is that you need to link your module ‘’ with the ROOT libraries, in particular This is a must on MacOSX. Do you have access to the makefile of the eps package?
Cheers, Pere

Dear Pere,

Thank you for your reply. I have already thought that it may be a problem with the Makefile,
that I have created. It did work until now, but no longer with ROOT compiled with Cmake.

Maybe you could help me find the problem. For this reason I am attaching the Makefile together
with the Makefile.arch from ROOT which I have used all the time. (I have to add .txt otherwise I
cannot attach it.)

Thank you in advance.
Best regards
Makefile.arch.txt (12.9 KB)
Makefile.txt (3.7 KB)

First at all I would recommend that you switch to CMake for your project as well. It is clearly simpler than a Makefile and very portable (so no need to explicitly handle the platform idiosyncrasies). Some documentation exists here … ject-cmake

I guess the problem is that the link option ‘-undefined $(UNDEFOPT)’ is hiding any undefined during the build. So, first I would remove it, and then add the missing libraries. Any undefined symbol will be clearly visible.

In concrete replace the lines

		$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
		   $(OutPutOpt) $(subst .$(DllSuf),.so,$@)


		$(LD) -bundle $(LDFLAGS) $^ $(GLIBS) $(MYLIBS) \
		   $(OutPutOpt) $(subst .$(DllSuf),.so,$@)

Dear Pere,

Thank you very much for your help, your changes to my Makefile did solve the problem.
Now I can build binaries of ‘xps’ both on Yosemite and on Sierra.

Regarding your suggestion to switch to CMake:
As long as the developers of ‘R’ stick to ‘make’ it is not possible for me to use
CMake, since my package ‘xps’ is built on a daily basis on the Bioconductor servers
for both Linux and Mac OS Mavericks using ‘make’, see e.g.: … ATEST/xps/

Just for interest: Is it really no longer possible to compile ROOT on Sierra with
XCode 8.1 using configure/make?

Best regards

Hi Christian,
Building ROOT on Sierra with XCode 8.1 using configure/make may still work but basically by chance. This build method is now (from ROOT 6.08) deprecated in favour of CMake, mainly to reduce maintenance effort.

Dear Pere,

Thank you for your help, I am glad that using Cmake was not the reason for my problem.

Best regards, and Merry Xmas,