Undefined symbol in RooAbsArg when loading compiled library

Hello,

I am trying to compile a custom library which uses RooFit and I am getting an “undefined symbol” error that baffles me.

import ROOT
ROOT.gSystem.Load("myLib.so") # Just using an arbitrary name to illustrate

The error I get is

cling::DynamicLibraryManager::loadLibrary(): myLib.so: undefined symbol: _ZNK9RooAbsArg20fillNormSetForServerERK9RooArgSetRKS_

I tried to find what this symbol is.

$ c++filt _ZNK9RooAbsArg20fillNormSetForServerERK9RooArgSetRKS_
RooAbsArg::fillNormSetForServer(RooArgSet const&, RooAbsArg const&) const

But this fillNormSetForServer method does not belong to the RooAbsArg class. It is a private member of the RooProdPdf class. When I look at the contents of the lib folder of my ROOT install, it confirms that the method only exists for RooProdPdf.

for file in $LD_LIBRARY_PATH/*so; do nm -A $file | grep fillNormSet; done
nm: <lib path>/libc++.so: file format not recognized
nm: <lib path>/libgcc_s.so: file format not recognized
nm: <lib path>/libncurses.so: file format not recognized
nm: <lib path>/libncursesw.so: file format not recognized
nm: <lib path>/libpyside6.cpython-312-x86_64-linux-gnu.so: no symbols
nm: <lib path>/libpyside6qml.cpython-312-x86_64-linux-gnu.so: no symbols
<lib path>/libRooFitCore.so:0000000000480bb0 T _ZNK10RooProdPdf20fillNormSetForServerERK9RooArgSetRK9RooAbsArg
<lib path>/libRooFitCore.so:00000000001af53e t _ZNK10RooProdPdf20fillNormSetForServerERK9RooArgSetRK9RooAbsArg.cold
nm: <lib path>/libshiboken6.cpython-312-x86_64-linux-gnu.so: no symbols

Any suggestion on how to resolve this?


ROOT version: 6.32.02 linuxx8664gcc (conda install)
GCC: 13.3.0
Python: 3.12.7

Hello @kyoon, I believe @jonas can help you with this.

Meanwhile, is that function ever mentioned directly in your custom library?

That’s quite surprising. Can you maybe share the reproducer with us? Does this also happen in ROOT installations without Conda, for example with the ROOT binaries downloaded from our website?

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