Error in <TInterpreter::AutoParse>: Error parsing payload code for class

Hi,

I’m in the process of porting several projects from ROOT5 to ROOT6 ( 6.20_00 to be specific ) . In one particular instance I get the error stated in the subject line together with a "Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState " for each method when running the code. I can make the error “go away” by setting ROOT_INCLUDE_PATH to point back to the include files for the library but that seems to be a bit of a hack. In a previous post on the same subject there was a suggestion that the failure to auto parse the dictionary was due to a problem with the LinkDef file for the library but I see nothing wrong with it, I see no errors from rootcling when making the dictionary and it all works fine with ROOT 5. How do I debug this ? Having to keep the include files available at all time makes portability hard.

                           peter

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hi Peter,

ROOT6 indeed needs headers for the time being. We are getting rid of this requirement step by step.

The “problem with the LinkDef file” you’re referring to is likely a problem with the invocation of rootcling: you pass -I which is the relocatable part, and then dir/file.h which is assumed to be findable at runtime. Makes sense?

Cheers, Axel.

Thanks Axel,

Yes - that makes perfect sense.

On a shightly different note - Is there any detailed documentation on how rootcling processes LInkDef files and the directives therein ?

peter

What level of details are you interested in? (I suspect you are looking for more than https://root.cern.ch/selecting-dictionary-entries-linkdefh)?

Yes - a bit more. I know about some of the standard things like adding a +, - or ! at the end but there are a host of other things one can do like adding entries for functions etc.to the dictionary. Basically I’m trying to understand what the requirements are. And what the limitations are - for example asking for a streamer for an object which has nothing to stream seems innocuous as far as I can tell. I presume everything has to inherit from a TObject ( I’ve seen examples to the contrary in LinkDef files and wondered what actually happened … )
One can pick up a lot from browsing this list but that can be hit or miss depending on the exact keywords used to search. But documentation in one place written by an expert beats everything .

peter

Search for “pragma” in the “ROOT 5 User’s Guide” (when “rootcint” is used) and in the “ROOT 6 User’s Guide” (when “rootcling” is used).

Thanks for the link - it answered a number of questions.

peter

I presume everything has to inherit from a TObject

There is no requirement to inherit from TObject (and no requirement to have a ClassDef macro in the definition).

Can it build a streamer for a non-TObject ? Doesn’t it need need a non-zero ClassDef ?

peter

If you do not inherit from TObject, you do NOT need to use ClassDef / ClassImp at all.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.