problem of rootcint in root2.00/13 at IBM/AIX

Pasha Murat (murat@cdfsga.fnal.gov)
Tue, 1 Dec 1998 12:15:17 -0600 (CST)


Ye Shuwei writes:
>
> Dear rooters,
>
> I met a strange and seemingly very simple problem in root2.00/13 at
> IBM/AIX. That is, when I tried "rootcint -f test_Dict.cxx -c test.h", got the
> error below.
>
> Note: operator new() masked 1c
> Note: operator delete() masked 1c
> Error: Unexpected EOF G__fgetc() FILE:test.h LINE:15Advice: You may need to
> use +P or -p option
>
> The header file of test.h is very simple:
>
> #ifndef DEBUGGER_H
> #define DEBUGGER_H
>
> #ifndef ROOT_TObject
> #include <TObject.h>
> #endif
>
> class Debugger : public TObject
> {
> protected:
> Bool_t isOn; //Is the debugger on?
> public:
> Debugger();
> ~Debugger() {}
> void On() { isOn = kTRUE;} // Turn on the debugger
> void Off() { isOn = kFALSE;} // Turn off the debugger
> void Print(char * fmt, ... ); // Print a debug message
>
> ClassDef(Debugger, 1) // Debug message printing class
> };
>
> //#ifndef __CINT__
> EXTERN Debugger debugger;
> //#endif
>
> #endif
>
>
> After some tests, I located the problem. The statement of "EXTERN Debugger
> debugger;" causes the problem. What it worked for older version !
>
> Any suggestions ?
>
> Best regards --Shuwei
--------------------------------------------------------------------------------
Hi Shuwei,
take a look at the generated dictionary. I suspect you'll find it
generated correctly. According to Fons the error diagnostics you're getting
has to do with the memory cleanup and it is printed by rootcint *after* the
dictionary has already been generated (see below).
-regards, pasha.
--------------------------------------------------------------------------------
From: Fons Rademakers <Fons.Rademakers@cern.ch>
Sender: rdm@pcsalo.cern.ch
To: Pasha Murat <murat@cdfsga.fnal.gov>
CC: rootdev@hpsalo.cern.ch
Subject: Re: ROOTCINT problem (v2_00_13)
Date: Mon, 16 Nov 1998 12:36:47 +0100

Hi Pasha,

this bug has just been fixed (was related to cleanup code in rootcint
after dictionary was correctly generated). To get rid of the problem
add the following line to the bottom of rootcint.cxx:

G__globalcomp = -1; // G__CPPLINK <--- add this line
G__exit(0);

return 0;
}

Cheers, Fons.

Pasha Murat wrote:
>
> Dear ROOT developers,
> let me report a problem with ROOTCINT I hit in version 2.00/13
> which comes with CINT 5.013.78 on SGI IRIX 6.2. I tried KCC-, EGCS- and
> GCC2.7-compiled version - the problem is the same in all the cases.
> When parsing the following input
> ------------------------ bug_003.h
> class A {
> public:
> A(){} ;
> ~A() {};
> };
>
> class B {
> public:
> static A fgA;
> B(){};
> ~B(){};
> };
> ------------------------ bug_003_linkdef.h
> #ifdef __CINT__
> #pragma link off all globals;
> #pragma link off all classes;
> #pragma link off all functions;
> #pragma link C++ class A;
> #pragma link C++ class B;
> #endif
> ------------------------
> ROOTCINT generates the error diagnostics:
>
> /cdf/upgrade/tracking/murat/g3/test/bug>rootcint -f hmm.cxx -c bug_003.h bug_003_linkdef.h
> Note: operator new() masked 1c
> Class A: Streamer() not declared
> Class A: ShowMembers() not declared
> Class B: Streamer() not declared
> Class B: ShowMembers() not declared
> Error: Unexpected EOF G__fgetc() FILE:bug_003.h LINE:4
> Advice: You may need to use +P or -p option
>
> Does the error diagnostics above indicate a problem?
> the generated dictionary looks OK to me, but as rootcint returns a
> non-zero error code make breaks at this point anyway.
>
> thanks a lot, pasha.

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910