Re: [ROOT] Compiling statically on Debian.......

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 21 2003 - 08:41:56 MET


Hi Matt,

With your static module, you will be able to run Root on your friend machine,
but not able to execute CINT scripts that require access to the
run time CINT include files and dlls, eg in your case when fitting
an histogram/graph with an interpreted function.

In order to interpret/compile these scripts, CINT will need access
to a temp area (ef /tmp) to write some intermediate and temporary files.

I am forwarding your point to Masa. It could be that only a very small subset of
the CINT directories is required at run time.

Rene Brun

Matthew Bellis wrote:
> 
> I'm confused. I think my ignorance is showing, so bear with me.
> 
> I have written an executable that calls TMinuit functions. I compile
> this on my debian machine which has the full root (3.04.02)
> installation. I compile with dll's and everything's OK.
> 
> I want to run this executable on another machine which runs red hat. It
> is not trivial to install root on this machine as it's not really mine,
> but nice people are letting me use it. I thought I could compile my
> executable statically using libRoot.a and I could run it on another
> Linux box. But it seems you say I need Cint directories on the other
> machine? Is this right? Is there no other way for me to transport my
> executable without installing root on the other machine? Is it like
> that for anything using root, or just TMinuit?
> Matt
> 
> On 2003.03.19 16:21 Rene Brun wrote:
> > Matt,
> >
> > This problem has nothing to do with static linking.
> > To run Root/Cint, you need the cint directory with its includes
> > for the run time. In your case, it looks like you try
> > to fit with an interpreted Cint function. This requires the
> > Cint directories.
> >
> > Rene Brun
> >
> > On Wed, 19
> > Mar 2003,
> > Matthew Bellis wrote:
> >
> > > OK. This compiles. But now I copy it to a machine where no ROOT
> > lives.
> > > I run it and I get this........
> > >
> > > Error: cannot open /usr/local/share/root/cint/MAKEINFO
> > > !!! There are examples of MAKEINFO files under
> > > /usr/local/share/root/cint/platform/ !!!
> > > Please refer to these examples and create for your platform
> > > dlopen error: /tmp/HZu3X6_cintNM: invalid ELF header
> > > Load Error: Failed to load Dynamic link library /tmp/HZu3X6_cintNM
> > >   **********
> > >   **    1 **SET ERR         0.5
> > >   **********
> > >
> > >
> > > It just hangs at this point.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 2003.03.19 02:42 Rene Brun wrote:
> > > > Hi Matt,
> > > >
> > > > Add option "-ldl" in your link sequence.
> > > > See with
> > > >   root-config --libs
> > > > the list of options for linking
> > > >
> > > > Rene Brun
> > > >
> > > > On Tue, 18 Mar 2003, Matthew
> > > > Bellis wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > >         I'm running root 3.04.02 on a debian machine. To compile
> > I
> > > > did a
> > > > >
> > > > >         make deb
> > > > >
> > > > > but I needed to comment out lines in rootd/src/rootd.cxx as per
> > > > > previous discussions in roottalk.
> > > > > http://root.cern.ch/root/roottalk/roottalk03/0045.html
> > > > >
> > > > >         Everything built fine.
> > > > >
> > > > >         Now I want to compile some of my executables statically.
> > > > They
> > > > > use TMinuit stuff. So I did a
> > > > >
> > > > >         make static
> > > > >
> > > > >         and moved lib/libRoot.a to where my root libraries are.
> > But
> > > > > when I compile I get the following errors.
> > > > >
> > > > >
> > > > > g++ -O -Wall -fPIC -D_REENTRANT -I/usr/local/include/root
> > > > > -I/rest/clas/builds/LATEST/packages/include -static
> > > > GENERALfastfit.cc
> > > > > -L/usr/local/lib/root -lRoot -o GENERALfastfit
> > > > > /usr/local/lib/root/libRoot.a(TSystem.o)(.text+0x5295): In
> > function
> > > > > `TSystem::CompileMacro(char const*, char const*, char const*,
> > char
> > > > > const*)':
> > > > > : the use of `tmpnam' is dangerous, better use `mkstemp'
> > > > > /usr/local/lib/root/libRoot.a(shl.o)(.text+0x200): In function
> > > > > `G__dlopen':
> > > > > : undefined reference to `dlopen'
> > > > > /usr/local/lib/root/libRoot.a(shl.o)(.text+0x217): In function
> > > > > `G__dlopen':
> > > > > : undefined reference to `dlerror'
> > > > > /usr/local/lib/root/libRoot.a(shl.o)(.text+0x2c2): In function
> > > > > `G__shl_findsym':
> > > > > : undefined reference to `dlsym'
> > > > > /usr/local/lib/root/libRoot.a(shl.o)(.text+0x309): In function
> > > > > `G__dlclose':
> > > > > : undefined reference to `dlclose'
> > > > > /usr/local/lib/root/libRoot.a(TUnixSystem.o)(.text+0x244c): In
> > > > function
> > > > > `TUnixSystem::StackTrace()':
> > > > > : undefined reference to `dladdr'
> > > > > collect2: ld returned 1 exit status
> > > > > make: *** [GENERALfastfit] Error 1
> > > > >
> > > > >
> > > > >
> > > > >         Any ideas?
> > > > >
> > > > > Matt Bellis
> > > > > RPI
> > > > >
> > > >
> > > >
> > >
> >
> >



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET