ROOT 6.10.06 build failure on macOS 10.13 Xcode 9

I know this is a new OS, so support should not be expected, so this is just a FYI.

ROOT 6.10.06 fails to build on the newly released macOS 10.13, Xcode 9

Error is

:info:build /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_science_root6/root6/work/root-6-10-06/core/metacling/src/TCling.cxx:1064:19: error: call to constructor of 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') is ambiguous
:info:build       std::string interpInclude(TROOT::GetEtcDir());
:info:build                   ^             ~~~~~~~~~~~~~~~~~~
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:778:31: note: candidate constructor
:info:build     _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
:info:build                               ^
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:799:5: note: candidate constructor
:info:build     basic_string(__self_view __sv);
:info:build     ^
:info:build /opt/local/var/macports/build/_Users_chris_Projects_MacPorts_ports_science_root6/root6/work/root-6-10-06/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<char>, allocator<char> >')
:info:build       clingArgsStorage.push_back(std::string("-I" + TROOT::GetIncludeDir()));
:info:build                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:778:31: note: candidate constructor
:info:build     _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
:info:build                               ^
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:799:5: note: candidate constructor
:info:build     basic_string(__self_view __sv);
:info:build     ^

full log is attached.

main.log.bz2 (117.3 KB)

why don’t you try to use the search button here first?

I did. I obviously missed what you are referring to. No need to be snarky…

search … Xcode 9

My search was fine, it was simply I missed the report.






Yes, there are a number… Doesn’t excuse your initial rude reply. A simple "I think you may have missed these reports… " would have sufficed.

Sorry, it wasn’t your reply ksmith… Lets drop this, it does no good :wink:

To complete a bit. I think my yesterday experience might be useful. When moving to XCode 9 I had this problem with TString which is now solved. Yesterday I installed MacOS 10.13 (Xcode 9 was installed before). After having installed MacOS 10.13 ROOT did not compile anymore. I had to do xcode-select --install to make it work again.

1 Like

Dear Experts,
I’ve a Mac with OS 10.12.6 and Xcode 9.0
I’ve tried to compile root_v6.11.02 and I got the following error message:

[ 71%] Built target rootcling
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/TBB.dir/build.make CMakeFiles/TBB.dir/depend
cd /Users/dinardo/root/myBuild && /Applications/CMake.app/Contents/bin/cmake -E cmake_depends "Unix Makefiles" /Users/dinardo/root /Users/dinardo/root /Users/dinardo/root/myBuild /Users/dinardo/root/myBuild /Users/dinardo/root/myBuild/CMakeFiles/TBB.dir/DependInfo.cmake --color=
Dependee "/Users/dinardo/root/myBuild/CMakeFiles/TBB.dir/DependInfo.cmake" is newer than depender "/Users/dinardo/root/myBuild/CMakeFiles/TBB.dir/depend.internal".
Dependee "/Users/dinardo/root/myBuild/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/dinardo/root/myBuild/CMakeFiles/TBB.dir/depend.internal".
Scanning dependencies of target TBB
    /Users/dinardo/root/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-*.log
make[2]: *** [TBB-prefix/src/TBB-stamp/TBB-build] Error 1
make[1]: *** [CMakeFiles/TBB.dir/all] Error 2
make: *** [all] Error 2

Can you please help me to solve this ?
I’m close to a conference and I need my laptop to make the plots !!!
Many thanks for your help.
Kind regards,

  • Mauro.

The development release tag is unfortunately (currently) broken for XCode9.
Easiest fix: download a pre-compiled binary from here, they should work.

Otherwise, instead of checking out tag v6.11 in git, you can checkout master which is currently just a few commits ahead and also contains a fix for XCode9.

Hope this helps,
Enrico

Hi Enrico,
many thanks for your suggestion.
Unfortunately I still have the problem:

[ 71%] Performing build step for 'TBB'
cd /Users/dinardo/root/myBuild/TBB-prefix/src/TBB && /Applications/CMake.app/Contents/bin/cmake -P /Users/dinardo/root/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-RelWithDebInfo.cmake
CMake Error at /Users/dinardo/root/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-RelWithDebInfo.cmake:16 (message):
  Command failed: 2

   'make' 'compiler=clang' 'CXXFLAGS= -mno-rtm' 'CPLUS=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++' 'CONLY=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc'

  See also

    /Users/dinardo/root/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-*.log

