Error in compiling ROOT-6.26.10


Hi, all:

I am trying to compile root-6.26.10 on a Linux (Scientific Linux release 7.3 (Nitrogen)) machine. Because it doesn’t have the newest gcc, I compiled gcc-10.5.0 myself, which succeeded. Then I used the new gcc to compile root-6.26.10, unfortunately, it failed. Here is the error message:

[ 91%] Linking CXX shared library ../../lib/libNetxNG.so
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::ReOpen(char const*)':
TNetXNGFile.cxx:(.text+0x2176): undefined reference to `XrdCl::File::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::GetVectorReadLimits()':
TNetXNGFile.cxx:(.text+0x2639): undefined reference to `XrdCl::File::GetProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
TNetXNGFile.cxx:(.text+0x266f): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGFile.cxx:(.text+0x270d): undefined reference to `XrdCl::File::GetProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
TNetXNGFile.cxx:(.text+0x2742): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::SetEnv()':
TNetXNGFile.cxx:(.text+0x321c): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
TNetXNGFile.cxx:(.text+0x3306): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
TNetXNGFile.cxx:(.text+0x33ec): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
TNetXNGFile.cxx:(.text+0x34f1): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
TNetXNGFile.cxx:(.text+0x35ee): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o:TNetXNGFile.cxx:(.text+0x36ee): more undefined references to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' follow
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::SetEnv()':
TNetXNGFile.cxx:(.text+0x3cc8): undefined reference to `XrdCl::Env::PutString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGFile.cxx:(.text+0x3e29): undefined reference to `XrdCl::Env::PutString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGFile.cxx:(.text+0x3fa0): undefined reference to `XrdCl::Env::PutString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGFile.cxx:(.text+0x4063): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > 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+0x4e5c): undefined reference to `XrdCl::DefaultEnv::SetLogLevel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGFile.cxx:(.text+0x4f4f): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGFile.cxx:(.text+0x520c): undefined reference to `XrdCl::File::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, XrdCl::ResponseHandler*, unsigned short)'
TNetXNGFile.cxx:(.text+0x5404): undefined reference to `XrdCl::File::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `XrdCl::XRootDStatus::ToStr[abi:cxx11]() const':
TNetXNGFile.cxx:(.text._ZNK5XrdCl12XRootDStatus5ToStrB5cxx11Ev[_ZNK5XrdCl12XRootDStatus5ToStrB5cxx11Ev]+0x2c): undefined reference to `XrdCl::Status::ToString[abi:cxx11]() const'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::GetDirEntry(void*)':
TNetXNGSystem.cxx:(.text+0x64): undefined reference to `XrdCl::FileSystem::DirList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::DirListFlags::Flags, XrdCl::DirectoryList*&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::MakeDirectory(char const*)':
TNetXNGSystem.cxx:(.text+0xe00): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0xe3a): undefined reference to `XrdCl::FileSystem::MkDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > 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+0x110f): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x114f): undefined reference to `XrdCl::FileSystem::Stat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::StatInfo*&, unsigned short)'
TNetXNGSystem.cxx:(.text+0x1186): undefined reference to `XrdCl::FileSystem::RmDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short)'
TNetXNGSystem.cxx:(.text+0x142e): undefined reference to `XrdCl::FileSystem::Rm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::ConsistentWith(char const*, void*)':
TNetXNGSystem.cxx:(.text+0x1741): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::TNetXNGSystem(char const*, bool)':
TNetXNGSystem.cxx:(.text+0x1e32): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x1ec8): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::GetPathInfo(char const*, FileStat_t&)':
TNetXNGSystem.cxx:(.text+0x2264): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x22a6): undefined reference to `XrdCl::FileSystem::Stat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::StatInfo*&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::OpenDirectory(char const*)':
TNetXNGSystem.cxx:(.text+0x2bc1): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::Stage(TCollection*, unsigned char)':
TNetXNGSystem.cxx:(.text+0x2e02): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x30ba): undefined reference to `XrdCl::FileSystem::Prepare(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > 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+0x35ce): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x360f): undefined reference to `XrdCl::FileSystem::Locate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::OpenFlags::Flags, XrdCl::LocationInfo*&, unsigned short)'
TNetXNGSystem.cxx:(.text+0x38a4): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/NetxNG.dir/src/RRawFileNetXNG.cxx.o: In function `ROOT::Internal::RRawFileNetXNG::OpenImpl()':
RRawFileNetXNG.cxx:(.text+0x1b7): undefined reference to `XrdCl::File::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, unsigned short)'
CMakeFiles/NetxNG.dir/src/RRawFileNetXNG.cxx.o: In function `ROOT::Internal::RRawFileNetXNG::GetSizeImpl() [clone .cold]':
RRawFileNetXNG.cxx:(.text.unlikely+0x4f): undefined reference to `XrdCl::Status::ToString[abi:cxx11]() const'
CMakeFiles/NetxNG.dir/src/RRawFileNetXNG.cxx.o: In function `ROOT::Internal::RRawFileNetXNG::OpenImpl() [clone .cold]':
RRawFileNetXNG.cxx:(.text.unlikely+0x2ff): undefined reference to `XrdCl::Status::ToString[abi:cxx11]() const'
CMakeFiles/NetxNG.dir/src/RRawFileNetXNG.cxx.o: In function `ROOT::Internal::RRawFileNetXNG::ReadAtImpl(void*, unsigned long, unsigned long) [clone .cold]':
RRawFileNetXNG.cxx:(.text.unlikely+0x5a1): undefined reference to `XrdCl::Status::ToString[abi:cxx11]() const'
CMakeFiles/NetxNG.dir/src/RRawFileNetXNG.cxx.o: In function `ROOT::Internal::RRawFileNetXNG::ReadVImpl(ROOT::Internal::RRawFile::RIOVec*, unsigned int) [clone .cold]':
RRawFileNetXNG.cxx:(.text.unlikely+0x858): undefined reference to `XrdCl::Status::ToString[abi:cxx11]() const'
collect2: error: ld returned 1 exit status
gmake[2]: *** [lib/libNetxNG.so] Error 1
gmake[1]: *** [net/netxng/CMakeFiles/NetxNG.dir/all] Error 2
gmake: *** [all] Error 2

Please help, thank you.

ROOT Version: 6.26.10
Platform: Scientific Linux release 7.3 (Nitrogen)
Compiler: gcc 10.5.0


Hi @weibin,

welcome back to the root forum. Are you absolutely sure you need to build root from source? Maybe you could use another available method to install it, for example using conda? Installing ROOT - ROOT

Cheers,
Marta

Hi @mczurylo

Thank you for your suggestion. I will try conda later. Meanwhile, I still want to compile root, I think I am almost there. Can you tell me what’s wrong, looks like some NetxNG related functions are missing.

Best,
Weibin

Hi @weibin,

ok, we’ll try to help. Maybe @Axel could take a look?

Cheers,
Marta

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