Incomprehensible errors when running code from opendata tutorial for dimuon analysis

Hello there. I’m following a tutorial on CMS open data analysis from here. I’m running into a bunch of error while running some code and I am unable to understand them. Would greatly appreciate any help on understanding and fixing these errors.

In the code, I have replaced the line[27] ROOT::RDataFrame df("Events", "root://eospublic.cern.ch//eos/opendata/cms/derived-data/AOD2NanoAODOutreachTool/Run2012BC_DoubleMuParked_Muons.root"); with ROOT::RDataFrame df("Events", "Run2012BC_DoubleMuParked_Muons.root"); since I downloaded it to my local directory.

Once I have the .C file and .root file in the same folder (pwd), I try to run the file through Terminal:

root -l
.x dimuonSpectrum.C

Code: .C file from github

Data used from CMS Open Data

Errors of the form:

IncrementalExecutor::executeFunction: symbol '_ZNSaISt19_Sp_counted_deleterIPN4ROOT8Internal3RDF7RActionINS2_12ReportHelperINS0_6Detail3RDF13RJittedFilterEEES7_NS0_10TypeTraits8TypeListIJEEEEESt14default_deleteISC_ESaIvELN9__gnu_cxx12_Lock_policyE2EEED1Ev' unresolved while linking [cling interface function]!
You are probably missing the definition of std::allocator<std::_Sp_counted_deleter<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::ReportHelper<ROOT::Detail::RDF::RJittedFilter>, ROOT::Detail::RDF::RJittedFilter, ROOT::TypeTraits::TypeList<> >*, std::default_delete<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::ReportHelper<ROOT::Detail::RDF::RJittedFilter>, ROOT::Detail::RDF::RJittedFilter, ROOT::TypeTraits::TypeList<> > >, std::allocator<void>, (__gnu_cxx::_Lock_policy)2> >::~allocator()
Maybe you need to load the corresponding shared library?

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.32.06
Platform: Ubuntu 22.04 (WSL)
Compiler: Not Provided


The .C and .py macros work fine for me, both directly on Linux and also on Ubuntu via WSL, so it may be an issue in your system. Did you install the appropriate pre-compiled binary, for Ubuntu 24.04? and have you installed all the ROOT dependencies? (to make sure, even if you already did it, go here and copy-paste and run the “one liner” command for the required packages)

Thank you for the reply, it works fine now, even before I re-installed the packages. I wonder what went wrong. Regardless, I will run the one-liner you suggested.

I’ve run the one-liner per your suggestion. I was able to reproduce the issue by running the macro again in the same session. The issue goes away once I exit and run root again, but if i run the macro in the same session, a bunch of errors pop up.

You can run the macro in batch mode, without entering the interactive mode, with

 root -l -b -q dimuonSpectrum.C