ROOT CLING stopped working after underlying system change

ROOT Version: 6.22.0 with patches
Platform: AWS Linux 2
Compiler: g++ ? (I used -DCMAKE_CXX_COMPILER=/usr/bin/g++ flag, but I’m not sure what’s the compiler nor how to check which is used)

Context: I have created a custom ROOT compilation for AWS Lambda and was able to successfully run it on Python3.8 Lambda a month ago after compiling ROOT on dockerized amazonlinux:2.

The command I use for downloading ROOT:
git clone --branch v6-22-00-patches https://github.com/root-project/root.git

However, since then some underlying change inside linux broke cling. Here’s a stacktrace (very long):

This stacktrace is coming from executing this script:

As mentioned, previously this worked fine both on AWS Lambda and on docker container based on amazonlinux:2. The issue happened only on AWS Lambda without any input from my side: I changed nothing in my deployment package, so it must be something with underlying system difference. I’m kind of lost how to solve this stacktrace due to my mediocre C++ experience. Any clues how I could debug it?

@vvassilev Do you have an idea?

If the default compiler was changed it could be the reason of seeing this. Can you recompile ROOT and see if the issue persists?

I recompiled ROOT in cmake DEBUG mode to use Clang as compiler, and now I got this specific message:

python3.7: /root_src/interpreter/cling/lib/Interpreter/CIFactory.cpp:587: {anonymous}::collectModuleMaps(clang::CompilerInstance&, llvm::SmallVectorImpl<std::__cxx11::basic_string<char> >&)::<lambda(llvm::StringRef, const string&, const string&, std::__cxx11::string&)>: Assertion llvm::sys::fs::exists(SystemDir) && “Must exist!”’ failed.`

Context:

  • /root_src is where git repo was cloned
  • /mnt/cern_root/root is where i run cmake with this flag: -DCMAKE_INSTALL_PREFIX=/mnt/cern_root/root_install
  • /mnt/cern_root/root_install is where it should install (?) according to this flag^

I tested on docker with only /mnt/cern_root/root_install existing out of these and it worked.
In Lambda environment it failed with error as you can see above.

My thoughts:

  1. For some reason, the installed ROOT still targets original /root_src dir which i removed, as I thought root_install (install location) would sufffice.
  2. I might need to copy some more things from source code dir/compilation dir to install dir, but I have no idea why they were left behind.

For more info how I compiled a docker script:

@vvassilev Can you tell me how can I fix that exception? All help is greatly appreciated.

Edit: In original (docker) location it works correctly even after removing both /root_src and /mnt/cern_root/root, but for some reason on Lambda it fails as you can see.

Could you break with the debugger and print SystemDir? I suspect it is /usr/include, if that’s the case you need to install libc.

1 Like

That was it, I needed to a) provide libcxx with my installation and b) target CPATH to include it from nonstandard location (at my /mnt/… dir) . Thank you very much for help @vvassilev :smiley:

Glad to help!

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