# Problem with TMVA library when installing from source

**URL:** <https://root-forum.cern.ch/t/problem-with-tmva-library-when-installing-from-source/9316>\
**Category:** TMVA\
**Created:** [December 1, 2009, 5:48pm UTC](https://root-forum.cern.ch/t/problem-with-tmva-library-when-installing-from-source/9316 "2009-12-01T17:48:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vciulli](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/9f8e36/32.png) [@vciulli](https://root-forum.cern.ch/u/vciulli)\
**Post date:** [December 1, 2009, 5:48pm UTC](https://root-forum.cern.ch/t/problem-with-tmva-library-when-installing-from-source/9316/1 "2009-12-01T17:48:41Z")

</div>

I installed root (5.25.04) from source files on a debian release but I have problems when linking to TMVA libraries

g++ -o analyzeData analyzeData.o -O -L/home1/v\_ciulli/local/root/5-25-04/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lMinuit -lTMVA  
/home1/v\_ciulli/local/root/5-25-04/root/lib/libTMVA.so: undefined reference to `TMultiLayerPerceptron::Evaluate(int, double*) const' /home1/v_ciulli/local/root/5-25-04/root/lib/libTMVA.so: undefined reference to`TXMLEngine::HasAttr(void\*, char const\*)’  
[…]

The same code works fine on lxplus5 or macos

Any idea of what could be wrong?

Many thanks,  
Vitaliano

---

<div class="post-metadata">

**Author:** ![brun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b9e5f3/32.png) [@brun](https://root-forum.cern.ch/u/brun)\
**Post date:** [December 1, 2009, 7:09pm UTC](https://root-forum.cern.ch/t/problem-with-tmva-library-when-installing-from-source/9316/2 "2009-12-01T19:09:14Z")

</div>

Add the libs

` -lMLP -lXMLIO
`  
Rene

---

<div class="post-metadata">

**Author:** ![vciulli](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/9f8e36/32.png) [@vciulli](https://root-forum.cern.ch/u/vciulli)\
**Post date:** [December 2, 2009, 11:21am UTC](https://root-forum.cern.ch/t/problem-with-tmva-library-when-installing-from-source/9316/3 "2009-12-02T11:21:19Z")

</div>

Thanks, this removed most of error messages but not all of them

v\_ciulli@stufis15:~/Analisi\_Dati\_2009/tmva/analyze$ g++ -o analyzeData analyzeData.o -O -L/home1/v\_ciulli/local/root/5-25-04/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lMinuit -lTMVA -lXMLIO -lMLP  
/home1/v\_ciulli/local/root/5-25-04/root/lib/libTMVA.so: undefined reference to `TTreeFormula::TTreeFormula(char const*, char const*, TTree*)' /home1/v_ciulli/local/root/5-25-04/root/lib/libMLP.so: undefined reference to`TTreeFormulaManager::TTreeFormulaManager()'  
collect2: ld returned 1 exit status

Do you know which libraries I still miss?

By the way, why it is not needed to explicitly link these libraries on lxplus?  
Is there an option in ./configure which I should have used?  
I built ROOT in a local directory setting ROOTSYS variable since I am not administrator of this machine.

Cheers,  
Vitaliano

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [December 2, 2009, 1:58pm UTC](https://root-forum.cern.ch/t/problem-with-tmva-library-when-installing-from-source/9316/4 "2009-12-02T13:58:39Z")

</div>

Hi,

When using the root executable and ACLiC all those library are auto-loaded based on the need. They are not explicitly linked in order to avoid loading libraries that you do not need (and hence wasting resources).

The library you are now missing is -lTreePlayer

Cheers,  
Philippe.

---

<div class="post-metadata">

**Author:** ![brun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b9e5f3/32.png) [@brun](https://root-forum.cern.ch/u/brun)\
**Post date:** [December 2, 2009, 2:41pm UTC](https://root-forum.cern.ch/t/problem-with-tmva-library-when-installing-from-source/9316/5 "2009-12-02T14:41:02Z")

</div>

When you have this type of problem, you must specify in your link sequence the library that contains the class.  
In your case, look at the documentation of TTreeFormulaManager at  
[root.cern.ch/root/html/TTreeFormulaManager.html](http://root.cern.ch/root/html/TTreeFormulaManager.html)  
and move your mouse in the grayish box on the top right corner. You will see more details about the class, including the library where you can find it.

Rene
