Problems during Build and Install of Root v6.10/02

Dear experts,
I’m trying to install Root v6.10/02 (downloaded by the git repository) on macOs Sierra 10.12.6, but I have several problems in doing so.

I have successfully downloaded Root, checked out the right branch, created a Build Directory and started the compilation. This is exactly what I’m doing in the “/usr/local/” folder (and with “sudo”):

<download root and move to /usr/local/>
cd root
git checkout -b v6-10-02 v6-10-02
mkdir BuildDir
cd BuildDir
cmake ../ -Dgnuinstall=ON -Dsoversion=ON -Dall=ON
make -j4

But unfortunately at this point the compilation fails stating that the “call to constructor of ‘std::string’ (aka ‘basic_string<char, char_traits, allocator >’) is ambiguous”.
The full details of the terminal output is in attachment (both the outcomes from “cmake” and “make”).

I have found that such a problem had already happened before (https://sft.its.cern.ch/jira/browse/ROOT-8728) as is a known issue, but it also says that the affected version was 6.09/02 and the bug was solved in 6.10/00. So, I don’t understand what I’m doing wrong here.

This is the output from g++ --version

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

This is the output from cmake --version

cmake version 3.9.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

This is the output from xcodebuild -version

Xcode 9.0
Build version 9A235

And the output from gfortran --version

GNU Fortran (GCC) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

How can I solve this problem?

CMAKE_outcome.txt (12.3 KB)
MAKE_outcome.txt (425.5 KB)

Hi again,
I think I have found a “home-made” solution for this problem.
As suggested by this ticket (https://sft.its.cern.ch/jira/browse/ROOT-9015) I have checked out a newer version and compiled again.

git checkout 263508429dec26449513914e71f0f71c9ce9485f

This time the compilation reaches 93% but I keep receiving error messages with roofit.

/usr/local/root/roofit/roofitcore/src/RooSharedPropertiesList.cxx:110:17: error: ambiguous conversion for functional-style cast from 'TString' to 'std::string'
      (aka 'basic_string<char, char_traits<char>, allocator<char> >')
  _newPropList[ std::string(prop->asString()) ] = prop; 
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:778:31: note: candidate constructor
    _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
                              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:799:5: note: candidate constructor
    basic_string(__self_view __sv);
    ^
/usr/local/root/roofit/roofitcore/src/RooSharedPropertiesList.cxx:129:29: error: ambiguous conversion for functional-style cast from 'TString' to 'std::string'
      (aka 'basic_string<char, char_traits<char>, allocator<char> >')
    it = _newPropList.find( std::string(prop->asString()) ); 
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:778:31: note: candidate constructor
    _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
                              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:799:5: note: candidate constructor
    basic_string(__self_view __sv);

/usr/local/root/roofit/roostats/src/ToyMCSampler.cxx:196:4: error: call to constructor of 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') is ambiguous
   fSamplingDistName(ts.GetVarName()), fNToys(ntoys)

At this point I modified by hand:

  1. All the prop->asString() with prop->asString().Data()

  2. The ts.GetVarName() with ts.GetVarName().Data().

The compilation now works perfectly and I can use ROOT 6.11/01.
This is a home-made solution but I do not know if I messed up something. An expert here is necessary.

Indeed more change were needed, including the one you mentioned (of course). Let us know if 9339de9e644b06d5f77607f83aea118969cab7b6 compiles as-is for you.

Cheers,
Philippe.

Hi @pcanal,
YES, now it compiles perfectly as-is.

Thanks,
Carlo

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