Re: [ROOT] problem with MacOSX

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Jun 06 2003 - 08:31:44 MEST


Hi Jeffrey,

Your examples run correctly on Linux, Windows, Solaris.
I have no way to test on MacOSX, but, as I said in a previous mail,
this is a loader problem on MacOSX. Static objects in libTree.so, 
are not created when loading this library. The dictionary for the 
classes in the lib is not created. Including a TApplication object
should in principle fix this problem (it is missing in your example)

Rene Brun

On Thu, 
5 Jun 2003, 
Jeffrey J. Early wrote:

> I'm having the exact same problem that Brian was having (read below) and I
> wanted to find out if anyone managed to find a work around (Brian says that
> he did not).
> 
> I'm running Root 3.05/03 on MacOSX 10.2.6 with the latest developer tools
> including gcc3 -- and the newest version of dlcompat.
> 
> I created a simplified version of the problem (which works just fine when
> run with the interpreter).
> 
> http://darkwing.uoregon.edu/~jearly/HEP/
> 
> The example program 'treesimple' compiles and runs just fine. It creates a
> tree and writes it to a root file without a hitch. The example program
> 'treeread' compiles just fine but then spits out the same error message
> Brian was getting when reading the file.
> 
> I tried Rene's suggestion but that didn't change anything -- same results.
> 
> Any other ideas?
> 
> Thanks for any help,
> Jeffrey
> 
> > Hi Brian,
> > 
> > This looks like a dynamic loading problem on MacOS.
> > To see if this is the case, add in your main program
> > 
> > #include <TApplication.h>
> > 
> > 
> > int main(int argc, char **argv)
> > {
> >  TApplication theApp("App", &argc, argv);
> > .. your own code
> > ..
> > }
> > 
> > Rene Brun
> > 
> > On Fri, 14 Feb 2003,
> > Brian Kurt Fujikawa wrote:
> > 
> >> Hello
> >> 
> >> I'm running root v3.04.02 (source installation) on MacOSX 10.2.3 (X Public
> >> Beta 0.2). I am having trouble running a standalone program that loads
> >> trees. Specifically, my program includes the lines:
> >> 
> >> TFile* EventFile=
> >> new TFile("/Users/bkf/emiT/data/Data1_20021209_15477.root");
> >> TTree* CoincidenceEventTree=
> >> (TTree*)EventFile->Get("Event/CoincidenceEventTree");
> >> TBranch* CoincidenceEventBranch=
> >> CoincidenceEventTree->GetBranch("CoincidenceEventBranch");
> >> 
> >> and when I run it, I get the following error messages:
> >> 
> >> Warning in <TClass::TClass>: no dictionary for class TTree is available
> >> Warning in <TClass::TClass>: no dictionary for class TBranchElement is
> >> available
> >> Warning in <TClass::TClass>: no dictionary for class TBranch is available
> >> Warning in <TClass::TClass>: no dictionary for class TLeafElement is
> >> available
> >> Warning in <TClass::TClass>: no dictionary for class TLeaf is available
> >> Error in <TBuffer::CheckByteCount>: object of class TNamed read too few
> >> bytes: 26 instead of 821615
> >> Warning in <TBuffer::CheckByteCount>: TNamed::Streamer() not in sync with
> >> data on file, fix Streamer()
> >> 
> >>  *** Break *** bus error
> >> Abort
> >> 
> >> 
> >> This programs DOES run when I execute it as a script in root and it also
> >> runs on a linux box.
> >> 
> >> I am using the following commands to build this program ("myprog"):
> >> 
> >> g++ -O -Wall -pipe -I/Users/bkf/include/DAT/ -I/Users/bkf/root/include -c
> >> myprog.cc
> >> g++ -O -Xlinker -bind_at_load -flat_namespace -o myprog myprog.o
> >> -L/Users/bkf/lib/ -lDATEvent -L/Users/bkf/root/lib -lCore -lCint -lHist
> >> -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lm
> >> -ldl
> >> 
> >> Any ideas?
> >> 
> >> Best Regards
> >> 
> >> Brian
> 



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