Path for xrdcp

Hello,

I am setting up ROOT from AFS at CERN following these instructions:

root.cern.ch/drupal/content/prod … 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,
Rustem

Hi Rustem,

Xrootd is now an external package, and is not distributed with root anymore. Tu use xrdcp, you have to add /afs/cern.ch/sw/lcg/external/xrootd/3.1.0p2/x86_64-slc5-gcc43-opt/bin to your PATH and /afs/cern.ch/sw/lcg/external/xrootd/3.1.0p2/x86_64-slc5-gcc43-opt/lib 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!

Cheers,
Rustem

Hello,

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,
Tae

Here’s my setup:

BUILD=x86_64-slc5-gcc43-dbg export XRDPATH=/afs/cern.ch/sw/lcg/external/xrootd/3.1.0p2/$BUILD export ROOTSYS=/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.01/$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://eosatlas.cern.ch//eos/MYPATH/MYROOT.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/cern.ch/sw/lcg/app/releases/ROOT/5.32.01/x86_64-slc5-gcc43-dbg/root/include -c test.cxx

g++ -O -m64 -L/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.01/x86_64-slc5-gcc43-dbg/root/lib -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
[/code]

Here’s the error message

> ./test.exe dlopen error: libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by libXrdUtils.so.0) Load Error: Failed to load Dynamic link library /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.01/x86_64-slc5-gcc43-dbg/root/lib/libNetx.so 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/cern.ch/sw/lcg/external/gcc/4.3.2/x86_64-slc5/setup.csh
Cheers, Bertrand.