Linking issues for Netx

I’m upgrading from root 6.16 to 6.18 and while doing that I stumbled in a compilation issue.
This started with conflicts with external XROOTD (from /cvmfs/sft.cern.ch/lcg/releases/xrootd/4.9.0-8e2008/x86_64-centos7-gcc63-opt) which I tried to overcome using internal.
root source is from git and branch is 6.18.00-rc1. Options are defined by

cmake3 -Dcxx14=ON -Dpythia6=ON -Dpythia8=ON -DCMAKE_INSTALL_PREFIX=$PWD/../root_v6.18.00_gcc6.3.1-opt $PWD/../root_v6.18.00 -DGDML=ON -Dgdml:BOOL=ON -DCMAKE_CXX_FLAGS='-fPIC -O2' -Dminuit2=ON -Dsoversion=ON -Drpath=ON -Dgl=OFF -DCMAKE-BUILD-TYPE=Optimized -Dbuildin-xrootd=ON 

here is the linking log:

[ 92%] Linking CXX shared library ../../lib/libNetxNG.so
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::ReadBuffer(char*, long long, int)':
TNetXNGFile.cxx:(.text+0x3f3): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
TNetXNGFile.cxx:(.text+0x909): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::Flush()':
TNetXNGFile.cxx:(.text+0x1646): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::WriteBuffer(char const*, int)':
TNetXNGFile.cxx:(.text+0x1ecc): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::ReadBuffers(char*, long long*, int*, int)':
TNetXNGFile.cxx:(.text+0x335c): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o:TNetXNGFile.cxx:(.text+0x3864): more undefined references to `XrdCl::Status::ToString\[abi:cxx11\]() const' follow
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::ReOpen(char const*)':
TNetXNGFile.cxx:(.text+0x499a): 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)'
TNetXNGFile.cxx:(.text+0x4abd): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
TNetXNGFile.cxx:(.text+0x4b79): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::GetVectorReadLimits()':
TNetXNGFile.cxx:(.text+0x5be9): 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+0x5c12): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGFile.cxx:(.text+0x5c9b): 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+0x5e69): 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+0x6b90): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
TNetXNGFile.cxx:(.text+0x72b9): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
TNetXNGFile.cxx:(.text+0x7319): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
TNetXNGFile.cxx:(.text+0x737f): undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
TNetXNGFile.cxx:(.text+0x73e7): 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+0x744f): 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+0x7756): 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+0x77fe): 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+0x78ae): 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&)'
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+0x7ebb): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGFile.cxx:(.text+0x814f): 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+0x829e): undefined reference to `XrdCl::DefaultEnv::SetLogLevel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGFile.cxx:(.text+0x831f): 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)'
TNetXNGFile.cxx:(.text+0x840d): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
TNetXNGFile.cxx:(.text+0x858d): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::Close(char const*)':
TNetXNGFile.cxx:(.text+0x98c7): undefined reference to `XrdCl::Status::ToString\[abi:cxx11\]() const'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::GetDirEntry(void*)':
TNetXNGSystem.cxx:(.text+0x62): 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::OpenDirectory(char const*)':
TNetXNGSystem.cxx:(.text+0x243): 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::MakeDirectory(char const*)':
TNetXNGSystem.cxx:(.text+0x51e): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x552): 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+0x713): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x749): 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+0x77c): undefined reference to `XrdCl::FileSystem::Rm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short)'
TNetXNGSystem.cxx:(.text+0x939): undefined reference to `XrdCl::FileSystem::RmDir(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::GetPathInfo(char const*, FileStat_t&)':
TNetXNGSystem.cxx:(.text+0xb49): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0xb82): 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::ConsistentWith(char const*, void*)':
TNetXNGSystem.cxx:(.text+0x12cf): 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+0x17fe): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x1856): 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+0x1ebb): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x2165): 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+0x238b): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
TNetXNGSystem.cxx:(.text+0x23cb): 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+0x2554): undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libNetxNG.so.6.19.01] Error 1

As a final comment, I don’t have the same problem on my local centos7 installation, where I’m
using the same compiler but from devtoolsets and not from
/cvmfs/sft.cern.ch/lcg/releases/gcc/6.3.0/x86_64-centos7/


ROOT Version: 6.18.00-rc1 (git branch)
Platform: lxplus (centos7)
Compiler: gcc 6.3.1


Can you try please to use latest ROOT release 6.18.04? In 6.18.04, builtin version of XrootD was upgraded to 4.10.0.

I’m switching to branch 6.18.04, and starting the configuration.

I noticed that even if I have -Dbuildin-xrootd=ON in the config cmake is looking for it in the system.
Is this correct?

– Found Xrootd version num: 4.9.1 (setting -DROOTXRDVERS=400090001)
– libXrdMain not found: xproofd will be a wrapper around xrootd
– include_dirs: /usr/include/xrootd;/afs/cern.ch/compass/scratch/monthly/d01_del1/bressan/roots/root_v6.18.04/proof/xrdinc
– libraries: /usr/lib64/libXrdUtils.so;/usr/lib64/libXrdClient.so;/usr/lib64/libXrdCl.so

it should be:

-Dbuiltin_xrootd=ON

Can you double check please?

Doubled checked, it was incorrect. It may be that.
I’ll restart the compilation and let you know,

After correcting everything is working fine.

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