Build of root_v6.10.04 with Xcode Version 9.0 (9A235)

Hi

I have installed the new version of Xcode 9.0 (9A235) on my mac, and try to build the root_v6.10.04 release and I get the error message given below (up to there everything went fine, I would say).

How can I sort this problem? Is that a new feature of Xcode 9.0? or a new feature of root_v6.10.04 ?

Thanks for your help
Salva

[ 70%] Building CXX object core/metacling/CMakeFiles/MetaCling.dir/src/TCling.cxx.o
/Users/martis/Utils/test/root_v6.10.04_source/core/metacling/src/TCling.cxx:1064:19: error: call to constructor of ‘std::string’ (aka ‘basic_string<char, char_traits,
allocator >’) is ambiguous
std::string interpInclude(TROOT::GetEtcDir());
^ ~~~~~~~~~~~~~~~~~~
/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);
^
/Users/martis/Utils/test/root_v6.10.04_source/core/metacling/src/TCling.cxx:1073:34: error: ambiguous conversion for functional-style cast from ‘TString’ to ‘std::string’
(aka ‘basic_string<char, char_traits, allocator >’)
clingArgsStorage.push_back(std::string("-I" + TROOT::GetIncludeDir()));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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);

Hi,
this is a (recent) known problem, a fix is already in master.

(Also a reminder, quickly search for your problem before posting :slight_smile: )





Cheers,
Enrico

Dear Enrico,
thanks for the feedback. I have looked for those solutions but they didn’t make the error I had go away.
In particular I could not try one suggested by Philippe Canal since when I try:
git checkout 9339de9e644b06d5f77607f83aea118969cab7b6

I get:

fatal: reference is not a tree: 9339de9e644b06d5f77607f83aea118969cab7b6

Am I missing something? This is the test it is left to try.

Many thanks in advance,
Marco Bomben

Yes, compiling ROOT’s master branch is the only solution available at the moment.
From the ROOT git repository that you cloned on your machine you should be able to do

$ git fetch origin
$ git checkout 9339de9e644b06d5f77607f83aea118969cab7b6

I guess you are missing the first command, that retrieves the latest commits in our repo :slight_smile:
Then you should be able to recompile ROOT and get it working with XCode 9.

Let me know if this solves it.
Cheers,
Enrico

Thanks Enrico, I was indeed missing the ‘git fetch’.
Ok, I have tried and it is now failing here:

Scanning dependencies of target Foundation_Stage1
[ 26%] Building CXX object core/foundation/CMakeFiles/Foundation_Stage1.dir/src/RConversionRuleParser.cxx.o
/Users/mbomben/work/root/core/foundation/src/RConversionRuleParser.cxx:91:22: error:
no type named ‘MembersMap_t’ in namespace ‘ROOT::Internal’; did you mean
simply ‘MembersMap_t’?
ROOT::Internal::MembersMap_t &result,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
MembersMap_t
/Users/mbomben/work/root/build/include/RConversionRuleParser.h:36:47: note:
‘MembersMap_t’ declared here
typedef std::map<std::string, std::string> MembersMap_t;
^
1 error generated.
make[2]: *** [core/foundation/CMakeFiles/Foundation_Stage1.dir/src/RConversionRuleParser.cxx.o] Error 1
make[1]: *** [core/foundation/CMakeFiles/Foundation_Stage1.dir/all] Error 2
make: *** [all] Error 2

Thanks a lot again,
Marco Bomben

Thanks a lot for the feedback. Apologize for missing the earlier posts about this topic.

I must say that I used the master branch and it compiled fine now. Only when I try to use my macros now, I am missing RooFit :frowning: (see message below).

I’ve been browsing, but I am not that familiar with this forum and I couldn’t find a solution. I guess I need to specify something at the building time. But what?

Beer++;
Salva
/Users/martis/cernbox/temp/perfMon/JPsiMassFit.h:18:10: fatal error: ‘RooAddPdf.h’ file not found
#include “RooAddPdf.h”

Hi,
see the building options here, you need to pass -Droofit=ON when you configure the build directory with cmake

Uhm, I’m not sure what this is, can you try to restart the building procedure from an empty build directory?
EDIT: when I say I’m not sure I mean I compile ROOT several times per day and that error is not there, so I hope it’s a dirty build dir :sweat_smile:

Thanks for the tip!

It works now like a clockwork!

Beer++;
Salva

1 Like

So, I have checked out 9339de9e644b06d5f77607f83aea118969cab7b6, recompiled in a “clean” build directory and now it works!
Thanks a lot again,
Marco Bomben

1 Like

Glad I could help, it’s positive karma! Marking this as solved.
Cheers,
Enrico

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