Trying to install pandaroot with the new external packages and git, in an Ubuntu 14.10 (gcc 4.9.1) I have seen that the code has problems with the C++11 options.
In particular:
In file included from /home/lavezzi/git/pandaroot/pgenerators/eventFilter/FairFilteredPrimaryGenerator.h:27:0,
from /home/lavezzi/git/pandaroot/pgenerators/eventFilter/FairFilteredPrimaryGenerator.cxx:1:
/home/lavezzi/git/pandaroot/pgenerators/eventFilter/FairEvtFilter.h:129:46: error: 'constexpr' needed for in-class initialization of static data member 'const Double_t FairEvtFilter::kNoChargeSpecified' of non-integral type [-fpermissive]
static const Double_t kNoChargeSpecified = -999.9;
^
pgenerators/CMakeFiles/PGen.dir/build.make:497: recipe for target 'pgenerators/CMakeFiles/PGen.dir/eventFilter/FairFilteredPrimaryGenerator.cxx.o' failed
In c++11 static const of a non-integer number is not allowed, one should use constexpr. But if I use constexpr:
[ 9%] Generating G__PGenDict.cxx
Error: Invalid type 'constexpr' in declaration of 'Double_t kNoChargeSpecified' /home/lavezzi/git/pandaroot/pgenerators/eventFilter/FairEvtFilter.h:129:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing /home/lavezzi/git/pandaroot/cbuild/pgenerators/G__PGenDict.cxx /home/lavezzi/git/pandaroot/cbuild/pgenerators/G__PGenDict.h !!!
Error: /home/lavezzi/git/fairsoft_jul14p3/externals/bin/rootcint: error loading headers...
pgenerators/CMakeFiles/PGen.dir/build.make:77: recipe for target 'pgenerators/G__PGenDict.cxx' failed
make[2]: *** [pgenerators/G__PGenDict.cxx] Error 1
Martin, can you fix this problem? This is present in several classes, including also FTS.
From some comments i read in the forum, what you are doing is a bit nasty and should be disegned in a different and safer way.
Thanks in advance.
[Updated on: Mon, 12 January 2015 12:10]
Report message to a moderator