Dictionary generation problems using -std=c++0x

Dear experts,

I have some code based on root which should use new C++11 features. The code basically uses Makefile.arch and some usual Makefile.Common. In principle everything works fine, but when I included --std=c++0x to my compiler option (using gcc 4.6.2) rootcint pops up during dictionary generation and prints messages like shown below. The code still runs fine, but the problem is that I have to manually close the rootcint interactive shell (.q). The latter will definitely cause problems once this code is compiler in the grid or some batch system. Is there any possibility to switch this off?
The command for dictionary generation looks like:

@$(shell root-config --exec-prefix)/bin/rootcint -f $(DICTFILE) -c -p
$(INCLUDES) $^

If I run w/o c++11 this doesn’t occur. I use root 5.34.0

Any ideas?

Many thanks in advance!

Cheers,

Marcus
-s : Step into function/loop mode
g++ -E -C “-DG__LINUX=1” “-DG__GNUC=4” “-DG__GNUC_MINOR=1” “-DG__GNUC_VER=4001” “-DG__GLIBC=2” “-DG__GLIBC_MINOR=5” “-DG__x86_64=1” “-DG__amd64=1” “-D__attribute__(X)=” “-D__asm(X)=” “-DG__ROOT=1” “-DG__NATIVELONGLONG=1” “-DTAU_D3PD” “-DDEBUG__” “-D__STANDALONE” “-DBJET” “-DDEVELOPMENT” “-DTRUE=1” “-DFALSE=0” “-Dexternalref=extern” “-DSYSV” “-D__MAKECINT__” “-DG__CINTVERSION=50180000” -DG__EXTERNAL_CPP -I. -I/amnt/remote/pkthafc.home/morgenst/workarea/2012/HiggsAnalysis/HadHad/include -I…/core/include -I…/core/include/Cuts -I…/D3PDObjects/include -I…/AnalysisUtilities/include -I…/AnalysisUtilities/include/Cuts -I…/GoodRunsList/include -I…/PileupReweighting/include -I…/MissingMassCalculator/include -I…/TauCorrections/include -I…/HadHadCommon/include/ -I/opt/boost/1.50.0/include/ -I/home/morgenst/workarea/2012/HiggsAnalysis/SFrame -I./ -I/amnt/remote/pkthafc.RH_run/usr_remote/opt/root/V5.34.00-sl5-x86_64.gcc4.1.2-python2.7-debug/include -I/amnt/remote/pkthafc.RH_run/usr_remote/opt/root/V5.34.00-sl5-x86_64.gcc4.1.2-python2.7-debug/src -D__CINT__ -I/amnt/remote/pkthafc.RH_run/usr_remote/opt/root/V5.34.00-sl5-x86_64.gcc4.1.2-python2.7-debug/cint/cint/include -I/amnt/remote/pkthafc.RH_run/usr_remote/opt/root/V5.34.00-sl5-x86_64.gcc4.1.2-python2.7-debug/cint/cint/stl -I/amnt/remote/pkthafc.RH_run/usr_remote/opt/root/V5.34.00-sl5-x86_64.gcc4.1.2-python2.7-debug/cint/cint/lib /tmp/zcnCoV_cint.cxx > /tmp/yIjeJ8_cint

!!!Calling default constructor (G__CINT_ENDL()) 0x1d20e950 for declaration of endl cint/cint/src/decl.cxx:2785

!!!Calling default constructor (G__CINT_ENDS()) 0x1d20f830 for declaration of ends cint/cint/src/decl.cxx:2785

!!!Calling default constructor (G__CINT_FLUSH()) 0x1d20fe90 for declaration of flush cint/cint/src/decl.cxx:2785

!!!Calling default constructor (G__CINT_ws()) 0x1d2104f0 for declaration of ws cint/cint/src/decl.cxx:2785

Hi,

Neither of the dictionary generator (i.e. neither rootcint nor genreflex) understand the C++11 syntax and neither will be updated to do so (instead we are migrating to cling for ROOT 6).

So for ROOT 5, you must hide any C++11 constructor from CINT (or from gccxml) using the proper code guard (for example #ifndef CINT).

Cheers,
Philippe.

Hi,

I’m facing problem similar to the one posted by Marcus when compliling with the attached Makefile.
I have enclosed the code with #ifndef CINT and #endif statement as suggested (see for example the attachement Tracking.h).

Do you have any suggestion?
Best regards,
Anna

acorsi@phnmcd68:~/analysis/s018/liboffline$ make
clang++ -fPIC root-config --cflags -c -o TMinosClust.o TMinosClust.cpp
clang++ -fPIC root-config --cflags -c -o TMinosResult.o TMinosResult.cpp
clang++ -fPIC root-config --cflags -c -o Tracking.o Tracking.cpp
rootcint -f .libminos_dict.cc -c -fPIC root-config --cflags TMinosClust.h TMinosResult.h Tracking.h linkdef.h
-s : Step into function/loop mode

!!!Calling default constructor (G__CINT_ENDL()) 0x7fe4984c8ef0 for declaration of endl cint/cint/src/decl.cxx:2785

!!!Calling default constructor (G__CINT_ENDS()) 0x7fe4984c9450 for declaration of ends cint/cint/src/decl.cxx:2785

!!!Calling default constructor (G__CINT_FLUSH()) 0x7fe4984c99b0 for declaration of flush cint/cint/src/decl.cxx:2785

!!!Calling default constructor (G__CINT_ws()) 0x7fe4984c9f10 for declaration of ws cint/cint/src/decl.cxx:2785

!!!Calling default constructor (G__CINT_WS()) 0x7fe4984ca470 for declaration of WS cint/cint/src/decl.cxx:2785


Makefile.txt (993 Bytes)
Tracking.h (1.19 KB)

Hi,

In Tracking.h you hid everything from CINT and thus we not be able to produce a dictionary for the Tracking class.

Your main issue is [quote]-s : Step into function/loop mode[/quote]which is likely coming from the use of root-config --cflags which does not need to be passed to rootcint (it already ‘knows’ everything root-config might tell it) and is actually seeming harmful in your case.

Cheers,
Philippe.