RE: [ROOT] Recompilation of programs.

From: Dmitry A. Shtol (shtol@sndxt1.inp.nsk.su)
Date: Fri Aug 29 2003 - 16:14:03 MEST


Hi,
On Thu, 28 Aug 2003, Philippe Canal wrote:


> 
> The warning is related to a bug in the KCC compiler and does not apply
> to other compiler.

Is there a method to use another compiler in ROOT instead of kcc (for 
example g++)? Maybe it will solve some problems?
Thank you.

> 
> However, if you unload a shared library, anything that uses this shared
> library is potentially invalid (because code it depends on is no longer 
> accessible).  CINT tries to make intelligent decision on what should be 
> invalided (and thus unloads, deletes, scratches) but does not always 
> gets it 'right'.   This explains the disappearance of the variable 'x'.
> 
> As a rule of thumb you can assume that when you 'reload' a library 
> __anything__ that was created (and that CINT knows about) since the 
> previous load is delete/removed.
> 
> Cheers,
> Philippe.
> 
> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Dmitry A. Shtol
> Sent: Wednesday, August 27, 2003 11:13 PM
> To: roottalk@pcroot.cern.ch
> Subject: [ROOT] Recompilation of programs.
> 
> 
> Hi,
> On "ROOT education at Fermilab".
> (http://www-root.fnal.gov/root/class/Day2_files/v3_document.htm)
> In "ACLiC Advantages" there are following statement:
> "With the KCC compiler can only load each C++ shared library once per root 
> session, this also means that you can not use the .U command to unload the 
> shared library. When adding shared libraries one after another, and then 
> removing one that has been added previously to others, the ones added 
> after the one to be removed will also be removed."
> 
> Does it mean, that I must restart ROOT always when I want to recompile a 
> program after some changes? Is it a way to recompile program without 
> restart?
> 
> When I try to do it, all varibles are deleted. Example:
> (ExpEeSelect_c.so loaded before through a 
> command gROOT->LoadMacro("ExpEeSelect_C.so") in rootlogon.C)
> 
> root [1] double x=1        
> root [2] x
> (double)1.00000000000000000e+00
> root [3] .sh               
> bash$ touch ExpEeSelect.C
> bash$ exit
> root [4] .L ExpEeSelect.C+
> Warning in <ACLiC>: unmodified script has already been compiled and loaded
> Warning in <ACLiC>: it will be regenerated and reloaded!
> Info in <TUnixSystem::ACLiC>: creating shared library 
> /home/shtol/root/./ExpEeSelect_C.so
> Warning in <TClassTable::Add>: class ExpEeSelect already in TClassTable
> root [5] x
> Error: Symbol x is not defined in current scope  FILE:(tmpfile) LINE:1
> *** Interpreter error recovered ***
> 
> What I can do with this problem?
> 
> Thank you.
> 
> ==============================================================
> Dmitry A. Shtol                        (SND group)
> Budker Institute of Nuclear Physics
> 



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