# Linking issues for Netx

**URL:** <https://root-forum.cern.ch/t/linking-issues-for-netx/36065>\
**Category:** ROOT\
**Created:** [September 18, 2019, 6:59am UTC](https://root-forum.cern.ch/t/linking-issues-for-netx/36065 "2019-09-18T06:59:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bressan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bressan/32/33478_2.png) [@bressan](https://root-forum.cern.ch/u/bressan)\
**Post date:** [September 18, 2019, 6:59am UTC](https://root-forum.cern.ch/t/linking-issues-for-netx/36065/1 "2019-09-18T06:59:19Z")

</div>

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

```auto
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:

```auto
[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

* * *

---

<div class="post-metadata">

**Author:** ![oshadura](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/oshadura/32/14460_2.png) [@oshadura](https://root-forum.cern.ch/u/oshadura)\
**Post date:** [September 18, 2019, 8:42am UTC](https://root-forum.cern.ch/t/linking-issues-for-netx/36065/2 "2019-09-18T08:42:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bressan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bressan/32/33478_2.png) [@bressan](https://root-forum.cern.ch/u/bressan)\
**Post date:** [September 18, 2019, 9:01am UTC](https://root-forum.cern.ch/t/linking-issues-for-netx/36065/3 "2019-09-18T09:01:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![oshadura](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/oshadura/32/14460_2.png) [@oshadura](https://root-forum.cern.ch/u/oshadura)\
**Post date:** [September 18, 2019, 11:42am UTC](https://root-forum.cern.ch/t/linking-issues-for-netx/36065/4 "2019-09-18T11:42:15Z")

</div>

> [@bressan](#):
>
> -Dbuildin-xrootd=ON

it should be:

```auto
-Dbuiltin_xrootd=ON

```

Can you double check please?

---

<div class="post-metadata">

**Author:** ![bressan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bressan/32/33478_2.png) [@bressan](https://root-forum.cern.ch/u/bressan)\
**Post date:** [September 18, 2019, 11:53am UTC](https://root-forum.cern.ch/t/linking-issues-for-netx/36065/5 "2019-09-18T11:53:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bressan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bressan/32/33478_2.png) [@bressan](https://root-forum.cern.ch/u/bressan)\
**Post date:** [September 24, 2019, 2:31pm UTC](https://root-forum.cern.ch/t/linking-issues-for-netx/36065/6 "2019-09-24T14:31:11Z")

</div>

After correcting everything is working fine.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [October 8, 2019, 2:31pm UTC](https://root-forum.cern.ch/t/linking-issues-for-netx/36065/7 "2019-10-08T14:31:13Z")

</div>

Closed on October 8, 2019, 2:31pm UTC

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