some bug
cxwx opened this issue · 6 comments
My system Mac os X lastest
Darwin newas.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
using root5 OK, root6 with below bugs
the problem seem to be I use clang from homebrew installed.
clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /usr/local/bin
not system /usr/bin
how should I do?
installing bug:
In file included from root_numpy/src/_librootnumpy.cpp:460:
In file included from /Users/chenxu/software/ROOT/install/include/TClass.h:24:
In file included from /Users/chenxu/software/ROOT/install/include/TDictionary.h:44:
In file included from /Users/chenxu/software/ROOT/install/include/TNamed.h:26:
In file included from /Users/chenxu/software/ROOT/install/include/TString.h:28:
/Users/chenxu/software/ROOT/install/include/RStringView.h:35:12: error: unknown type name 'basic_string_view'
typedef basic_string_view string_view;
^
/Users/chenxu/software/ROOT/install/include/RStringView.h:35:29: error: expected unqualified-id
typedef basic_string_view string_view;
^
/Users/chenxu/software/ROOT/install/include/RStringView.h:36:12: error: unknown type name 'basic_string_view'
typedef basic_string_view<char16_t> u16string_view;
^
/Users/chenxu/software/ROOT/install/include/RStringView.h:36:29: error: expected unqualified-id
typedef basic_string_view<char16_t> u16string_view;
^
/Users/chenxu/software/ROOT/install/include/RStringView.h:37:12: error: unknown type name 'basic_string_view'
typedef basic_string_view<char32_t> u32string_view;
^
/Users/chenxu/software/ROOT/install/include/RStringView.h:37:29: error: expected unqualified-id
typedef basic_string_view<char32_t> u32string_view;
^
/Users/chenxu/software/ROOT/install/include/RStringView.h:38:12: error: unknown type name 'basic_string_view'
typedef basic_string_view<wchar_t> wstring_view;
^
/Users/chenxu/software/ROOT/install/include/RStringView.h:38:29: error: expected unqualified-id
typedef basic_string_view<wchar_t> wstring_view;
^
/Users/chenxu/software/ROOT/install/include/RStringView.h:50:28: error: no member named 'to_string' in 'std::__1::basic_string_view<char, std::__1::char_traits >'
return std::stod(str.to_string(),pos);
~~~ ^
In file included from root_numpy/src/_librootnumpy.cpp:460:
In file included from /Users/chenxu/software/ROOT/install/include/TClass.h:24:
In file included from /Users/chenxu/software/ROOT/install/include/TDictionary.h:44:
In file included from /Users/chenxu/software/ROOT/install/include/TNamed.h:26:
/Users/chenxu/software/ROOT/install/include/TString.h:109:75: error: no member named 'to_string' in 'std::__1::basic_string_view<char, std::__1::char_traits >'
operator std::string() const { return std::string_view(Data(),fExtent).to_string(); }
Hi @cxwx - this looks like a cross-referencing issue.
- are you using virtualenvironments
- what do you get if you run
ROOT.__file__
from the python interpreter?
It looks like it's trying to install root_numpy on ROOT5, an not ROOT6, so I wonder how you keep track of the two. I use homebrew and I've installed both, so if I wanted to use root5 or root6, I run these bash functions
localSetupROOT(){
. $(brew --prefix root)/libexec/thisroot.sh
}
localSetupROOT6(){
. $(brew --prefix root6)/libexec/thisroot.sh
}
which switches out my environment to include one or the other (using homebrew'd root).
answer below
are you using virtualenvironments
no
what do you get if you run ROOT.file from the python interpreter?
/Users/chenxu/software/ROOT/install/lib/ROOT.pyc
I use ROOT compiler by myself, only ROOT6 environment (ROOT5 has been completely removed)
I had solve it by unlink llvm package from homebrew, and use system clang instead.
hope it would help.
This comes up again if you are mixing Apple clang 9 with (not-High) Sierra (which is what happens if you update Xcode). An easy fix is to edit include/root/RConfigure.h
(either brew or official download both are affected). Just change:
#undef R__HAS_STD_STRING_VIEW /**/
#define R__HAS_STD_EXPERIMENTAL_STRING_VIEW /**/
to:
#define R__HAS_STD_STRING_VIEW /**/
#undef R__HAS_STD_EXPERIMENTAL_STRING_VIEW /**/
There are not many changes between Apple clang 8 (roughly clang 3.9) and Apple clang 9 (roughly clang 4.0), but that seems to be one of them.
Hello,
many thanks henryiii for your very precise comment. I fix all the errors but this
In file included from input_line_12:9:
In file included from ././read_multithr.C:2:
In file included from /Applications/root/include/TGraph.h:25:
In file included from /Applications/root/include/TNamed.h:29:
/Applications/root/include/TString.h:117:75: error: no member named 'to_string' in 'std::__1::basic_string_view<char, std::__1::char_traits >'
operator std::string() const { return std::string_view(Data(),fExtent).to_string(); }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
it is still there
do you have any idea?
thanks
emanuele
This was fixed on May 3rd, and is in the latest version of ROOT (6.10.06). std::string_view
does not have a to_string
function; the correct way is to use either std::string(Data(),fExtent)
or begin and end. See https://github.com/root-project/root/commits/master/core/base/inc/TString.h
thanks a lot, now it works fine
Emanuele