Re: static linking of shared root libs?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Jan 15 1999 - 10:43:24 MET


Christoph Ernst wrote:
> 
> Dear rooters,
> 
> How can I create executables (on LINUX gcc2.7) which include the root
> library statically?
> 
> The problem is that I want to run on machines (of the same operation system)
> where root itself and its libraries will be not available :-[
> Is it possible to include shared libraries statically when I make my
> program? Or do I have to compile the whole root library statically (how?)
> and create a '.a'-file? Is there a better solution involving something like
> rootd?
> 
> Thanks for your help
>         Christoph

Hi Christoph,
As already mentioned by Damir and Radovan, you can copy the shared libs
and set the LD_LIBRARY_PATH correspondingly.
So far, we have distributed only the shared libs in the export tar file.
We do not include archive libraries, because we would like to keep
the size of the tar file well below the 10 Mbytes.
We could mody the Makefiles to also generate a libRoot.a archive
library. We could also generate ourselves the libRoot.a for all
architectures and make a separate tar file with this library only.
We recognize that archive libraries may be important in the situation
you describe or (and in particular), when you want to run a production
with a statically-linked module independent of side-effects
introduced by possible replacement of the shared libs.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:28 MET