Rootcling errors with stl_list.h file

Hello,
I am trying to produce a dictionary using rootcling command. But I am getting errors from the stl_list.h file. here is the a smal list of the errors:

In file included from input_line_12:51:
In file included from ./../JSupport/JFileScanner.hh:9:
In file included from /sps/km3net/users/mbouta/private/km3net/jpp/software/JROOT/JRootFileReader.hh:16:
In file included from /sps/km3net/users/mbouta/private/km3net/jpp/software/JROOT/JRootSupportkit.hh:9:
In file included from /sps/km3net/users/mbouta/private/km3net/jpp/software/JROOT/JRootToolkit.hh:15:
In file included from /pbs/software/centos-7-x86_64/root/6.22.06/include/root/TFormula.h:22:
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/list:63:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_list.h:1602:22: error: no template named 'list'
    operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
                     ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_list.h:1602:52: error: no template named 'list'
    operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
                                                   ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_list.h:1604:24: error: expected a qualified name after 'typename'
      typedef typename list<_Tp, _Alloc>::const_iterator const_iterator;
                       ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_list.h:1604:28: error: expected ';' at end of declaration
      typedef typename list<_Tp, _Alloc>::const_iterator const_iterator;
                           ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_list.h:1605:7: error: unknown type name 'const_iterator'
      const_iterator __end1 = __x.end();

Could you, please, help me to resolve the issue.
Thank you.

Hi @mbouta !

Weird indeed. This suggests that there is some other list that’s hiding std::list. That
s probably in the code of JFileScanner.h - but doesn’t have to be. You can try by adding

list TESTME = std::vector<int>();

right after the #includes of JFileScanner.h and hopefully that will cause an error message of the sort “list is defined here and I have no idea how to assign a vector to it”. Then we know where the other list comes from!

And a hint: when you post code or error messages, always surround that by ``` - like that it doesn’t get misinterpreted by the forum.

Cheers, Axel

Hi @Axel,

Thank you for your fast replay and for your suggestions.
Thankfully, the issue was solved by changing my root path. seems there was a problem with my previous root.
Now everything is going smoothly.

Cheers,
Mohammed

1 Like

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