Hi,
In order to analyze my data in root, I have to run certain simulation, but when I try to compile it I receive an error message:
/tmp/cc8hgmN4.o: In function MAIN__': sim_pd.f:(.text+0x90c): undefined reference tohlimit_’
sim_pd.f:(.text+0x944): undefined reference to hropen_' sim_pd.f:(.text+0x985): undefined reference tohbookn_’
sim_pd.f:(.text+0xe79): undefined reference to hlimit_' sim_pd.f:(.text+0xeb6): undefined reference tohropen_’
sim_pd.f:(.text+0xef7): undefined reference to hbookn_' sim_pd.f:(.text+0x3690): undefined reference tohfn_’
sim_pd.f:(.text+0x3822): undefined reference to hrout_' sim_pd.f:(.text+0x3840): undefined reference tohldir_’
sim_pd.f:(.text+0x3864): undefined reference to rzstat_' sim_pd.f:(.text+0x3878): undefined reference tohrend_’
collect2: error: ld returned 1 exit status
Script is attached.
You should find out where the cernlib libraries are located on your machine … if they are …
what kind of machine are you using ?
Note that cernlib is frozen for years right now, and not supported anymore.
If your program is not to big can you post it here to see how it looks like ?
ROOT does not contain the CERNLIB library it just have a small subset of it in the .a I mentioned before. This is for internal ROOT usage only two translate HBOOK files to ROOT files.
Try first for like the way I suggested … it takes no time.
If it does not work try to find CERNLIB installed for Ubuntu.
If you google “cernlib for ubuntu” you will find some links.
hello again,
so, when i tried with this: gfortran -o sim_pd sim_pd.f $ROOTSYS/lib/libminicern.a but I got this message: /lib/libminicern.a: No such file or directory
then I tried to instal cernlib, I got this message:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Sorry, my mistake: I did this:
gfortran -o sim_pd sim_pd.f /home/bojan/root/lib/libminicern.a
and got this:
/tmp/ccbQowoD.o: In function MAIN__': sim_pd.f:(.text+0x985): undefined reference tohbookn_'
sim_pd.f:(.text+0xef7): undefined reference to hbookn_' sim_pd.f:(.text+0x3690): undefined reference tohfn_'
sim_pd.f:(.text+0x3822): undefined reference to hrout_' sim_pd.f:(.text+0x3864): undefined reference torzstat_'
collect2: error: ld returned 1 exit status
In your program you only book and ntuple and fill it. This can be also done with a ROOT macro. Then you will have to learn a bit of C++ and rewrite you program in this language. That might be worst the effort …
I tried to install cernlib foloving this: installion.co.uk/ubuntu/xenial/u … index.html
but I got message that I sent you earlier:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?