Precompiled ROOT broke after installing librange-v3-dev on Ubuntu

Hi all,
I’m trying to build a project relying on ROOT and some other libraries on Ubuntu 22.04. I found that the precompiled ROOT may suffer environment issues that, once I install librange-v3-dev, root will break down with following errors (root v6.26.10):

input_line_1:1:2: fatal error: module file '/home/sftnight/build/ws/BUILDTYPE/Release/LABEL/ROOT-ubuntu2204/V/6-26/build/lib/libc.pcm' not found: module file not found
#include <new>
 ^
input_line_1:1:2: note: imported by module 'std' in '/home/rml/apps/root/lib/std.pcm'
Warning in cling::IncrementalParser::CheckABICompatibility():
  Failed to extract C++ standard library version.
Replaced symbol atexit cannot be found in JIT!
Replaced symbol at_quick_exit cannot be found in JIT!
Module libc not found.
Failed to load module std
<<< cling interactive line includer >>>: fatal error: module file '/home/sftnight/build/ws/BUILDTYPE/Release/LABEL/ROOT-ubuntu2204/V/6-26/build/lib/libc.pcm' not found: module file not found
<<< cling interactive line includer >>>: note: imported by module '_Builtin_intrinsics' in '/home/rml/apps/root/lib/_Builtin_intrinsics.pcm'
Failed to load module _Builtin_intrinsics
Failed to load module ROOT_Foundation_C
Failed to load module ROOT_Rtypes
Failed to load module ROOT_Foundation_Stage1_NoRTTI
Failed to load module Core
Failed to load module Rint
Failed to load module RIO
Failed to load module MathCore
Failed to load module Hist
... # many other "Failed to load module xxx"

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007fb05c7ad3ea in __GI___wait4 (pid=733, stat_loc=stat_loc
entry=0x7fff1f042798, options=options
entry=0, usage=usage
entry=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
#1  0x00007fb05c7ad3ab in __GI___waitpid (pid=<optimized out>, stat_loc=stat_loc
entry=0x7fff1f042798, options=options
entry=0) at ./posix/waitpid.c:38
#2  0x00007fb05c713bdb in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:171
#3  0x00007fb05cea58a4 in TUnixSystem::StackTrace() () from /home/rml/apps/root/lib/libCore.so.6.26
#4  0x00007fb05cea2bb5 in TUnixSystem::DispatchSignals(ESignals) () from /home/rml/apps/root/lib/libCore.so.6.26
#5  <signal handler called>
#6  0x00007fb058595a24 in ROOT::TMetaUtils::TNormalizedCtxtImpl::keepTypedef(cling::LookupHelper const&, char const*, bool) () from /home/rml/apps/root/lib/libCling.so
#7  0x00007fb0585960f5 in ROOT::TMetaUtils::TNormalizedCtxtImpl::TNormalizedCtxtImpl(cling::LookupHelper const&) () from /home/rml/apps/root/lib/libCling.so
#8  0x00007fb058596836 in ROOT::TMetaUtils::TNormalizedCtxt::TNormalizedCtxt(cling::LookupHelper const&) () from /home/rml/apps/root/lib/libCling.so
#9  0x00007fb058671df4 in TCling::TCling(char const*, char const*, char const* const*) () from /home/rml/apps/root/lib/libCling.so
#10 0x00007fb058673aa5 in CreateInterpreter () from /home/rml/apps/root/lib/libCling.so
#11 0x00007fb05cd3b1f3 in TROOT::InitInterpreter() () from /home/rml/apps/root/lib/libCore.so.6.26
#12 0x00007fb05cd3b6ef in ROOT::Internal::GetROOT2() () from /home/rml/apps/root/lib/libCore.so.6.26
#13 0x00007fb05cd4896d in TApplication::TApplication(char const*, int*, char**, void*, int) () from /home/rml/apps/root/lib/libCore.so.6.26
#14 0x00007fb05d16a460 in TRint::TRint(char const*, int*, char**, void*, int, bool, bool) () from /home/rml/apps/root/lib/libRint.so.6.26
#15 0x000055ac4beeb2e7 in main ()
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum https://root.cern/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://root.cern/bugs Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#6  0x00007fb058595a24 in ROOT::TMetaUtils::TNormalizedCtxtImpl::keepTypedef(cling::LookupHelper const&, char const*, bool) () from /home/rml/apps/root/lib/libCling.so
#7  0x00007fb0585960f5 in ROOT::TMetaUtils::TNormalizedCtxtImpl::TNormalizedCtxtImpl(cling::LookupHelper const&) () from /home/rml/apps/root/lib/libCling.so
#8  0x00007fb058596836 in ROOT::TMetaUtils::TNormalizedCtxt::TNormalizedCtxt(cling::LookupHelper const&) () from /home/rml/apps/root/lib/libCling.so
#9  0x00007fb058671df4 in TCling::TCling(char const*, char const*, char const* const*) () from /home/rml/apps/root/lib/libCling.so
#10 0x00007fb058673aa5 in CreateInterpreter () from /home/rml/apps/root/lib/libCling.so
#11 0x00007fb05cd3b1f3 in TROOT::InitInterpreter() () from /home/rml/apps/root/lib/libCore.so.6.26
#12 0x00007fb05cd3b6ef in ROOT::Internal::GetROOT2() () from /home/rml/apps/root/lib/libCore.so.6.26
#13 0x00007fb05cd4896d in TApplication::TApplication(char const*, int*, char**, void*, int) () from /home/rml/apps/root/lib/libCore.so.6.26
#14 0x00007fb05d16a460 in TRint::TRint(char const*, int*, char**, void*, int, bool, bool) () from /home/rml/apps/root/lib/libRint.so.6.26
#15 0x000055ac4beeb2e7 in main ()
===========================================================