Do you know what TBB is ?
Is it something needed ?
Can I avoid to build it ?
Many thanks for your support.

  • Mauro.

Hi Mauro,
TBB is Intel’s “Threading Building Blocks” library, it’s used internally by ROOT in its multi-threading features.

I think you can turn off its compilation by setting -Dimt=OFF (therefore deactivating Implicit Multi-Threading). @amadio or @dpiparo know more than me on the topic, let’s ping them :slight_smile:

It would be interesting to know why it failed in the first place though – if you have a second please take a look at /Users/dinardo/root/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-*.log and post the content here.

Cheers,
Enrico

Hi Mauro,

you can de-activate the build of TBB at the price of getting a fully sequential ROOT. I support @eguiraud observation and would like to see the logs so to be able to solve your problem rather than working it around.

Cheers,
D

Dear @dpiparo and @eguiraud many thanks for your reply.
Here are some more observations.

The error message is the following:

[ 71%] Performing build step for 'TBB'
cd /Users/dinardo/root_v6.11.02_master/myBuild/TBB-prefix/src/TBB && /Applications/CMake.app/Contents/bin/cmake -P /Users/dinardo/root_v6.11.02_master/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-RelWithDebInfo.cmake
CMake Error at /Users/dinardo/root_v6.11.02_master/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-RelWithDebInfo.cmake:16 (message):
  Command failed: 2

   'make' 'compiler=clang' 'CXXFLAGS= -mno-rtm' 'CPLUS=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++' 'CONLY=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc'
  See also
    /Users/dinardo/root_v6.11.02_master/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-*.log
make[2]: *** [TBB-prefix/src/TBB-stamp/TBB-build] Error 1
make[1]: *** [CMakeFiles/TBB.dir/all] Error 2
make: *** [all] Error 2

Here is the content of

more /Users/dinardo/root_v6.11.02_master/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-err.log 
make[4]: ../../build/Makefile.tbb: No such file or directory
make[4]: *** No rule to make target `../../build/Makefile.tbb'.  Stop.
make[3]: *** [tbb] Error 2

And here is the content of

 more /Users/dinardo/root_v6.11.02_master/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-out.log 
Created ./build/macos_intel64_clang_cc9.0.0 Found CUDA installation: /usr/local/cuda, version unknown_os10.12.6_release and ..._debug directories
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C "./build/macos_intel64_clang_cc9.0.0 Found CUDA installation: /usr/local/cuda, version unknown_os10.12.6_debug"  -r -f ../../build/Makefile.tbb cfg=debug

Indeed I do have CUDA installed, but as you might know better than me, CUDA is always behind with respect to Xcode updates, therefore my CUDA compiler is not compatible with Xcode 9.0 right now.
The point is that I don’t understand why this has anything to do with ROOT.

Can you please help me out ?
Yes, I could disable IMT with -Dimt=OFF but I rather not to do that if possible.
Many thanks,

  • Mauro.

Ah, no CUDA does not have anything to do with your problem.
You are installing ROOT without an active internet connection and ROOT fails to download TBB. This is bad behavior on the part of the build system, I will report it.

For now, either install ROOT with -Dimt=OFF so that it does not try to download and install TBB, or fire up your WiFi when installing ROOT.

Sorry for the trouble!
Enrico

Hi Enrico,
many thanks for your prompt reply.
Actually I do have WiFi on.
I’m constantly working connected to internet.
So, I’m not sure what should I do more than this.
Are there other flags that I need to turn on ?
For instance there might be some protections under
my “Security&Privacy” of my MAC that I need to disable ?

By the way, what is TBB ?
Can I install it manually ?

Many thanks,

  • Mauro.

Hi,
as I mentioned above Intel’s Threading Building Blocks is the library that powers ROOT’s internal parallelization technology.

I am not sure why you should not be able to download it if you have an active internet connection (maybe you are behind a very restrictive firewall?).

You can certainly try to install it manually, and ROOT should pick it up automatically if it finds it in your system. You can download it from here, compile it and the follow the instructions here to set the environment variables correctly.

I don’t know which utility actually downloads the TBB source code in ROOT 6 but, in another, completely unrelated thread, a user was missing “curl” (which was needed for downloading the “lz4” source code).

@Wile_E_Coyote CMake uses curl for the download step of ExternalProject_Add(), which is used by ROOT for most external packages.