Root don't want to work with GATE geant4 compilation


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.24/00
_Platform: GATE
_Compiler: CMake


In file included from /snap/root-framework/178/usr/local/include/TString.h:29,
from /snap/root-framework/178/usr/local/include/TNamed.h:26,
from /snap/root-framework/178/usr/local/include/TDirectory.h:24,
from /snap/root-framework/178/usr/local/include/TROOT.h:28,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRoot.hh:15,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/src/GateARFDataToRoot.cc:13:
/snap/root-framework/178/usr/local/include/ROOT/RStringView.hxx:84:17: error: expected type-specifier
84 | operator std::string_view() const { return std::string_view(fData,fLength); }
| ^~~
In file included from /snap/root-framework/178/usr/local/include/TString.h:29,
from /snap/root-framework/178/usr/local/include/TNamed.h:26,
from /snap/root-framework/178/usr/local/include/TDirectory.h:24,
from /snap/root-framework/178/usr/local/include/TROOT.h:28,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRoot.hh:15,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRootMessenger.hh:17,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/src/GateARFDataToRootMessenger.cc:12:
/snap/root-framework/178/usr/local/include/ROOT/RStringView.hxx:84:17: error: expected type-specifier
84 | operator std::string_view() const { return std::string_view(fData,fLength); }
| ^~~
In file included from /snap/root-framework/178/usr/local/include/TNamed.h:26,
from /snap/root-framework/178/usr/local/include/TDirectory.h:24,
from /snap/root-framework/178/usr/local/include/TROOT.h:28,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRoot.hh:15,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/src/GateARFDataToRoot.cc:13:
/snap/root-framework/178/usr/local/include/TString.h:115:13: error: expected type-specifier
115 | operator std::string_view() const { return std::string_view(Data(),fExtent); }
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:280:32: error: ‘string_view’ in namespace ‘std’ does not name a type
280 | explicit TString(const std::string_view &sub);
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:280:27: note: ‘std::string_view’ is only available from C++17 onwards
280 | explicit TString(const std::string_view &sub);
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:317:37: error: ‘string_view’ in namespace ‘std’ does not name a type
317 | TString &operator=(const std::string_view &s);
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:317:32: note: ‘std::string_view’ is only available from C++17 onwards
317 | TString &operator=(const std::string_view &s);
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:444:9: error: ‘string_view’ in namespace ‘std’ does not name a type
444 | std::string_view View() const { return std::string_view(GetPointer(),Length()); }
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:444:4: note: ‘std::string_view’ is only available from C++17 onwards
444 | std::string_view View() const { return std::string_view(GetPointer(),Length()); }
| ^~~
In file included from /snap/root-framework/178/usr/local/include/TNamed.h:26,
from /snap/root-framework/178/usr/local/include/TDirectory.h:24,
from /snap/root-framework/178/usr/local/include/TROOT.h:28,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRoot.hh:15,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/src/GateARFDataToRoot.cc:13:
/snap/root-framework/178/usr/local/include/TString.h:839:53: error: ‘string_view’ in namespace ‘std’ does not name a type
839 | inline Bool_t operator==(const char *s1, const std::string_view &s2)
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:839:48: note: ‘std::string_view’ is only available from C++17 onwards
839 | inline Bool_t operator==(const char s1, const std::string_view &s2)
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:839:15: error: ‘Bool_t operator==(const char
, const int&)’ must have an argument of class or enumerated type
839 | inline Bool_t operator==(const char *s1, const std::string_view &s2)
| ^~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:844:37: error: ‘string_view’ in namespace ‘std’ does not name a type
844 | inline Bool_t operator==(const std::string_view &s1, const char *s2)
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:844:32: note: ‘std::string_view’ is only available from C++17 onwards
844 | inline Bool_t operator==(const std::string_view &s1, const char s2)
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:844:15: error: ‘Bool_t operator==(const int&, const char
)’ must have an argument of class or enumerated type
844 | inline Bool_t operator==(const std::string_view &s1, const char *s2)
| ^~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:857:37: error: ‘string_view’ in namespace ‘std’ does not name a type
857 | std::string printValue(const std::string_view* val);
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:857:32: note: ‘std::string_view’ is only available from C++17 onwards
857 | std::string printValue(const std::string_view* val);
| ^~~
In file included from /snap/root-framework/178/usr/local/include/TNamed.h:26,
from /snap/root-framework/178/usr/local/include/TDirectory.h:24,
from /snap/root-framework/178/usr/local/include/TROOT.h:28,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRoot.hh:15,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRootMessenger.hh:17,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/src/GateARFDataToRootMessenger.cc:12:
/snap/root-framework/178/usr/local/include/TString.h:115:13: error: expected type-specifier
115 | operator std::string_view() const { return std::string_view(Data(),fExtent); }
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:280:32: error: ‘string_view’ in namespace ‘std’ does not name a type
280 | explicit TString(const std::string_view &sub);
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:280:27: note: ‘std::string_view’ is only available from C++17 onwards
280 | explicit TString(const std::string_view &sub);
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:317:37: error: ‘string_view’ in namespace ‘std’ does not name a type
317 | TString &operator=(const std::string_view &s);
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:317:32: note: ‘std::string_view’ is only available from C++17 onwards
317 | TString &operator=(const std::string_view &s);
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:444:9: error: ‘string_view’ in namespace ‘std’ does not name a type
444 | std::string_view View() const { return std::string_view(GetPointer(),Length()); }
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:444:4: note: ‘std::string_view’ is only available from C++17 onwards
444 | std::string_view View() const { return std::string_view(GetPointer(),Length()); }
| ^~~
In file included from /snap/root-framework/178/usr/local/include/TNamed.h:26,
from /snap/root-framework/178/usr/local/include/TDirectory.h:24,
from /snap/root-framework/178/usr/local/include/TROOT.h:28,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRoot.hh:15,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRootMessenger.hh:17,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/src/GateARFDataToRootMessenger.cc:12:
/snap/root-framework/178/usr/local/include/TString.h:839:53: error: ‘string_view’ in namespace ‘std’ does not name a type
839 | inline Bool_t operator==(const char *s1, const std::string_view &s2)
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:839:48: note: ‘std::string_view’ is only available from C++17 onwards
839 | inline Bool_t operator==(const char s1, const std::string_view &s2)
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:839:15: error: ‘Bool_t operator==(const char
, const int&)’ must have an argument of class or enumerated type
839 | inline Bool_t operator==(const char *s1, const std::string_view &s2)
| ^~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:844:37: error: ‘string_view’ in namespace ‘std’ does not name a type
844 | inline Bool_t operator==(const std::string_view &s1, const char *s2)
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:844:32: note: ‘std::string_view’ is only available from C++17 onwards
844 | inline Bool_t operator==(const std::string_view &s1, const char s2)
| ^~~
/snap/root-framework/178/usr/local/include/TString.h:844:15: error: ‘Bool_t operator==(const int&, const char
)’ must have an argument of class or enumerated type
844 | inline Bool_t operator==(const std::string_view &s1, const char *s2)
| ^~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:857:37: error: ‘string_view’ in namespace ‘std’ does not name a type
857 | std::string printValue(const std::string_view* val);
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TString.h:857:32: note: ‘std::string_view’ is only available from C++17 onwards
857 | std::string printValue(const std::string_view* val);
| ^~~
In file included from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRoot.hh:16,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/src/GateARFDataToRoot.cc:13:
/snap/root-framework/178/usr/local/include/TFile.h:327:45: error: ‘std::string_view’ has not been declared
327 | static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected = kTRUE,
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TFile.h: In static member function ‘static Bool_t TFile::SetCacheFileDir(ROOT::Internal::TStringView, Bool_t, Bool_t)’:
/snap/root-framework/178/usr/local/include/TFile.h:326:36: error: ‘string_view’ is not a member of ‘std’
326 | { return SetCacheFileDir(std::string_view(cacheDir), operateDisconnected, forceCacheread); }
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TFile.h:326:36: note: ‘std::string_view’ is only available from C++17 onwards
In file included from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRoot.hh:16,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/include/GateARFDataToRootMessenger.hh:17,
from /home/soufiyan/Gate_v9.0/Gate-9.0/source/arf/src/GateARFDataToRootMessenger.cc:12:
/snap/root-framework/178/usr/local/include/TFile.h:327:45: error: ‘std::string_view’ has not been declared
327 | static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected = kTRUE,
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TFile.h: In static member function ‘static Bool_t TFile::SetCacheFileDir(ROOT::Internal::TStringView, Bool_t, Bool_t)’:
/snap/root-framework/178/usr/local/include/TFile.h:326:36: error: ‘string_view’ is not a member of ‘std’
326 | { return SetCacheFileDir(std::string_view(cacheDir), operateDisconnected, forceCacheread); }
| ^~~~~~~~~~~
/snap/root-framework/178/usr/local/include/TFile.h:326:36: note: ‘std::string_view’ is only available from C++17 onwards

I’m unfamiliar with Geant and GATE, and I’ll spend some time later looking at how they interact with ROOT and how/if they can be accomodated with the ROOT snap. In the interests of efficiency and simplicity however, I’d recommend swapping to use the other ROOT packages such as the precompiled binaries or Conda.

At a glance, I imagine that this is some incompatibility between the snap and Geant/GATE being on different C++ versions with different standard libraries available to them, it’s likely much easier to fix this by replacing the snap than it would be for a user to build Geant as if it were part of the snap, but until I have some free time I couldn’t give any real advice.

2 Likes

hi sir okey i will try to install another packages ROOT then i answer thanks you .

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