Path for xrdcp


I am setting up ROOT from AFS at CERN following these instructions: … ersion-532

With this version, there is no xrdcp in my PATH. What do I need to do to pick up a correct version of xrdcp binary with v5.32?

Thank you,

Hi Rustem,

Xrootd is now an external package, and is not distributed with root anymore. Tu use xrdcp, you have to add /afs/ to your PATH and /afs/ to your LD_LIBRARY_PATH.
(replace “x86_64-slc5-gcc43-opt” by your version if needed)

Cheers, Bertrand.

Hi Bertrand,

This worked. Thanks a lot!



I’ve been trying to compile a piece of code that opens a TFile using xrootd. I saw the reply above, but it doesn’t seem to work for me. I’m doing this on lxplus. Any hints would be appreciated.

best regards,

Here’s my setup:

BUILD=x86_64-slc5-gcc43-dbg export XRDPATH=/afs/$BUILD export ROOTSYS=/afs/$BUILD/root export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib:$XRDPATH/lib export PATH=$PATH:$ROOTSYS/bin:$XRDPATH/bin

Here’s my code:

#include "TFile.h" int main(int argc, char* argv[]) { TFile * tfile = TFile::Open("root://"); if (tfile) { printf("%s\n", tfile->GetName()); fflush(stdout); } return 1; }

Here’s my compilation & linking

[code]> g++ -g -O -Wall -fPIC -pthread -m64 -I/afs/ -c test.cxx

g++ -O -m64 -L/afs/ -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lTMVA -lTreePlayer test.o -o test.exe

Here’s the error message

> ./test.exe dlopen error: version `GLIBCXX_3.4.9' not found (required by Load Error: Failed to load Dynamic link library /afs/ Error in <TPluginHandler::SetupCallEnv>: class TXNetFile not found in plugin Netx

That’s all!

You need to set up the compiler environment. For example, if you use bash:

and if you use [t]csh:source /afs/
Cheers, Bertrand.