Rootcling Errors on Rocky Linux

I’m trying to use rootcling and rootcint as part of the build of various applications on a new system which uses Rocky Linux and these are currently failing with lots of errors like these:

[cthorpe@wn3803320 rootcling_test]$ rootcling -v4 -f ParticleDict.cxx  -rmf libParticleDict.rootmap -rml libParticleDict.so  LinkDef.h
In file included from input_line_3:2:
In file included from /cvmfs/larsoft.opensciencegrid.org/products/gcc/v8_2_0/Linux64bit+3.10-2.17/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/string:40:
In file included from /cvmfs/larsoft.opensciencegrid.org/products/gcc/v8_2_0/Linux64bit+3.10-2.17/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/char_traits.h:40:
In file included from /cvmfs/larsoft.opensciencegrid.org/products/gcc/v8_2_0/Linux64bit+3.10-2.17/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/postypes.h:40:
In file included from /cvmfs/larsoft.opensciencegrid.org/products/gcc/v8_2_0/Linux64bit+3.10-2.17/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/cwchar:44:
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:104:1: error: unknown type name '__BEGIN_NAMESPACE_C99'
__BEGIN_NAMESPACE_C99
^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:106:1: error: expected unqualified-id
typedef __mbstate_t mbstate_t;
^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:107:1: error: unknown type name '__END_NAMESPACE_C99'
__END_NAMESPACE_C99
^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:112:23: error: unknown type name 'mbstate_t'
__USING_NAMESPACE_C99(mbstate_t)
                      ^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:112:33: error: expected ';' after top level declarator
__USING_NAMESPACE_C99(mbstate_t)
                                ^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:134:1: error: unknown type name '__BEGIN_NAMESPACE_STD'
__BEGIN_NAMESPACE_STD
^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:137:1: error: expected unqualified-id
struct tm;
^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:138:1: error: unknown type name '__END_NAMESPACE_STD'
__END_NAMESPACE_STD
^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:142:23: error: unknown type name 'tm'
__USING_NAMESPACE_STD(tm)
                      ^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:145:1: error: expected function body after function declarator
__BEGIN_NAMESPACE_STD
^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:168:1: error: unknown type name '__END_NAMESPACE_STD'
__END_NAMESPACE_STD
^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:172:1: error: expected unqualified-id
extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) __THROW;
^
/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/etc/cling/lib/clang/5.0.0/include/wchar.h:180:11: fatal error: 'xlocale.h' file not found
# include <xlocale.h>
          ^~~~~~~~~~~
#0 0x0000147babe5562f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x0000147babe532ce llvm::sys::RunSignalHandlers() (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCling.so+0x250b2ce)
#2 0x0000147babe53506 SignalHandler(int) Signals.cpp:0:0
#3 0x0000147ba8f43cf0 __restore_rt (/lib64/libpthread.so.0+0x12cf0)
#4 0x0000147ba9c763d4 ROOT::TMetaUtils::TNormalizedCtxtImpl::keepTypedef(cling::LookupHelper const&, char const*, bool) (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCling.so+0x32e3d4)
#5 0x0000147ba9c764f0 ROOT::TMetaUtils::TNormalizedCtxtImpl::TNormalizedCtxtImpl(cling::LookupHelper const&) (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCling.so+0x32e4f0)
#6 0x0000147ba9c76648 ROOT::TMetaUtils::TNormalizedCtxt::TNormalizedCtxt(cling::LookupHelper const&) (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCling.so+0x32e648)
#7 0x0000147ba9cd85a6 TCling::TCling(char const*, char const*, char const* const*) (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCling.so+0x3905a6)
#8 0x0000147ba9cd8bc6 CreateInterpreter (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCling.so+0x390bc6)
#9 0x0000147ba9323456 TROOT::InitInterpreter() (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCore.so+0x1d2456)
#10 0x0000147ba9323598 ROOT::Internal::GetROOT2() (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCore.so+0x1d2598)
#11 0x0000147ba9cb732d TCling__GetInterpreter (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCling.so+0x36f32d)
#12 0x0000147ba9c9c036 RootClingMain(int, char**, bool, bool) (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCling.so+0x354036)
#13 0x0000147ba9ca3377 ROOT_rootcling_Driver (/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/lib/libCling.so+0x35b377)
#14 0x0000000000400be7 (rootcling+0x400be7)
#15 0x0000147ba8288d85 __libc_start_main (/lib64/libc.so.6+0x3ad85)
#16 0x0000000000400c24 (rootcling+0x400c24)
Stack dump:
0.	Program arguments: rootcling -v4 -f ParticleDict.cxx -rmf libParticleDict.rootmap -rml libParticleDict.so LinkDef.h 
[SimParticle.h|attachment](upload://yPywTCftzXA1GLcFPYl5PVp7odT.h) (397 Bytes)
[SimParticle.cc|attachment](upload://98BZjsOXyyPF97iK2kkCeYHOXtq.cc) (82 Bytes)
[LinkDef.h|attachment](upload://fkr0yXyzohySGjcKg2UhRQinWEN.h) (154 Bytes)


 *** Break *** segmentation violation

The only obvious change I can think of that might have caused this the move to a new OS, previously I was working with SL7 on which all of this works fine. I’ve checked with the same version of root, same compiler etc on the old SL7 system and the above command works just fine.

ROOT Version: 6.18.04
Platform: Rocky Linux 8.9
Compiler: GCC 8.2.0


Hi @cjt00, welcome back to the ROOT forum!

Hmm, looks like something is wrong with the compiler setup of gcc and clang. The headers from the GCC STL are trying to include some headers from clang, for whatever reason.

The only obvious change I can think of that might have caused this the move to a new OS, previously I was working with SL7 on which all of this works fine. I’ve checked with the same version of root, same compiler etc on the old SL7 system and the above command works just fine.

ROOT Version: 6.18.04
Platform: Rocky Linux 8.9
Compiler: GCC 8.2.0

With “same version of ROOT”, do you mean the exact same ROOT build on cvmfs? If yes, this seems like it would never work. SL 7 is based on RHEL 7, and Rocky 8.9 is based on RHEL 8. It’s guaranteed that something goes wrong if you mix and match packages from different major RHEL versions like that. How did you make sure to even have the same compiler version? Maybe that’s where the problem with the environment comes from.

Maybe this post is also helpful to you:

Cheers,
Jonas

Hi @jonas thanks for the response.

I’ve checked and yes they’re using exactly the same versions of root and gcc from exactly the same locations on cvmfs.

I’ve checked and yes they’re using exactly the same versions of root and gcc from exactly the same locations on cvmfs.

Ok, then I think this is the problem, already starting with gcc. You can’t use gcc compiled for SL7 (i.e. RHEL 7) on Rocky Linux 8 (based on RHEL 8). You need to RHEL 8 packages all the way if you want things to work. In this case, the problem is not related to ROOT, and you should maybe ask your system administrator what to do.

In other works, after this major OS update you can’t use the same binaries on cvmfs, and that’s your problem. Or did I misunderstand something?

Note that there are plenty of ROOT builds on cvmfs for RHEL 8 (aka. CentOS 8), for example:

/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.28.06/x86_64-centos8-gcc85-opt

Can you not just use one of these?

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