Building root-6.22.02 from source code giving errors

___hello,
I am trying to build root-6.22.02 from source file on CentOS7.6.1810 (Core).

cmake ..

command shows

-- Found GCC. Major version 4, minor version 8

but the gcc version installed is 8.3.0

gcc --version
gcc (GCC) 8.3.0

Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and while doing make -j12 command it shows warning:

Warning in cling::IncrementalParser::CheckABICompatibility():
  Possible C++ standard library mismatch, compiled with __GLIBCXX__ '20150623'
  Extraction of runtime standard library version was: '20190222'

and errors:

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TBaseClass, respectively 128 152

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TClassRef, respectively 16 40

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TClassRef, respectively 16 40

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TEnum, respectively 216 240

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TBaseClass, respectively 128 152

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TClassRef, respectively 16 40

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TClassRef, respectively 16 40

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TBaseClass, respectively 128 152

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TClassRef, respectively 16 40

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TClassRef, respectively 16 40

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TEnum, respectively 216 240

[ 77%] Built target SrvAuth
Scanning dependencies of target G__RootAuth
Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TBaseClass, respectively 128 152

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TClassRef, respectively 16 40

Error in <TInterpreter::InspectMembers>: TClass and cling disagree on the size of the class TClassRef, respectively 16 40

and I am getting more errors:

CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::ReadBuffer(char*, long long, int)':
TNetXNGFile.cxx:(.text+0x394): undefined reference to `XrdCl::Status::ToString() const'
TNetXNGFile.cxx:(.text+0x8d9): undefined reference to `XrdCl::Status::ToString() const'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::ReOpen(char const*)':
TNetXNGFile.cxx:(.text+0x2e03): undefined reference to `XrdCl::Status::ToString() const'
TNetXNGFile.cxx:(.text+0x2faa): undefined reference to `XrdCl::File::Open(std::string const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, unsigned short)'
TNetXNGFile.cxx:(.text+0x3038): undefined reference to `XrdCl::Status::ToString() const'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::GetVectorReadLimits()':
TNetXNGFile.cxx:(.text+0x3fc8): undefined reference to `XrdCl::File::GetProperty(std::string const&, std::string&) const'
TNetXNGFile.cxx:(.text+0x3fea): undefined reference to `XrdCl::URL::URL(std::string const&)'
TNetXNGFile.cxx:(.text+0x4050): undefined reference to `XrdCl::File::GetProperty(std::string const&, std::string&) const'
TNetXNGFile.cxx:(.text+0x408c): undefined reference to `XrdCl::URL::URL(std::string const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::SetEnv()':
TNetXNGFile.cxx:(.text+0x4b87): undefined reference to `XrdCl::Env::PutInt(std::string const&, int)'
TNetXNGFile.cxx:(.text+0x4c36): undefined reference to `XrdCl::Env::PutInt(std::string const&, int)'
TNetXNGFile.cxx:(.text+0x4ce6): undefined reference to `XrdCl::Env::PutInt(std::string const&, int)'
TNetXNGFile.cxx:(.text+0x4d96): undefined reference to `XrdCl::Env::PutInt(std::string const&, int)'
TNetXNGFile.cxx:(.text+0x4e46): undefined reference to `XrdCl::Env::PutInt(std::string const&, int)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o:TNetXNGFile.cxx:(.text+0x4ef6): more undefined references to `XrdCl::Env::PutInt(std::string const&, int)' follow
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::SetEnv()':
TNetXNGFile.cxx:(.text+0x5352): undefined reference to `XrdCl::Env::PutString(std::string const&, std::string const&)'
TNetXNGFile.cxx:(.text+0x5447): undefined reference to `XrdCl::Env::PutString(std::string const&, std::string const&)'
TNetXNGFile.cxx:(.text+0x553c): undefined reference to `XrdCl::Env::PutString(std::string const&, std::string const&)'
TNetXNGFile.cxx:(.text+0x55d6): undefined reference to `XrdCl::Env::PutInt(std::string const&, int)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::TNetXNGFile(char const*, char const*, char const*, char const*, int, int, bool)':
TNetXNGFile.cxx:(.text+0x6898): undefined reference to `XrdCl::DefaultEnv::SetLogLevel(std::string const&)'
TNetXNGFile.cxx:(.text+0x693e): undefined reference to `XrdCl::URL::URL(std::string const&)'
TNetXNGFile.cxx:(.text+0x6ba0): undefined reference to `XrdCl::File::Open(std::string const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, XrdCl::ResponseHandler*, unsigned short)'
TNetXNGFile.cxx:(.text+0x6cee): undefined reference to `XrdCl::File::Open(std::string const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, unsigned short)'
TNetXNGFile.cxx:(.text+0x6d7c): undefined reference to `XrdCl::Status::ToString() const'
TNetXNGFile.cxx:(.text+0x6eff): undefined reference to `XrdCl::Status::ToString() const'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `XrdCl::XRootDStatus::ToStr() const':
TNetXNGFile.cxx:(.text._ZNK5XrdCl12XRootDStatus5ToStrEv[_ZNK5XrdCl12XRootDStatus5ToStrEv]+0x2c): undefined reference to `XrdCl::Status::ToString() const'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::GetDirEntry(void*)':
TNetXNGSystem.cxx:(.text+0x1c3): undefined reference to `XrdCl::FileSystem::DirList(std::string const&, XrdCl::DirListFlags::Flags, XrdCl::DirectoryList*&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::MakeDirectory(char const*)':
TNetXNGSystem.cxx:(.text+0x457): undefined reference to `XrdCl::FileSystem::MkDir(std::string const&, XrdCl::MkDirFlags::Flags, XrdCl::Access::Mode, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::Unlink(char const*)':
TNetXNGSystem.cxx:(.text+0x7aa): undefined reference to `XrdCl::FileSystem::Stat(std::string const&, XrdCl::StatInfo*&, unsigned short)'
TNetXNGSystem.cxx:(.text+0x7e0): undefined reference to `XrdCl::FileSystem::Rm(std::string const&, unsigned short)'
TNetXNGSystem.cxx:(.text+0x917): undefined reference to `XrdCl::FileSystem::RmDir(std::string const&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::GetPathInfo(char const*, FileStat_t&)':
TNetXNGSystem.cxx:(.text+0xd16): undefined reference to `XrdCl::FileSystem::Stat(std::string const&, XrdCl::StatInfo*&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::TNetXNGSystem(char const*, bool)':
TNetXNGSystem.cxx:(.text+0x1e64): undefined reference to `XrdCl::URL::URL(std::string const&)'
TNetXNGSystem.cxx:(.text+0x1ea0): undefined reference to `XrdCl::URL::URL(std::string const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::Stage(TCollection*, unsigned char)':
TNetXNGSystem.cxx:(.text+0x2b8a): undefined reference to `XrdCl::FileSystem::Prepare(std::vector<std::string, std::allocator<std::string> > const&, XrdCl::PrepareFlags::Flags, unsigned char, XrdCl::Buffer*&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::Locate(char const*, TString&)':
TNetXNGSystem.cxx:(.text+0x30a0): undefined reference to `XrdCl::FileSystem::Locate(std::string const&, XrdCl::OpenFlags::Flags, XrdCl::LocationInfo*&, unsigned short)'
TNetXNGSystem.cxx:(.text+0x316c): undefined reference to `XrdCl::URL::URL(std::string const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libNetxNG.so] Error 1
make[1]: *** [net/netxng/CMakeFiles/NetxNG.dir/all] Error 2

How to get rid of this problem? I am doing this as a root user(administrator).
if I do it as non-administrator, I am not getting the last errors (from where I’ve written that I am getting more errors), but previous errors remain same. and as non-administrator, I am getting error

***Break***segment violation

while doing make -j12 command.
What should I do?
Thanks in advance.

ROOT Version: 6.22.02
Platform: CentOS 7.6
Compiler: Not Provided


Hi @subhadeep,

Are you using a toolchain provided by any version of the devtoolset package? If so, you must first enter the environment via, e.g. $ scl enable devtoolset-X bash, but please beware that devtoolset is not completely supported by the ROOT’s C++ interpreter and you might run into problems later.

That said, we strongly encourage users to install ROOT via a precompiled binary distribution; see Installing ROOT - ROOT for more details.

Cheers,
J.

Hi @jalopezg ,
Thanks for the quick reply. devtoolset --version shows:

devtoolset --version
bash: devtoolset: command not found...

This means not installed, I guess. Though I am not sure if this one is the right way to check or not.
I’ve tried the pre-compiled binary version. it worked finely. The problem is I need to use Delphes which requires ROOT. when I tried to install Delphes with pre-compiled version, I was having problems. I guess building from source is the only way.

Hi @subhadeep,

The devtoolset package does not install a binary named devtoolset; that’s why. What problems did you have regarding the installation of Delphes as a precompiled package?
You might also try the following:

  • Using a precompiled version of ROOT, but build Delphes from sources. Just be sure to use the same C++ standard that ROOT used when it was built - you can query that via $ root-config --features.
  • Try installing devtoolset-8 or devtoolset-9 and then enter the environment via $ scl enable devtoolset-8 bash. Then you can follow the regular ROOT’s “Building from source” instructions. After installing ROOT you can also build Delphes. Note that this is not guaranteed to work, as devtoolset is not officially supported in ROOT.
  • Alternatively, you might want to upgrade to CentOS 8.

Cheers,
J.

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