Installing Root from souce- Root build giving trouble

Hey experts

i’m trying to install Root-6.08.06 on my MacBook Pro from source.
Apparently the ./configure --all command goes through without any errors.
However when I use the make command to build, I get the following error at the very end (during the installation phase of make):

cp /Users/avinaybhat/Downloads/root-6.08.06/core/utils/src/rootcling.cxx core/utils/src/rootcling_tmp.cxx
clang++ -O2 -DNDEBUG -m64 -std=c++11 -stdlib=libc++ -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude    -pthread  -UR__HAVE_CONFIG -DROOT_STAGE1_BUILD -I/Users/avinaybhat/Downloads/root-6.08.06/core/utils/src -I/Users/avinaybhat/Downloads/root-6.08.06/core/metautils/src -I/Users/avinaybhat/Downloads/root-6.08.06/interpreter/cling/include -I/Users/avinaybhat/Downloads/root-6.08.06/interpreter/llvm/inst/include -stdlib=libc++ -fPIC -pedantic -std=c++11 -DNDEBUG -fno-rtti -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-strict-aliasing -DNDEBUG -Wno-shadow -Wno-unused-parameter -MMD -MP -o core/utils/src/rootcling_tmp.o -c core/utils/src/rootcling_tmp.cxx
In file included from core/utils/src/rootcling_tmp.cxx:232:
In file included from include/TClassEdit.h:67:
include/RStringView.h:35:12: error: unknown type name 'basic_string_view'
   typedef basic_string_view<char> string_view;
           ^
include/RStringView.h:35:29: error: expected unqualified-id
   typedef basic_string_view<char> string_view;
                            ^
include/RStringView.h:36:12: error: unknown type name 'basic_string_view'
   typedef basic_string_view<char16_t> u16string_view;
           ^
include/RStringView.h:36:29: error: expected unqualified-id
   typedef basic_string_view<char16_t> u16string_view;
                            ^
include/RStringView.h:37:12: error: unknown type name 'basic_string_view'
   typedef basic_string_view<char32_t> u32string_view;
           ^
include/RStringView.h:37:29: error: expected unqualified-id
   typedef basic_string_view<char32_t> u32string_view;
                            ^
include/RStringView.h:38:12: error: unknown type name 'basic_string_view'
   typedef basic_string_view<wchar_t> wstring_view;
           ^
include/RStringView.h:38:29: error: expected unqualified-id
   typedef basic_string_view<wchar_t> wstring_view;
                            ^
include/RStringView.h:50:28: error: no member named 'to_string' in
      'std::__1::basic_string_view<char, std::__1::char_traits<char> >'
      return std::stod(str.to_string(),pos);
                       ~~~ ^
9 errors generated.
make: *** [core/utils/src/rootcling_tmp.o] Error 1

Can anybody help me out with this?
I’d appreciate any help!

Hi,

this is due to the usage of XCode9. The 6.10/08 version has just been released and it fixes this issue: https://root.cern.ch/content/release-61008 : could you try that one?

Cheers,
D

Thanks for your reply @Danilo
I did what you advised and I still get a similar error even for 6.10/08:

Running /Users/avinaybhat/Downloads/root-6.10.08/build/unix/compiledata.sh
Making include/compiledata.h
clang++ -O2 -DNDEBUG -m64 -std=c++11 -stdlib=libc++ -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude    -pthread  -MMD -MP -o core/base/src/InitGui.o -c /Users/avinaybhat/Downloads/root-6.10.08/core/base/src/InitGui.cxx
clang++ -O2 -DNDEBUG -m64 -std=c++11 -stdlib=libc++ -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude    -pthread  -MMD -MP -o core/base/src/Match.o -c /Users/avinaybhat/Downloads/root-6.10.08/core/base/src/Match.cxx
clang++ -O2 -DNDEBUG -m64 -std=c++11 -stdlib=libc++ -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude    -pthread  -MMD -MP -o core/base/src/String.o -c /Users/avinaybhat/Downloads/root-6.10.08/core/base/src/String.cxx
clang++ -O2 -DNDEBUG -m64 -std=c++11 -stdlib=libc++ -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude    -pthread  -MMD -MP -o core/base/src/Stringio.o -c /Users/avinaybhat/Downloads/root-6.10.08/core/base/src/Stringio.cxx
In file included from /Users/avinaybhat/Downloads/root-6.10.08/core/base/src/Stringio.cxx:22:
In file included from include/TString.h:28:
include/RStringView.h:35:12: error: unknown type name 'basic_string_view'
   typedef basic_string_view<char> string_view;
           ^
