Installing root_5-34-12 on Mac OSX 10.9 (Mavericks)

Hi Experts,

I already installed command line tools on XCode 5.0.2 but I have this error(*) using this configuration on Macbook Pro.

sudo ./configure macosx64 --enable-python
–with-python-incdir=/System/Library/Frameworks/Python.framework/Headers
–with-python-libdir=/usr/bin/python --enable-tmva

and GCC version is here:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Please, could you clarify this point for me?

Thanks again,
Sandro Fonseca
UERJ/Brazil

()
cint/cint/src/symbols.cxx:235:22: error: reference to ‘hash’ is ambiguous
fClassHash = hash(classname.c_str());
^
cint/cint/src/symbols.cxx:43:22: note: candidate found by name lookup is ‘hash’
inline unsigned long hash(const char
str)
^
/Library/Developer/CommandLineTools/usr/bin/…/lib/c++/v1/memory:3081:29: note: candidate found by name lookup is ‘std::__1::hash’
template struct hash;
^
cint/cint/src/symbols.cxx:239:22: error: reference to ‘hash’ is ambiguous
fClassHash = hash(demanstr);
^
cint/cint/src/symbols.cxx:43:22: note: candidate found by name lookup is ‘hash’
inline unsigned long hash(const char* str)
^
/Library/Developer/CommandLineTools/usr/bin/…/lib/c++/v1/memory:3081:29: note: candidate found by name lookup is ‘std::__1::hash’
template struct hash;
^
cint/cint/src/symbols.cxx:268:20: warning: multiple unsequenced modifications to ‘cline’ [-Wunsequenced]
cline = cline++;
~ ^
cint/cint/src/symbols.cxx:364:14: error: reference to ‘hash’ is ambiguous
return hash(fLibname);
^
cint/cint/src/symbols.cxx:43:22: note: candidate found by name lookup is ‘hash’
inline unsigned long hash(const char* str)
^
/Library/Developer/CommandLineTools/usr/bin/…/lib/c++/v1/memory:3081:29: note: candidate found by name lookup is ‘std::__1::hash’
/Library/Developer/CommandLineTools/usr/bin/…/lib/c++/v1/memory:3081:29: note: candidate found by name lookup is ‘std::__1::hash’
template struct hash;
^
cint/cint/src/symbols.cxx:879:30: error: reference to ‘hash’ is ambiguous
if ((symbol->fClassHash==hash(“std”) && classstr==“std”) && protostr.at(0)==’_’){
^
cint/cint/src/symbols.cxx:43:22: note: candidate found by name lookup is ‘hash’
inline unsigned long hash(const char* str)
^
/Library/Developer/CommandLineTools/usr/bin/…/lib/c++/v1/memory:3081:29: note: candidate found by name lookup is ‘std::__1::hash’
template struct hash;
^
config.txt (7.17 KB)

HI Sandro,

We had a similar problem with our compiled code. It seems that the new mac compiler clang is very picky with namespaces. We solved by adding the following line after the includes in the file stlplus/hash.hpp

namespace stlplus { // added to prevent collisions with typename “hash”

and of course you have to close the bracket at the end of the code, before the last #endif

}

See the diff between the old and new code ad output by git:

diff --git a/src/stlplus/hash.hpp b/src/stlplus/hash.hpp
index deba990…a8666e6 100644
— a/src/stlplus/hash.hpp
+++ b/src/stlplus/hash.hpp
@@ -13,8 +13,14 @@
#include “textio.hpp”
#include “persistent.hpp”
#include “exceptions.hpp”
+#include “string_utilities.hpp”
+#include “dprintf.hpp”
+#include “debug.hpp”
+#include “stringio.hpp”
#include

+namespace stlplus { // added to prevent collisions with typename “hash”
+
////////////////////////////////////////////////////////////////////////////////
// internals

@@ -245,4 +251,7 @@ void restore_hash(restore_context& str, hash<K,T,H,E>& data)
////////////////////////////////////////////////////////////////////////////////

#include “hash.tpp”
+
+}
+
#endif

I hope that it helps

Berta