Problems compiling on os x 10.9

I’m afraid this is not what you need to compile (this is not the branch I’ve mentioned in this topic).

Do:
git clone root.cern.ch/git/root.git any-name-you-want
cd any-name-you-want
git checkout -t origin/v5-34-00-patches
./configure
make[/quote]
Hi, all
I used this method to install root again in my updated mac os x 10.9, finally what i get is a error message below:

but if i do not use the v5-34-00-patches ,i.e. use the default branch, the error message I got is :

need your help,thanks!

Hi,

I find the same thing after downloading v5-34-00-patches and trying to compile:

Error: cannot open file “AvailabilityMacros.h” include/RConfig.h:376:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing core/base/src/G__Base1.cxx core/base/src/G__Base1.h !!!
Error: core/utils/src/rootcint_tmp: error loading headers…
make: *** [core/base/src/G__Base1.cxx] Error 1

Any ideas?

Ryan

Hi all,

I also had some issues with libstd++ and I guess it might be due to an improper install of the XCode command line tools upon initial XCode install.

Could you try “xcode-select --install” and answer yes when prompted to install the command line tools and then retry the root compilation ?

It worked for me (well, at least those “etc/cling/Interpreter/ValuePrinter.h:11:10: fatal error: ‘string’ file not found” messages disappeared).

Regards,

[quote=“aphecetche”]Hi all,

I also had some issues with libstd++ and I guess it might be due to an improper install of the XCode command line tools upon initial XCode install.

Could you try “xcode-select --install” and answer yes when prompted to install the command line tools and then retry the root compilation ?

It worked for me (well, at least those “etc/cling/Interpreter/ValuePrinter.h:11:10: fatal error: ‘string’ file not found” messages disappeared).

Regards,[/quote]

Hi,
I had exactly the same issues with the compilation and the “xcode-select --install” indeed fixed everything.
Many thanks!

Great! The “xcode-select --install” worked for me, too. Thanks…

Hi all,

I had the same problem as the author and the suggestion in [url]Locate like command did the trick, thanks.

However I have a problem with Python:

[code]Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “/Users/David/Documents/rootGit/lib/ROOT.py”, line 271, in
root.MakeRootClass( “TTree” ).iter = TTree__iter
AttributeError: type object ‘string’ has no attribute ‘c_str’
[/code]

Does anyone know anything about that?

Thanks
David

Hello!
I’ve got a problem in the installation of ROOT.
I did what suggested in this forum:

git clone root.cern.ch/git/root.git any-name-you-want
cd any-name-you-want
git checkout -t origin/v5-34-00-patches
./configure
make

and I got this error message:

*** Building libAfterImage …
make[1]: *** No rule to make target libjpeg/jaricom.o', needed bylibAfterImage.a’. Stop.
make: *** [graf2d/asimage/src/libAfterImage/libAfterImage.a] Error 2

I attach the config.log file of my configuration.

Do you have any idea of how to solve this problem?
Thank you

Paola
config.txt (210 KB)

Hi,
So I got root to rebuild following all the recommendations mentioned above. And so I started to test some of existing code dependent on root that definitely built fine prior to the update of os x10.9. At preliminary testing, it seems to work fine with some existing scripts, where plots seem to appear fine. But when I tried to recompile a standalone executable that generates a root tree, I got this build error:
jade-mbp:bb jade$ make
clang++ -g -c -I/usr/local/include/root -fPIC FillData.cpp
clang++ -g -c -I/usr/local/include/root -fPIC BBData.cpp
Generating dictionary BBDataDict.cpp…
clang++ -g -c -I/usr/local/include/root -fPIC BBDataDict.cpp
clang++ -dynamiclib -single_module -O2 -mmacosx-version-min=10.8 -m64 BBData.o BBDataDict.o -o libBBData.so root-config --cflags --libs
clang: warning: argument unused during compilation: '-pthread’
Undefined symbols for architecture x86_64:
“TObject::SavePrimitive(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*)”, referenced from:
vtable for BBData in BBData.o
vtable for PopData in BBDataDict.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libBBData.so] Error 1

I haven’t changed anything in the code and this built fine prior to the recent build of root on os x 10.9. Do you know why that symbol can’t be found? My simple Makefile looks like this:

[code]CFLAGS=-g -c -I/usr/local/include/root
LDFLAGS=-L/usr/local/lib/root -L./

all: FillData.exe

FillData.exe: FillData.o libBBData.so
clang++ -o FillData.exe FillData.o BBData.o BBDataDict.o root-config --cflags --libs

FillData.o: FillData.cpp BBData.h
clang++ $(CFLAGS) -fPIC FillData.cpp

libBBData.so: BBData.o BBDataDict.o
clang++ -dynamiclib -single_module -O2 -mmacosx-version-min=10.9 -m64 BBData.o BBDataDict.o -o libBBData.so root-config --cflags --libs

BBData.o: BBData.cpp BBData.h BBDataLinkDef.h
clang++ $(CFLAGS) -fPIC BBData.cpp

BBDataDict.o: BBDataDict.cpp
clang++ $(CFLAGS) -fPIC BBDataDict.cpp

