Compilation error related to TUnfoldDensity::GetFoldedOutput()

I work with Root 6.10/09

When compiling I encounter this error related to TUnfoldDensity::GetFoldedOutput():

/cvmfs/ /tmp/vveckaln/cczzhXv7.o: undefined reference to symbol '_ZNK14TUnfoldDensity15GetFoldedOutputEPKcS1_S1_S1_bb'
/cvmfs/ error adding symbols: DSO missing from command line

I try

readelf -s /cvmfs/ | grep GetF

and it shows GetFoldedOutput() is associated TUnfold:

   653: 000000000001a890   752 FUNC    GLOBAL DEFAULT   12 _ZNK7TUnfold15GetFoldedOu
   293: 000000000001a890   752 FUNC    GLOBAL DEFAULT   12 _ZNK7TUnfold15GetFoldedOu

Is that fine?

I wander why the compiler looks for in

root-config --libdir


Previously I worked with Root 6.06/01 and I did not encounter this problem. There TUnfoldDensity is referenced in a completely different library

grep TUnfoldDensity `root-config --libdir`/*.so
Binary file /cvmfs/

Could you please help?

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

I think there are some configuration problem. I would try to do a clean build removing any reference to other ROOT versions in your LD_LIBRARY_PATH and PATH


It doesn’t seem so:

[vveckaln@lxplus729 UnfoldingLIB]$ echo $PATH
[vveckaln@lxplus729 UnfoldingLIB]$ which root


I managed to fix by adding a separate statement

Lroot-config --libdir -lUnfold -pthread -lm -ldl -rdynamic -Wl,-rpath,`root-config --libdir

in the Makefile.

Why wasn’t root-config --libs --cflags sufficient?

root-config --libs defines only a subset of ROOT libraries, not all of them. For example if using TMVA or roofit you need to add them explicitly.
Please next time make it clear that you were not compiling ROOT but an application based on ROOT.

Best regards


It was not necessary to indicate separately in Root 6.06/01.

Yes, in ROOT 6.06 TUnfold was part of libHist, so there was no libUnfold. Apologies for this inconvenience.

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