Compile Error when building ROOT

I am trying to compile a new version of root (v6.22) on my mac (10.4.6) clang v10. I am seeing this error:

/Users/user/root_src/tree/treeplayer/src/TBranchProxy.cxx:121:49: error: 
      call to member function 'rfind' is ambiguous
   std::string::size_type pos = sFullBranchName.rfind(branch->GetFullName());
                                ~~~~~~~~~~~~~~~~^~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:1158:15: note: 
      candidate function
    size_type rfind(__self_view __sv, size_type __pos = npos) const _NOEXCEPT;
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:1161:15: note: 
      candidate function
    size_type rfind(const value_type* __s, size_type __pos = npos) cons...
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:1156:15: note: 
      candidate function not viable: no known conversion from 'TString' to
      'const std::__1::basic_string<char>' for 1st argument
    size_type rfind(const basic_string& __str, size_type __pos = npos) c...
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:1162:15: note: 
      candidate function not viable: no known conversion from 'TString' to
      'std::__1::basic_string<char, std::__1::char_traits<char>,
      std::__1::allocator<char> >::value_type' (aka 'char') for 1st argument
    size_type rfind(value_type __c, size_type __pos = npos) const _NOEXCEPT;
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:1159:15: note: 
      candidate function not viable: requires 3 arguments, but 1 was provided
    size_type rfind(const value_type* __s, size_type __pos, size_type __...
              ^
1 error generated.
make[2]: *** [tree/treeplayer/CMakeFiles/TreePlayer.dir/src/TBranchProxy.cxx.o] Error 1
make[1]: *** [tree/treeplayer/CMakeFiles/TreePlayer.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Can anyone help understand this?

Cheers

Maybe a MacOS user can take a look. @couet, @Axel?

Not sure what it is. I never saw that on Mac.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Me neither. @df12 is this still an issue? If so, can you share your CMakeCache.txt? And note that you don’t have to build ROOT: you can just download it from https://root.cern/releases/release-62202/ e.g. cd ~/Downloads; curl -O https://root.cern/download/root_v6.22.02.macosx64-10.14-clang100.pkg should work for you!

This topic was automatically closed after 14 days. New replies are no longer allowed.