Dear Ganis,
thank you for your answer.
I was given one routine by one guy 2 years ago, which worked remotely (bsub) calling other routines. He had given me also a Makefile to link everything together.
All these routines opend some files stored on CASTOR, filled histograms and saved them in ROOT files again in CASTOR.
Everything worked up to May 2009. I didn't use that from May up to now. The original Makefile was:
analisi.bckg.Am.exe: analisi.bckg.Am.c
$(CC) $(CFLAGS) analisi.bckg.Am.c $(INCLUDE) $(VARIAFLAGS) `root-config --cflags --glibs` $(ROOTFLAGS) -o analisi.bckg.Am.exe
@echo '**********************************' @echo '*** analisi.bckg.Am.exe produced ***' @echo '**********************************'
clean:
rm analisi.bckg.Am.exe
Where lCASTOR2LIB are libraries specifically made by a man for reading
some data in our group.
But now in /usr/local/include/shift on lxplus there's nothing. Therefore I
changed /usr/loical/include/shift with /usr/lib
I tried as you suggested
> $ source
> /afs/cern.ch/sw/lcg/external/root/5.17.04/slc4_ia32_gcc34/root/bin/thisroot.sh
and cutting -lRCastor in the line
ROOTFLAGS=-lRFIO -O -fPIC -lSpectrum -lRCastor
In this case after digiting make I obtain no error anymore, but when
launching the routines another error shows up
Opening CASTOR file
/castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished in
directory 2004/fission. Wait for S TAGER_GET of file.
System command is stager_get -S default -M
/castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished -U
run8203_0.i dx.finished
If I want to link with the shift libraries, what should I write, please?
Thank you,
best regards,
Francesca Belloni
> > Dear Francesca, > > Could you explain exactly how you want to use CASTOR into a ROOT > application? > If you want to open files via TFile::Open("castor:/castor/...") or > TFile::Open("rfio:/castor/..."), > which is the advised way, you do not need to link with the shift > libraries but just to > make sure that those libraries are in the LD_LIBRARY_PATH when you > run: >
> /afs/cern.ch/sw/lcg/external/root/5.17.04/slc4_ia32_gcc34/root/bin/thisroot.sh
> LD_LIBRARY_PATH=/afs/cern.ch/sw/lcg/external/castor/2.1.1-9/slc4_ia32_gcc34/usr/lib:$LD_LIBRARY_PATH > > > Gerri Ganis > > > francesca.belloni_at_ts.infn.it wrote: >> Hi. >> I'm trying to use ROOT with CASTOR2, but when I when compiling one >> routine, the following error message appears: >> >> >> ------- >> /afs/cern.ch/sw/lcg/external/root/5.17.04/slc4_ia32_gcc34/root/lib/libRCastor.so: >> undefined reference to `rfio_HsmIf_reqtoput' >> collect2: ld returned 1 exit status >> ------- >> >> >> The Makefile starts with >> >> CC=g++ >> CFLAGS=-Wall -m32 -O2 >> INCLUDE=-I/usr/lib >> ROOTFLAGS=-lRFIO -O -fPIC -lRCastor >> VARIAFLAGS=-L/usr/lib -lshift -lnsl -lcrypt -ldl -lm >> >> >> The gcc version is gcc (GCC) 3.4.6 >> >> What is wrong, please? >> >> Thanks, >> best regards, >> Francesca Belloni >> >> >> > > > -- > +--------------------------------------------------------------------------+ > Gerardo GANIS CERN, PH Dept, SFT group, CH 1211 Geneve 23 > room: 32-RC-017, tel: +41 22 7676439 > email: gerardo.ganis_at_cern.ch, fax: +41 22 7669133 > +--------------------------------------------------------------------------+ > > >Received on Thu Jan 21 2010 - 10:15:06 CET
This archive was generated by hypermail 2.2.0 : Thu Jan 21 2010 - 11:50:01 CET