Hi Steve et all, On Thu, 13 Apr 2000 12:18:57 -0500 (CDT) "Stephen J. Sanders" <SANDERS@kunuc2.phsx.ukans.edu> wrote: > Hi Christian, > > I'm trying to get brat running on a LinuxPPC system (Macintosh based...). > I have the 2.24/02 version of root compiled and running. I am > compiling with gcc 2.95.2. So far so good ... > The problem is that va_list is now being defined as a structure in > stdarg. This means that once rootcint gets finished with the Query, > GetSingle and GetMultiple function in BrDB.cxx, it produces a CINT file > that tries to cast to the structure va_list, in violation of ANSI C++. > I checked on the pii machines and found there that va_list (using the > egcs compiler) is typedef as a void *, which works fine as a cast. Ah ... well known problem (see my mail to the roottalk@root.cern.ch list: http://root.cern.ch/root/roottalk/roottalk00/0924.html, and responses). I had the same problem on a Digital Unix Alpha machine. The problem is that the rootcint dictionary generator assumes some stuff on va_list, meaning that the interactive part of ROOT (that is CINT), doesn't support variadic arguments at all (you can't use printf() in the interactive part of ROOT!!!). Masaharu Goto (author of CINT) has some thoughts on this (see http://root.cern.ch/root/roottalk/roottalk00/0966.html). > Any suggestions on getting around this problem? The solution that I cooked up for Digital Unix is somewhat ad hoc and not very nice - sorry. What I did, was to make the dictionary generation for BrDB conditional on the underlying architecure - that is, in brat/db/inc/BrDb_LinkDef.h, I did: ... #ifndef __alpha__ #pragma link C++ class BrDB; #endif ... #ifndef __alpha__ #pragma link C++ global gDBManager; #endif You could add somthing similar for PPC (preprocessor symbol __PPC__) - that is: ... #if !defined(__alpha__) && !defined(__PPC__) #pragma link C++ class BrDB; #endif ... #if !defined(__alpha__) && !defined(__PPC__) #pragma link C++ global gDBManager; #endif I'd commit these changes to the CVS if I had some way of testing it, but since I don't, I'd like for you to test it and then either commit the changes yourself, or tell me the outcome, and I'll do it. What all this means, is that you can't instantice a BrDBMangager object in an interactive ROOT session! This may seem as an obstical, but I'm onvinced it's not. The point is, that all Database access should proberly take place inside compiled libraries, rather then through the command line of ROOT. Of course I could go with overloading, as Masaharu Goto suggests, but I'd rather not, since it makes the code look ugly, and the interface will be less flexible. If you (any of you) have strong feelings that the use of variadic arguments is wrong since it isn't supported by CINT, I could change it to overloading, but I'd rather not. Hope that helps. Oh and Steve: Please post such notices on a BRAHMS mailing list (the right one for this type of question is brahms-dev-l), so that everybody will gain from the your insights, bug-reports, and so on - thanks! Cheers, Christian ----------------------------------------------------------- Holm Christensen Phone: (+45) 35 35 96 91 Sankt Hansgade 23, 1. th. Office: (+45) 353 25 305 DK-2200 Copenhagen N Web: www.nbi.dk/~cholm Denmark Email: cholm@nbi.dk
This archive was generated by hypermail 2b29 : Thu Apr 13 2000 - 15:18:23 EDT