BBDataDict.cpp: BBData.h BBDataLinkDef.h
@echo “Generating dictionary $@…”
@rootcint -f BBDataDict.cpp -c BBData.h BBDataLinkDef.h

clean:
rm -rf *o .exe BBDataDict. [/code]

Now I thought that maybe it wasn’t working since I had:

So I changed it to:

But that didn’t make a difference. Still got the same linking error.

When I compiled root from source, I passed no options to configure. Would anyone know what’s wrong?

One more thing I should mention. I just realized that my LDFLAGS were pointed to /usr/local/lib/root, which the latest build of my root was not installed to that directory yet (want to test first before overriding that!). So I changed the Makefile to point to my local root build, having CFLAGS, LDFLAGS pointed to the correct location:

[code]ROOTLOCATION=/Users/jade/root
CFLAGS=-g -c -I${ROOTLOCATION}/include/
LDFLAGS=-L${ROOTLOCATION}/lib/ -L./
all: FillData.exe

FillData.exe: FillData.o libBBData.so
@echo “LDFLAGS=” ${LDFLAGS}
clang++ -o FillData.exe FillData.o BBData.o BBDataDict.o root-config --cflags --libs

FillData.o: FillData.cpp BBData.h
clang++ $(CFLAGS) -fPIC FillData.cpp

libBBData.so: BBData.o BBDataDict.o
@echo “LDFLAGS=” ${LDFLAGS}
clang++ -dynamiclib -single_module -O2 -mmacosx-version-min=10.9 -m64 BBData.o BBDataDict.o -o libBBData.so root-config --cflags --libs

BBData.o: BBData.cpp BBData.h BBDataLinkDef.h
clang++ $(CFLAGS) -fPIC BBData.cpp

BBDataDict.o: BBDataDict.cpp
clang++ $(CFLAGS) -fPIC BBDataDict.cpp

BBDataDict.cpp: BBData.h BBDataLinkDef.h
@echo “Generating dictionary $@…”
@rootcint -f BBDataDict.cpp -c BBData.h BBDataLinkDef.h

clean:
rm -rf *o .exe BBDataDict. [/code]

Unfortunately that still didn’t do the trick and got a similar error:

jade-mbp:bb jade$ make clean rm -rf *o *.exe BBDataDict.* jade-mbp:bb jade$ make clang++ -g -c -I/Users/jade/root/include/ -fPIC FillData.cpp clang++ -g -c -I/Users/jade/root/include/ -fPIC BBData.cpp Generating dictionary BBDataDict.cpp... clang++ -g -c -I/Users/jade/root/include/ -fPIC BBDataDict.cpp LDFLAGS= -L/Users/jade/root/lib/ -L./ clang++ -dynamiclib -single_module -O2 -mmacosx-version-min=10.9 -m64 BBData.o BBDataDict.o -o libBBData.so `root-config --cflags --libs` clang: warning: argument unused during compilation: '-pthread' Undefined symbols for architecture x86_64: "TObject::SavePrimitive(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*)", referenced from: vtable for BBData in BBData.o vtable for PopData in BBDataDict.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [libBBData.so] Error 1

I printed out the LDFLAGS setting just to be sure and I definitely see the libraries there:

jade-mbp:bb jade$ ls /Users/jade/root/lib/ PyCintex.py libPostscript.rootmap PyCintex.pyc libPostscript.so PyCintex.pyo libProof.rootmap ROOT.py libProof.so ROOT.pyc libProofBench.rootmap ROOT.pyo libProofBench.so cppyy.py libProofDraw.rootmap cppyy.pyc libProofDraw.so cppyy.pyo libProofPlayer.rootmap libASImage.rootmap libProofPlayer.so libASImage.so libPyROOT.rootmap libASImageGui.rootmap libPyROOT.so libASImageGui.so libQuadp.rootmap ...

Anyone see something that I’ve overlooked?

OK, this is rather embarrassing. I forgot to ‘source bin/thisroot.sh’ from my root build directory. That fixed everything and now it builds! Sorry for all the spam!

Of course had I just installed it on /usr/local from the start rather than testing on some local directory, I wouldn’t have this problem! Anyway, sorry again for all the spam put on this thread.

Hi,
I also moved to Mavericks recently:

uname -a
Darwin pb-d-128-141-141-192.cern.ch 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64

I’ve followed the tricks as described above (Locate like command):

git clone root.cern.ch/git/root.git any-name-you-want
cd any-name-you-want
git checkout -t origin/v5-34-00-patches
./configure
make

I’ve also re-installed Xcode and XQuartz.
When compiling with clang++ (make), I still have these errors:

Generating dictionary core/base/src/G__Base1.cxx…
core/utils/src/rootcint_tmp -cint -f core/base/src/G__Base1.cxx …

Error: cannot open file “AvailabilityMacros.h” include/RConfig.h:376:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing core/base/src/G__Base1.cxx core/base/src/G__Base1.h !!!
Error: core/utils/src/rootcint_tmp: error loading headers…
make: *** [core/base/src/G__Base1.cxx] Error 1

