Gcc 7.1.1 :: compile v5.34 error in G__Reflex.cxx

Hi! I know that this branch is no longer supported but it would be useful at least to still compile …
So, having these options enabled :
Enabled support for: alien asimage astiff cintex exceptions explicitlink fftw3 fitsio fortran gviz gdml genvector gsl_shared krb5 ldap mathmore memstat minuit2 monalisa mysql odbc opengl pgsql pythia6 pythia6_nolink pythia8 python qt qtgsi reflex roofit shadowpw shared soversion sqlite ssl table thread tmva unuran vdt xft xml x11 xrootd

i have (using make -k)
[ 30%] Generating G__Reflex.cxx, G__Reflex.h
Error: class,struct,union or type decltype(nullptr) not defined /usr/include/c++/7/x86_64-redhat-linux/bits/c++config.h:2196:
Error: unrecognized language construct /usr/include/c++/7/bits/atomic_base.h:162:
and then a lot of errors… cxx11 is NOT enabled

but with the same make -k it finish with :
[100%] Built target hist2workspace
make[1]: Target ‘all’ not remade because of errors.
make: *** [Makefile:152: all] Error 2
make: Target ‘default_target’ not remade because of errors.

so anything else it seems that is compiled but G__Reflex.cxx …
Any idea what is going on and if this can be fixed?
Thanks a lot!!!
Adrian

Hi,
doesn’t gcc 7 compile with -std=c++14 by default? Could you try passing -std=c++98 as a compilation flag when compiling ROOT? Or maybe use an older compiler altogether :sweat_smile:

Hi, doesn’t gcc 7 compile with -std=c++14 by default? Could you try

well, all other code compiles … and gcc 6 on fedora 25 have the default
of cxx11 i think and v5 compiles successfully

passing -std=c++98 as a compilation flag when compiling ROOT? Or
maybe use an older compiler altogether :sweat_smile:

or downgrade back from fedora 26 to 25 … but this is not a step forward :slight_smile:

Thanks,
Adrian

The real step forward would be moving to ROOT 6 :sweat_smile:

As you pointed out ROOT v5 is frozen, so I doubt updates will be released for it to compile with gcc 7 out of the box.

Maybe @mato or @Axel can comment on it with more authority.

P.S.
the original issue is probably cause by CINT not being able to work with the standard library implementatoin in c++/7/x86_64-redhat-linux. It is too new – afaik CINT does not even support all of c++11.

The real step forward would be moving to ROOT 6 :sweat_smile:
usually i am dual-stacked :slight_smile: so on this laptop that i updated to fedora
26 i tried to recompile my required software … root6 was ok but the
other software had a problem compiling with gcc 7

so i tried the v5 branch that as i told you compiled everything
successfully with the exception of this G__Reflex step

As you pointed out ROOT v5 is frozen, so I doubt updates will be
released for it to compile with gcc 7 out of the box.

Maybe @mato or @Axel can comment on it with more authority.

P.S. the original issue is probably cause by CINT not being able to
work with the standard library implementatoin in
c++/7/x86_64-redhat-linux. It is too new – afaik CINT does not
even support all of c++11.
cxx11 is not enabled

Thank you!
Adrian

It does not matter cxx11 is not enabled: your standard library implementation contains c++11 stuff that CINT cannot work with (hence the Error: unrecognized language construct /usr/include/c++/7/bits/atomic_base.h:162).

The only solutions I can think of are either changing STL implementation (i.e. using an older compiler) or changing CINT for Cling (i.e. switch to ROOT 6).

edit: looking at libstdc++, here is atomic_base.h:162 for the gcc-7 branch. I don’t know what changed in the implementation of STL stuff that ROOT actually includes to require CINT to actually parse atomic_base.h, but it seems that CINT cannot interpret Object() noexcept = default; (which sounds reasonable).

any developer opinion (and hopefully a solution) on this?

Thank you!
Adrian

Hi Adrian. The only reason we still keep ROOT 5.34 sort of alive is because of windows users. It is the only version for the time being that we support Windows. For all the other platforms, version 5 is frozen. We cannot support very new compilers with this very old version. I think this is understandable, isn’t it? Is there any reason that prevents you from moving to ROOT 6?
Pere

Hi Adrian. The only reason we still keep ROOT 5.34 sort of alive is
Hi!

because of windows users. It is the only version for the time being
that we support Windows. For all the other platforms, version 5 is
frozen. We cannot support very new compilers with this very old
version. I think this is understandable, isn’t it? Is there any
reason that prevents you from moving to ROOT 6? Pere
i am using the root6 for data manipulation but for ALICE the official
version is root5 so i have to have also the root5 branch of software

at this moment only my travel laptop was upgraded to fedora 26 but at
some point in the future i expect to be able to upgrade also my desktops…

also, i don’t think (and/or hope) that would be so big effort to fix it
as root 5 DID compile to 100% with the exception of that single
auto-generated files : G__Reflex.cxx, G__Reflex.h

and with the errors :
[ 30%] Generating G__Reflex.cxx, G__Reflex.h
Error: class,struct,union or type decltype(nullptr) not defined
/usr/include/c++/7/x86_64-redhat-linux/bits/c++config.h:2196:
Error: unrecognized language construct
/usr/include/c++/7/bits/atomic_base.h:162:

see my first post (and i say to 100% as with make -k did reach 100%)

is it such a problem to fix it?

Thank you!!
Adrian

Disable reflex. Is probably not used by Alice. -Dreflex=OFF.

Note however that is very possible that CINT will throw errors again when it tries to interpret STL stuff.

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