Compilation errors in OSX 10.9

Hi,

I’ve been having trouble compiling with ROOT since upgrading to OSX 10.9. I’m running ROOT 5.34.14 (using git checkout -b v5.34.14 v5.34.14; also tried with 5.34.12), and the latest Mavericks command line tools (dated 22 Oct 2013), downloaded from developer.apple.com/downloads/index.action (the xcode-select --install command doesn’t seem to work right now). ROOT itself builds without complaining.

Here is the compilation error I’m encountering. I’ve also attached my config.log file. Any ideas? Random googling implicates libc++, but I’m not sure what to do about it.

Compiling ../Root/TAccept.cxx
In file included from ../Root/TAccept.cxx:12:
In file included from ../PATCore/TAccept.h:15:
In file included from /Applications/root/include/TString.h:36:
In file included from /Applications/root/include/TMathBase.h:30:
In file included from /Applications/root/include/Rtypes.h:267:
In file included from /Applications/root/include/TGenericClassInfo.h:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:261:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__bit_reference:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:593:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/utility:255:15: error: 
      no viable overloaded '='
        first = __p.first;
        ~~~~~ ^ ~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__tree:1246:35: note: 
      in instantiation of member function 'std::__1::pair<const TString, std::__1::pair<TString, unsigned int>
      >::operator=' requested here
                __cache->__value_ = *__first;
                                  ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__tree:1187:9: note: 
      in instantiation of function template specialization 'std::__1::__tree<std::__1::pair<const TString,
      std::__1::pair<TString, unsigned int> >, std::__1::__map_value_compare<const TString, std::__1::pair<TString,
      unsigned int>, std::__1::less<const TString>, true>, std::__1::allocator<std::__1::pair<const TString,
      std::__1::pair<TString, unsigned int> > >
      >::__assign_multi<std::__1::__tree_const_iterator<std::__1::pair<const TString, std::__1::pair<TString,
      unsigned int> >, const std::__1::__tree_node<std::__1::pair<const TString, std::__1::pair<TString, unsigned
      int> >, void *> *, long> >' requested here
        __assign_multi(__t.begin(), __t.end());
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/map:766:21: note: 
      in instantiation of member function 'std::__1::__tree<std::__1::pair<const TString, std::__1::pair<TString,
      unsigned int> >, std::__1::__map_value_compare<const TString, std::__1::pair<TString, unsigned int>,
      std::__1::less<const TString>, true>, std::__1::allocator<std::__1::pair<const TString,
      std::__1::pair<TString, unsigned int> > > >::operator=' requested here
            __tree_ = __m.__tree_;
                    ^
../Root/TAccept.cxx:66:17: note: in instantiation of member function 'std::__1::map<const TString,
      std::__1::pair<TString, unsigned int>, std::__1::less<const TString>, std::__1::allocator<std::__1::pair<const
      TString, std::__1::pair<TString, unsigned int> > > >::operator=' requested here
  m_cutMap      = rhs.m_cutMap;
                ^
/Applications/root/include/TString.h:287:16: note: candidate function not viable: 'this' argument has type
      'const TString', but method is not marked const
   TString    &operator=(const TString &s);
               ^
/Applications/root/include/TString.h:286:16: note: candidate function not viable: 'this' argument has type
      'const TString', but method is not marked const
   TString    &operator=(const char *s);
               ^
/Applications/root/include/TString.h:285:16: note: candidate function not viable: 'this' argument has type
      'const TString', but method is not marked const
   TString    &operator=(char s);                // Replace string
               ^
/Applications/root/include/TString.h:288:16: note: candidate function not viable: 'this' argument has type
      'const TString', but method is not marked const
   TString    &operator=(const std::string &s);
               ^
/Applications/root/include/TString.h:289:16: note: candidate function not viable: 'this' argument has type
      'const TString', but method is not marked const
   TString    &operator=(const TSubString &s);
               ^
1 error generated.
make: *** [../obj/TAccept.o] Error 1

config.log.txt (241 KB)

Without your code or at least fragment mentioned by the compiler (what is this TAccept.cxx???) it’s a useless guess work.

Show at least, what is this m_cutMap (the declaration) and (probably) the declaration of a member function where you have this compilation error.

Ah, apologies, I’m not so familiar with clang, and got confused by the error/note messages. The problem was internal (const incorrectness that was previously ignored). Thanks, and sorry for the noise.