ROOT libraries giving error messages when compiling CRMC source

Hello,
I’m trying to install CRMC (https://web.ikp.kit.edu/rulrich/crmc.html). It needs ROOT so I installled it downloading the binaries for Ubuntu 14. After setting the environment variables and testing the demo included in ROOT I use Cmake which succeeds in finding everything it needs. However, when I use make to compile the source I get a lot of errors related to ROOT libraries. libcpp_string_view.h is giving errors almost at every line. I’ll paste some:

/opt/Software/root/include/libcpp_string_view.h:458:31: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive] (data(), size(), __c, __pos); ^ /opt/Software/root/include/libcpp_string_view.h: In member function ‘std::experimental::__ROOT::basic_string_view<_CharT, _Traits>::size_type std::experimental::__ROOT::basic_string_view<_CharT, _Traits>::rfind(const _CharT*, std::experimental::__ROOT::basic_string_view<_CharT, _Traits>::size_type, std::experimental::__ROOT::basic_string_view<_CharT, _Traits>::size_type) const’: /opt/Software/root/include/libcpp_string_view.h:465:75: error: ‘npos’ was not declared in this scope return _VSTD::__str_rfind<value_type, size_type, traits_type, npos> ^ /opt/Software/root/include/libcpp_string_view.h:466:23: error: there are no arguments to ‘data’ that depend on a template parameter, so a declaration of ‘data’ must be available [-fpermissive] (data(), size(), __s, __pos, __n); ^ /opt/Software/root/include/libcpp_string_view.h:466:31: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive] (data(), size(), __s, __pos, __n);

And before stopping, the last lines are:

make[2]: *** [CMakeFiles/crmc.dir/src/OutputPolicyROOT.cc.o] Error 1 make[1]: *** [CMakeFiles/crmc.dir/all] Error 2 make: *** [all] Error 2

It also gives many error messages related to TClass.h like:

/opt/Software/root/include/TClass.h:545:12: error: ‘t’ does not name a type auto t = fStreamerImpl.load();

Gcc version is 4.8

I’ve never used ROOT and I didn’t know where to look at. Any help would be appreciated.
Many thanks.

ROOT 6, which is the version you are using, requires C++11. So, I guess the problem is that CRMC needs to be build with the compilation flag -std=c++11 turned on.

Well I didn’t think about that because in some place it said it was enabled by default but it seems to be working now after compiling it with that that flag.
Thank you for your help!

How is this done when using a make file? I’m getting something similar to this when I do make, saying that I need to enable c++11. I tried making an alias for gcc=“gcc -std=c++11” but it did not do anything. Do I need to edit the makefile directly somehow?

Thanks

I guess “make CXXFLAGS=-std=c++11” will work if you makefile make use of CXXFLAGS.