Do I forget something?
Thanks,
francesca

Hi fpastore,
did you execute the commandline “xcode-select --install” right after you re-installed xcode?

Well, no I didn’t! Now it works, thanks
francesca

Dear Root Experts and others,

I have been encountering similar problems since I have switched to OSX 10.9. Following the git-clone suggestions above for compiling root itself worked for me as well. However, I am deeply concerned by my incapiblity of getting the binary versions of root to work on my system.

I initally thought the problem came from a faulty installation of xcode command line tools but seems all tools are there /Library/Developer/CommandLineTools. Just to report that the command “xcode-select --install” did not work for me (I get a message saying the files are not on the server…) and I had to retrieve the .dmg manually from apple developer server. Even ended up making a clean install of Mavericks, Xcode and associated command-line tools.

Once the latest binary version of root retrieved and “. /root/bin/thisroot.sh” added to my .profile, I misrably fail to compile any code with the root interpreter :

[code].L TestFitting.cxx++
Info in TUnixSystem::ACLiC: creating shared library /Users/psaouter/Desktop/TestRootCompil/./TestFitting_cxx.so

RooFit v3.54 – Developed by Wouter Verkerke and David Kirkby
Copyright © 2000-2012 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt

Undefined symbols for architecture x86_64:
“std::__1::locale::use_facet(std::__1::locale::id&) const”, referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::ios_base::getloc() const", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::__init(unsigned long, char)", referenced from:
std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::~basic_string()", referenced from:
std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_ostream<char, std::__1::char_traits >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits >&)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_ostream<char, std::__1::char_traits >::sentry::~sentry()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_ostream<char, std::__1::char_traits >::operator<<(double)", referenced from:
SetRigBinning() in TestFitting_cxx_ACLiC_dict.o
TestFitting() in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_ostream<char, std::__1::char_traits >::operator<<(int)", referenced from:
SetRigBinning() in TestFitting_cxx_ACLiC_dict.o
TestFitting() in TestFitting_cxx_ACLiC_dict.o
"std::__1::cout", referenced from:
SetRigBinning() in TestFitting_cxx_ACLiC_dict.o
TestFitting() in TestFitting_cxx_ACLiC_dict.o
"std::__1::ctype::id", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::locale::~locale()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::ios_base::clear(unsigned int)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in : Compilation failed!
[/code]

I undestand the message “Undefined symbols for architecture x86_64” relates to the problem discuss in previous posts of this thread related to the fact OS X compiler (clang) uses libc++ instead of libstdc++. I have however failed to solve the problem. I tried setting explicitely CXX flag to use clang++ but did not work. Several collegues working on the exact same system had no issues running root properly after Mavericks install (without any special flag declaration). Only difference we could find is related to the famous xcode-select --install command which did not work for me. From above posts and many threads on the net, seems people are systematically solving their issues with “xcode-select --install”. But I really don’t see what should change with executing the dmg by hand…?

I am getting desperate on this problem. Any help would be really appreciated, event if it makes this thread quite redundant… :-/

Pierre

[quote=“psaouter”]Just to report that the command “xcode-select --install” did not work for me (I get a message saying the files are not on the server…) and I had to retrieve the .dmg manually from apple developer server. Even ended up making a clean install of Mavericks, Xcode and associated command-line tools.
[/quote]

Hi psaouter,
You’ll need to be specific on what exactly was the error that you got when running the “xcode-select --install” command. Until you get that solved, you’re not going to be able to build. That command will put the necessary headers, libraries in your path, which is why you’re getting undefined errors.

I’d recommend that you try to look around in the internet of people who got similar errors as you did with the xcode-select command and see if they have the solution.

Hi,

Thanks for the quick reply. Indeed I spent the last two days searching the net for my “xcode-select --install” issue and the same problem is reported by many other xcode users. Essentially when I click on “install” check box that pops up when I run xcode-select --install, it starts searching for the file and returns an error saying the file is not found on the server (thread describing the issue can be found here stackoverflow.com/questions/1969 … -mavericks).

Unfortunately all potential solutions I have found related to this issue did not work for me up to now. I understand this is probably an xcode issue and not a root one. I needed a confirmation. I will continue searching the web then.

Thank you very much,

Pierre

Hi Pierre,
are you correctly registered at the Apple Developers as noted here? I think you have to be registered, otherwise you won’t have access to the software update server.

Hi,

Yes I am since I was able to download the command line tools by connecting to Apple Developers directly from their website. However I do agree that the fact xcode-select --install command fails is perhaps due to some authentification issue with apple’s servers. But since I can connect without issues from the website, I don’t see what could be wrong…

Best,

Pierre

I found this thread that suggests the error message will be generated even if the common line tools are already installed and up to date.

That person stated that if /usr/lib/tclConfig.sh exists on your system, then the tools are there.

Hi,

To summarize:

  • there is no need to register as developer with Apple to build ROOT
  • xcode-select --install will report a bogus error is the command line tools are already installed.

All remaining missing symbols are likely due to

  • the wrong version / build of ROOT
  • an old version of a library that hasn’t been rebuilt for 10.9.

Cheers, Axel.