include/RStringView.h:35:29: error: expected unqualified-id
   typedef basic_string_view<char> string_view;
                            ^
include/RStringView.h:36:12: error: unknown type name 'basic_string_view'
   typedef basic_string_view<char16_t> u16string_view;
           ^
include/RStringView.h:36:29: error: expected unqualified-id
   typedef basic_string_view<char16_t> u16string_view;
                            ^
include/RStringView.h:37:12: error: unknown type name 'basic_string_view'
   typedef basic_string_view<char32_t> u32string_view;
           ^
include/RStringView.h:37:29: error: expected unqualified-id
   typedef basic_string_view<char32_t> u32string_view;
                            ^
include/RStringView.h:38:12: error: unknown type name 'basic_string_view'
   typedef basic_string_view<wchar_t> wstring_view;
           ^
include/RStringView.h:38:29: error: expected unqualified-id
   typedef basic_string_view<wchar_t> wstring_view;
                            ^
8 errors generated.
make: *** [core/base/src/Stringio.o] Error 1

Any clues?
-Thanks

The old “./configure” based installation method is known to be broken in ROOT 6 (it should be completely removed from the new source code, if you ask me) so, try to use the new “CMake” based method.

1 Like

Thanks for your reply @Wile_E_Coyote
I used cmake this time and got the following errors after the cmake command:

[ 93%] Linking CXX shared library ../../lib/libGui.so
[ 93%] Built target Gui
make: *** [all] Error 2

Any idea?

You haven’t provided enough of the CMake output to make an evaluation. The specific error message is missing. If you rerun cmake without the -j flag the output is sometime more readable.

In your current build subdirectory, try to rerun “cmake -j 1” now and post the full output here.

I deleted all old build directories and also root folders and attempted a fresh install.
After using the cmake -j1 command I get the following error at the end:

ld: file not found: /usr/lib/system/libsystem_darwin.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libHbook.so] Error 1
make[1]: *** [hist/hbook/CMakeFiles/Hbook.dir/all] Error 2
make: *** [all] Error 2

In case this is again insufficient, I have attached the whole log after the cmake -j1 command.

Please let me know if you need any more information
screen.txt (643.6 KB)

Again, I thank you for your help in advance ! :slight_smile:

Can you also post your CMakeCache.txt file? What version of macOS are you using?

I’m using macOS Sierra version 10.12.6
Here’s the CMakeCache.txt file
CMakeCache.txt (113.0 KB)

And I bet you are running Xcode 9? There was an issue with Xcode 9, that was fixed in version 6.10.08. I see other complaining about the same error message for different projects when moving to Xcode 9. Why don’t you give that version a try and see if you still have issues.

https://root.cern.ch/doc/v610/release-notes.html#release-6.1008
https://sft.its.cern.ch/jira/browse/ROOT-9015

These are the errors I get while I try to install v6.10.08. Sorry for any confusion

Sorry I just read the version in the first post.

Alright guys this is about the 50th time my root 6.10.08 build has failed. What am i supposed to do?

Here’s the breakdown in the script log attached:

[ 87%] Built target minicern
Scanning dependencies of target Hbook
[ 87%] Building CXX object hist/hbook/CMakeFiles/Hbook.dir/G__Hbook.cxx.o
[ 87%] Linking CXX shared library ../../lib/libHbook.so
ld: file not found: /usr/lib/system/libsystem_darwin.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libHbook.so] Error 1
make[1]: *** [hist/hbook/CMakeFiles/Hbook.dir/all] Error 2
make: *** [all] Error 2

Let me know if there’s anything that can be done.
-Thanks

screen.txt (17.8 KB)

I suspect a problem between the fortran compiler you have installed and XCode9. Could you clean your build area and post the first few lines of the cmake command where the used compiler is shown.
One workaround is to disable all the fortran components with the option -Dfortran=OFF.

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