[ROOT] Re: relocation errors and invalid ELF error

From: Ricardo Eusebi (eusebi@fnal.gov)
Date: Fri Oct 22 2004 - 08:42:42 MEST


All the fortran libraries (hdecay/hdecay.o  hdecay/haber.o 
hdecay/feynhiggs.o) are linked!!!
However when I do a grep s_wsle *  the only files that contain it are 
the *.o files.  ( no fortran source file has it)
Seems to me (this may be a wild guess) that s_wsle is a reference to a 
fortran built function ( like atan or so)

So my two questions remain :
A- is this because the fortran libraries hdecay/*.o have not been 
 compiled with the Position Independent Code option ?
How do I compile with that option????

B- Is there away to circunvent this that do not require the 
recompilation of root ?

Thanks a lot

Ricardo


Philippe Canal wrote:

> Hi,
>  
> You should link your library against the fortran library (I think this 
> is where s_wsle comes from).
>  
> Cheers,
> Philippe.
>
> ------------------------------------------------------------------------
> *From:* Ricardo Eusebi [mailto:eusebi@fnal.gov]
> *Sent:* Thursday, October 21, 2004 10:41 AM
> *To:* roottalk
> *Cc:* pcanal@fnal.gov
> *Subject:* relocation errors and invalid ELF error
>
> Hi,
> I'm (trying to) implement a Root C++ interface to the fortran program 
> HDecay.
> I can succesfully create  a  executable that calls the proper fortran 
> routines. However when trying to link to root everything seems to fail.
> I took a look at http://root.cern.ch/root/HowtoCERNLIB.html but that 
> particular case refers to  CERN routines compiled without the option 
> Position Independent Code (whatever that means).
>
> So I essentially follow the third way in the above web page up to the 
> step 2 exclusive. I do not recompile root, nor I want to.
>
> so when loading the libraries I get
>
> root [0] gSystem->Load("libHDecay.so")
> (int)0
> root [1] HDecay a
> root [2] HDECAY_InputVars in = a.DefineInputs()
> root [3] BR_HC B = a.GetHiggsBR(120,in)
> /home/cdfsoft/products/root/v3_05_04dKCC_4_0/Linux+2.4/bin/root.exe: 
> relocation error: 
> /mnt/autofs/misc/people/eusebi/root_macros/./libHDecay.so: undefined 
> symbol: read_hdec_
>
> I thought that's because I didn't link the fortran libraries. So I 
> added the libraries (hdecay/*.o) in the makefile
> libHDecay.so : HDecay.o  hdecay/hdecay.o  hdecay/haber.o 
> hdecay/feynhiggs.o  HDecayDict.o 
>         $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@
>
> This compiles fine again, but the error in root this time is not 
> relocation but this :
>
> root [0] gSystem->Load("libHDecay.so")
> dlopen error: 
> /mnt/autofs/misc/people/eusebi/root_macros/./libHDecay.so: undefined 
> symbol: s_wsle
> Load Error: Failed to load Dynamic link library 
> /mnt/autofs/misc/people/eusebi/root_macros/./libHDecay.so
> (int)(-1)
> *** Interpreter error recovered ***
>
>
> QUESTIONS :
> A- is this because the fortran libraries hdecay/*.o have not been 
>  compiled with the Position Independent Code option ?
> How do I compile with that option????
>
> B- Is there away to circunvent this that do not require the 
> recompilation of root ? At FermiLab we change root versions pretty often.
>
> Thanks a lot
>
> Ricardo
>
>
>
>
>  
>
>
>
>-- 
>  --------------------------------------------------------------------
>| Ricardo Eusebi                |   Office :  CDF trailer 168-"O"    |
>| High Energy Physics           |   Phone  : (630) 840 8622          |
>| University of Rochester       |   email  : eusebi@fnal.gov         |
>  --------------------------------------------------------------------
>|               Fermi National Accelerator Laboratory                |
>|                    CDF - MS318 .  PO Box 500                       |
>|                     Batavia 60510, Illinois.                       |
>  --------------------------------------------------------------------
>  
>

-- 
  --------------------------------------------------------------------
| Ricardo Eusebi                |   Office :  CDF trailer 168-"O"    |
| High Energy Physics           |   Phone  : (630) 840 8622          |
| University of Rochester       |   email  : eusebi@fnal.gov         |
  --------------------------------------------------------------------
|               Fermi National Accelerator Laboratory                |
|                    CDF - MS318 .  PO Box 500                       |
|                     Batavia 60510, Illinois.                       |
  --------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET