Rootcint and clhep clash


_ROOT Version: 5.34/26
_Platform: linux
_Compiler: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)


CLHEP version: 2.2.0.4

Hi, I have problem with generation of root dictionary for some CLHEP headers (log is attached below). It is important to say that this code (same versions of CLHEP and ROOT) has been compiled and worked with previous version of compiler (4.6.xx) and suddenly now it doesn’t want to go! All code has been compiled with flag -std=gnu++98, so no C++ issues should affect this. Any ideas how to solve this problem

[shitov@nu76-78 pro]$ rootcint -f DummyDict.cxx -c -p -pipe -I/usr/local_soft/danss_old/clhep/pro/include /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/memory.h DummyLinkDef.h
Error: class,struct,union or type void(U not defined /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/type_traits.h:212:
Internal error: global function template arg type /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/type_traits.h:212:
Error: class,struct,union or type … not defined /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/type_traits.h:213:
Internal error: global function template arg type /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/type_traits.h:213:
Internal error: global function template arg type /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/type_traits.h:217:
Error: class,struct,union or type … not defined /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/type_traits.h:219:
Internal error: global function template arg type /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/type_traits.h:219:
Error: void type variable can not be declared /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/memory.h:810:
Syntax Error: sp_enable_shared_from_this Maybe missing ‘;’ /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/memory.h:810:
Syntax error /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/memory.h:1482:
Syntax error /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Utility/memory.h:1486:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing DummyDict.cxx DummyDict.h !!!

[shitov@nu76-78 pro]$ rootcint -f DummyDict.cxx -c -p -pipe -I/usr/local_soft/danss_old/clhep/pro/include /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Random/RanshiEngine.h DummyLinkDef.h
Error: Symbol numBuff is not defined in current scope /usr/local_soft/danss_old/clhep/pro/include/CLHEP/Random/RanshiEngine.h:109:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing DummyDict.cxx DummyDict.h !!!
Error: rootcint: error loading headers…

[shitov@nu76-78 pro]$ cat DummyLinkDef.h
// $Id: MyG4LinkDef.h,v 1.1.1.1 2007/04/30 15:01:10 shitov Exp $

#ifdef CINT

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#endif

Hi,

does this occur with ROOT6 too?
D

No, it passes well in the ROOT 6.10/08. But it takes time to transfer my old ROOT5-based project to the ROOT6, which is not compiling bormbarding me by a errors…

BTW, I have found dirty solution for my problem, if somebody is interested. One should blind from rootcint (by #ifndef CINT preproc instructions) includes of CLHEP random engines/distros in CLHEP Randomize.h and GEANT4 Randomize.hh headers (actually blind all content of these headers). In this case all is going ok.

Cheers,
Yuri

Hi Yuri,

ROOT5 is not developed anymore. Let us know if you don’t manage to fix any error when moving to ROOT6.

Cheers,
D

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