# TMVA installation with ROOT6

**URL:** <https://root-forum.cern.ch/t/tmva-installation-with-root6/19894>\
**Category:** TMVA\
**Created:** [September 24, 2015, 3:10pm UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894 "2015-09-24T15:10:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![leoredi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/5f8ce5/32.png) [@leoredi](https://root-forum.cern.ch/u/leoredi)\
**Post date:** [September 24, 2015, 3:10pm UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894/1 "2015-09-24T15:10:11Z")

</div>

Dear all, I have installed ROOT with flags

`./configure macosx64 --prefix=/usr/local/root/
make -j 4
sudo make install`  
And I do not see any TMVA folder in $ROOTSYS, do you know why this is?  
Thanks.

---

<div class="post-metadata">

**Author:** ![ganis](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ganis/32/12484_2.png) [@ganis](https://root-forum.cern.ch/u/ganis)\
**Post date:** [September 24, 2015, 4:23pm UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894/2 "2015-09-24T16:23:07Z")

</div>

Dear leoredi,

TMVA should be build by default.  
It should install [libTMVA.so](http://libTMVA.so) under /usr/local/root/lib .

What do you mean exactly by ‘no TMVA folder in $ROOTSYS’ ?  
What is $ROOTSYS in your case?  
Can you post the output of the ‘configure’ step?

G Ganis

---

<div class="post-metadata">

**Author:** ![leoredi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/5f8ce5/32.png) [@leoredi](https://root-forum.cern.ch/u/leoredi)\
**Post date:** [September 25, 2015, 9:51am UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894/3 "2015-09-25T09:51:40Z")

</div>

Thanks for the reply.  
So yes I have the libraries:

```auto

```

Then the problem must be with TMVA itself, not with the installation of root, let me explain.  
Following what is written here: [http://tmva.sourceforge.net/docu/TMVAUsersGuide.pdf](http://tmva.sourceforge.net/docu/TMVAUsersGuide.pdf) on page 4 I:

`download TMVA "tar-ball" from https://sourceforge.net/projects/tmva/files/
~> tar -zxvf TMVA-v4.2.0.tgz
~> cd TMVA-v4.2.0
~/TMVA-v4.2.0> make`

And I get what you see at the end of this message. Could this be because of the way I have installed ROOT? I do not have the configure step output but everything worked like a charm so far,

`Compiling src/KDEKernel.cxx ... src/KDEKernel.cxx:94:30: error: no member named 'Erf' in namespace 'TMath'; did you mean
      'erf'?
      if (xs2>0 ) return 0.5*TMath::Erf(xs2);
                             ^ ~~~~~~~~~
                             erf
/usr/include/math.h:451:15: note: 'erf' declared here
extern double erf(double);
              ^
src/KDEKernel.cxx:96:27: error: no member named 'Erf' in namespace 'TMath'; did you mean
      'erf'?
   if (xs2==0) return 0.5*TMath::Erf(TMath::Abs(xs1));
                          ^ ~~~~~~~~~
                          erf
/usr/include/math.h:451:15: note: 'erf' declared here
extern double erf(double);
              ^
src/KDEKernel.cxx:97:27: error: no member named 'Erf' in namespace 'TMath'; did you mean
      'erf'?
   if (xs1>0) return 0.5*(TMath::Erf(xs2)-TMath::Erf(xs1));
                          ^ ~~~~~~~~~
                          erf
/usr/include/math.h:451:15: note: 'erf' declared here
extern double erf(double);
              ^
src/KDEKernel.cxx:97:43: error: no member named 'Erf' in namespace 'TMath'; did you mean
      'erf'?
   if (xs1>0) return 0.5*(TMath::Erf(xs2)-TMath::Erf(xs1));
                                          ^ ~~~~~~~~~
                                          erf
/usr/include/math.h:451:15: note: 'erf' declared here
extern double erf(double);
              ^
src/KDEKernel.cxx:99:31: error: no member named 'Erf' in namespace 'TMath'; did you mean
      'erf'?
      if (xs2>0 ) return 0.5*(TMath::Erf(xs2)+TMath::Erf(TMath::Abs(xs1)));
                              ^ ~~~~~~~~~
                              erf
/usr/include/math.h:451:15: note: 'erf' declared here
extern double erf(double);
              ^
src/KDEKernel.cxx:99:47: error: no member named 'Erf' in namespace 'TMath'; did you mean
      'erf'?
      if (xs2>0 ) return 0.5*(TMath::Erf(xs2)+TMath::Erf(TMath::Abs(xs1)));
                                              ^ ~~~~~~~~~
                                              erf
/usr/include/math.h:451:15: note: 'erf' declared here
extern double erf(double);
              ^
src/KDEKernel.cxx:100:24: error: no member named 'Erf' in namespace 'TMath'; did you mean
      'erf'?
      else return 0.5*(TMath::Erf(TMath::Abs(xs1))-TMath::Erf(TMath::Abs(xs2)));
                       ^ ~~~~~~~~~
                       erf
/usr/include/math.h:451:15: note: 'erf' declared here
extern double erf(double);
              ^
src/KDEKernel.cxx:100:52: error: no member named 'Erf' in namespace 'TMath'; did you mean
      'erf'?
      else return 0.5*(TMath::Erf(TMath::Abs(xs1))-TMath::Erf(TMath::Abs(xs2)));
                                                   ^ ~~~~~~~~~
                                                   erf
/usr/include/math.h:451:15: note: 'erf' declared here
extern double erf(double);
              ^
src/KDEKernel.cxx:119:25: error: no member named 'Sqrt' in namespace 'TMath'
      fSigma = ( TMath::Sqrt(2.0)
                 ~~~~~~~ ^
src/KDEKernel.cxx:120:26: error: no member named 'Power' in namespace 'TMath'
                 *TMath::Power(4./3., 0.2)
                  ~~~~~~~ ^
src/KDEKernel.cxx:122:26: error: no member named 'Power' in namespace 'TMath'
                 *TMath::Power(fHist->Integral(), -0.2) );
                  ~~~~~~~ ^
src/KDEKernel.cxx:198:21: error: no member named 'Sqrt' in namespace 'TMath'; did you mean
      'sqrt'?
         if (fSigma*TMath::Sqrt(1.0/fFirstIterHist->GetBinContent(j)) <= 0 ) {
                    ^ ~~~~~~~~~~
                    sqrt
/usr/include/math.h:447:15: note: 'sqrt' declared here
extern double sqrt(double);
              ^
src/KDEKernel.cxx:202:57: error: no member named 'Sqrt' in namespace 'TMath'; did you mean
      'sqrt'?
         fSigmaHist->SetBinContent(j,fFineFactor*fSigma/TMath::Sqrt(fFirstIterHist->G...
                                                        ^ ~~~~~~~~~~
                                                        sqrt
/usr/include/math.h:447:15: note: 'sqrt' declared here
extern double sqrt(double);
              ^
13 errors generated.
make: *** [obj/KDEKernel.o] Error 1`

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [September 25, 2015, 10:03am UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894/4 "2015-09-25T10:03:54Z")

</div>

Hi,

You should try to avoid , i possible, to install your version of TMVA. I would recommend to use directly the one coming from ROOT. So, ignore these lines in the manual. These are vlid if you are using a very old version of ROOT and you need a newer TMVA version.

Best Regards

Lorenzo

---

<div class="post-metadata">

**Author:** ![leoredi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/5f8ce5/32.png) [@leoredi](https://root-forum.cern.ch/u/leoredi)\
**Post date:** [September 25, 2015, 12:05pm UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894/5 "2015-09-25T12:05:40Z")

</div>

Dear all,

Following Lorenzo’s suggestion I am now using ROOT directly.  
I have installed ROOT v6.05.02 using

```auto

```

Now have you got any idea how can I see if it actually works as expected?  
If I download TMVA.tar and move into /test/ and try to run

```auto

```

I get a lot of errors even if the application finishes, the logs are:

`Error in <TSystem::ExpandFileName>: input: $TMVASYS/lib/libMathCore, output: $TMVASYS/lib/libMathCore
Error in <TSystem::ExpandFileName>: input: $TMVASYS/test/rootalias.C, output: $TMVASYS/test/rootalias.C
/Users/fredi/Downloads/TMVA-v4.2.0/test/./TMVAlogon.C:24:4: error: 'TMVAGlob' is not a class, namespace, or enumeration
   TMVAGlob::SetTMVAStyle();
   ^
/Users/fredi/Downloads/TMVA-v4.2.0/test/./TMVAlogon.C:24:4: note: 'TMVAGlob' declared here
root [0]
Processing TMVAClassification.C...
IncrementalExecutor::executeFunction: symbol '_ZNSt3 __14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_' unresolved while linking function '_GLOBAL__ sub_I_cling_module_7'!
You are probably missing the definition of std:: __1::basic_ostream<char, std::__ 1::char_traits<char> >& std:: __1::endl<char, std::__ 1::char_traits<char> >(std:: __1::basic_ostream<char, std::__ 1::char_traits<char> >&)
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_ZNSt3 __1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc' unresolved while linking function '_GLOBAL__ sub_I_cling_module_7'!
You are probably missing the definition of std:: __1::basic_ostream<char, std::__ 1::char_traits<char> >& std:: __1::operator<<<std::__ 1::char_traits<char> >(std:: __1::basic_ostream<char, std::__ 1::char_traits<char> >&, char const*)
Maybe you need to load the corresponding shared library?`

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [September 25, 2015, 12:32pm UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894/6 "2015-09-25T12:32:57Z")

</div>

Hi,

Why are you still downloading TMVA ?  
Everything is within ROOT , if you take TMVAClassification.C from somewhere else, you might have an old version.

To see if it is working, just go to $ROOTSYS/tutorials/tmva and do:

root TMVAClassification.C

Lorenzo

---

<div class="post-metadata">

**Author:** ![leoredi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/5f8ce5/32.png) [@leoredi](https://root-forum.cern.ch/u/leoredi)\
**Post date:** [September 25, 2015, 12:52pm UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894/7 "2015-09-25T12:52:42Z")

</div>

I don’t have any tutorial folder in my $ROOTSYS.  
If I do echo $ROOTSYS I get /usr/local/root then I do ll $ROOTSYS I get

`drwxr-xr-x 3 root admin 102B 24 Sep 18:13 lib/
drwxr-xr-x 3 root admin 102B 24 Sep 18:13 include/
drwxr-xr-x 31 root admin 1.0K 24 Sep 18:13 bin/
drwxr-xr-x 3 root admin 102B 24 Sep 18:13 etc/
drwxr-xr-x 7 root admin 238B 24 Sep 18:13 share/`

Is it because of how I have installed it? Which was:

```auto
* Download binary
 * cd into folder after unzip
 * ./configure macosx64 --prefix=/usr/local/root/ -all
 * make -j 4
 * sudo make install
 * vim .profile with `. /usr/local/root/bin/thisroot.sh`
```

Thanks.

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [September 25, 2015, 2:11pm UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894/8 "2015-09-25T14:11:05Z")

</div>

HI,

You have probably installed somewhere else the tutorials (something like a doc directory).  
To know it where they are just print in the root prompt the value of

gROOT-\>GetTutorialsDir()

Lorenzo

---

<div class="post-metadata">

**Author:** ![leoredi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/5f8ce5/32.png) [@leoredi](https://root-forum.cern.ch/u/leoredi)\
**Post date:** [September 29, 2015, 10:09am UTC](https://root-forum.cern.ch/t/tmva-installation-with-root6/19894/9 "2015-09-29T10:09:18Z")

</div>

Very nice, thanks a lot I can confirm it works fine now.
