Why is my HistFitter compilation failing in analysisbase containers?

HistFitter compilation has been found to fail in analysisbase docker images with tags 21.2.88 and later, apparently due to some gcc compatibility issue, with error messages such as:

/usr/AnalysisBaseExternals/21.2.104/InstallArea/x86_64-centos7-gcc8-opt/include/TString.h:275:23: error: 'string_view' in namespace 'std' does not name a type
    TString(const std::string_view &sub);
                       ^~~~~~~~~~~
/usr/AnalysisBaseExternals/21.2.104/InstallArea/x86_64-centos7-gcc8-opt/include/TString.h:275:18: note: 'std::string_view' is only available from C++17 onwards
    TString(const std::string_view &sub);

For the moment, running HistFitter in analysisbase:21.2.87 images or earlier should resolve the issue. Please contact us if you run into this issue and have a use case that requires analysisbase:21.2.88 or later.

Also note that HistFitter is currently buggy with root 6.18 - root 6.16 is the latest version that’s stable with HistFitter.

Is this still an issue? AnalysisBase should be using GCC 8.3.0 now, which supports C++17 quite well.

Hi @dguest, just tested with the latest analysisbase image (21.2.120) and confirmed that indeed it compiles ok!

My understanding from @kratsg as of the end of February is that the newer root version (6.18) in the latest analysisbase releases could still potentially present an issue though (apparently root 6.16 is the latest stable version for HistFitter).

Yeah, I still think HistFitter has many bugs with the varying ROOT versions… and I know there are lingering segfaults with versions beyond 6.16+ … I’m not sure how stable things are in general. @Luigi Longo could comment on this.

But how is histfitter or ROOT disabling C++17 features? This error in particular seems pretty clear about the problem.