I have also tried 6.32.02 and 6.32.04, the similar error also occured.

I’m not sure whether such situation is under expectation, though I can manually compile root I think it better to report this problem? :slight_smile:

_ROOT Version: 6.26.10 & 6.32.02 & 6.32.04
_Platform: Ubuntu 22.04
_Compiler: gcc 11.4


Hi Mingrun,

You did well to report: this helps ROOT improve and the this topic, once solved, could help other users.

The binaries we distribute rely on default system packages. The authoritative list of them, the ones used to build the containers for the ROOT CI itself can be found here.

In case something stops working because the system “evolves around” the binaries produced, my advice would be to build ROOT from sources. It should not be hard. Here you find the instructions Installing ROOT - ROOT

Let us know how this goes.

Cheers,
D

The “librange-v3-dev” package adds a simple “/usr/include/module.modulemap” file, which then kills ROOT.

Yes, I have built ROOT from source and this can well solve this problem.

Try to make a small test. Execute “sudo apt-get purge librange-v3*” and see if your new ROOT binaries still work.

I missed a message printed at start up. It seems that my new ROOT is still suffering a little environment issue. I extend the test with procedure:

<Build from source and source bin/thisroot.sh …>

  1. root # Module libc not found
  2. sudo apt purge librange-v3*
  3. root # ROOT compile libc.pcm automatically
  4. exit and root again # no extra message
  5. sudo apt install librange-v3-dev
  6. root # Module libc not found

I’m not sure what “Module libc” refers to, but I have checked that libc6-dev is installed on my system. The whole terminal output is as follow.

rml@I7:~/apps/root-6.32.02$ source bin/thisroot.sh
rml@I7:~/apps/root-6.32.02$ root
Module libc not found.
   ------------------------------------------------------------------
  | Welcome to ROOT 6.32.02                        https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Sep 08 2024, 18:04:21                 |
  | From heads/master@tags/v6-32-02                                  |
  | With c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0                   |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

root [0] .q
rml@I7:~/apps/root-6.32.02$ sudo apt purge librange-v3*
# apt outputs
rml@I7:~/apps/root-6.32.02$ root
<<< cling interactive line includer >>>: remark: building module 'libc' as '/home/rml/apps/root-6.32.02/lib/libc.pcm' [-Rmodule-build]
<<< cling interactive line includer >>>: remark: finished building module 'libc' [-Rmodule-build]
   ------------------------------------------------------------------
  | Welcome to ROOT 6.32.02                        https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Sep 08 2024, 18:04:21                 |
  | From heads/master@tags/v6-32-02                                  |
  | With c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0                   |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------
   ------------------------------------------------------------------

root [0] .q
rml@I7:~/apps/root-6.32.02$ root
   ------------------------------------------------------------------
  | Welcome to ROOT 6.32.02                        https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Sep 08 2024, 18:04:21                 |
  | From heads/master@tags/v6-32-02                                  |
  | With c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0                   |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

root [0] .q
rml@I7:~/apps/root-6.32.02$ sudo apt install librange-v3-dev
# apt outputs
rml@I7:~/apps/root-6.32.02$ root
Module libc not found.
   ------------------------------------------------------------------
  | Welcome to ROOT 6.32.02                        https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Sep 08 2024, 18:04:21                 |
  | From heads/master@tags/v6-32-02                                  |
  | With c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0                   |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

root [0] .q

Just for the cross reference: we also have a related issue on GitHub.

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