# Trouble with Root 5.30.06 on Ubuntu 10.04.3

**URL:** <https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950>\
**Category:** ROOT\
**Created:** [March 9, 2012, 9:08pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950 "2012-03-09T21:08:51Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![teb27](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@teb27](https://root-forum.cern.ch/u/teb27)\
**Post date:** [March 9, 2012, 9:08pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/1 "2012-03-09T21:08:51Z")

</div>

Hi,

I had trouble compiling Root v5.30.06 on Ubuntu 10.04.3. At first, the “make” step would crash, however after disabling xrootd, it finally worked. But when trying to compile one of my macros, I now get the error

```auto
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `vtable for TFoamIntegrand'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `TFoamIntegrand::ShowMembers(TMemberInspector&)'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `TFitter::TFitter(int)'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `TFoam::TFoam(char const*)'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `typeinfo for TFoamIntegrand'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `gMinuit'
/home/thomas/root/lib/libRooFit.so: undefined reference to `ROOT::Math::assoc_legendre(unsigned int, unsigned int, double)'
/home/thomas/root/lib/libRooFit.so: undefined reference to `ROOT::Math::noncentral_chisquared_pdf(double, double, double)'
collect2: ld returned 1 exit status
make: *** [WAnalysisTrigCorrv5] Error 1
```

This doesn’t happen on lxplus (with the same root version) nor on my local machine with v5.32.00-patches. I need Root v5.30.xx, however, due to memory leak issues in Roofit for other versions (only RooFit 3.17 works with my code). Any help on this is appreciated.

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [March 10, 2012, 10:54am UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/2 "2012-03-10T10:54:36Z")

</div>

[url][Installing ROOT from Source](https://root-forum.cern.ch/t/installing-root-from-source/13647/1)  
[url][Linking problem to libTree.so](https://root-forum.cern.ch/t/linking-problem-to-libtree-so/13697/1)  
[url][ROOT 5.32/00 support](https://root-forum.cern.ch/t/root-5-32-00-support/13674/1)

---

<div class="post-metadata">

**Author:** ![teb27](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@teb27](https://root-forum.cern.ch/u/teb27)\
**Post date:** [March 12, 2012, 6:14pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/3 "2012-03-12T18:14:23Z")

</div>

Hi,

I have tried what was suggested on the links you provided (thank you), but I am still getting the same problem when compiling.

```auto
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `vtable for TFoamIntegrand'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `TFoamIntegrand::ShowMembers(TMemberInspector&)'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `TFitter::TFitter(int)'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `TFoam::TFoam(char const*)'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `typeinfo for TFoamIntegrand'
/home/thomas/root/lib/libRooFitCore.so: undefined reference to `gMinuit'
/home/thomas/root/lib/libRooFit.so: undefined reference to `ROOT::Math::assoc_legendre(unsigned int, unsigned int, double)'
/home/thomas/root/lib/libRooFit.so: undefined reference to `ROOT::Math::noncentral_chisquared_pdf(double, double, double)'
collect2: ld returned 1 exit status
make: *** [WAnalysisTrigCorrv5] Error 1
```

however,

`
$ ls /etc/ | grep root `  
gives me

```auto
root
su-to-rootrc
```

but I used the package manager to uninstall anything affiliated with the Ubuntu root version (i.e. it seems like any v5.18.00 software has been removed). Would you suggest deleting this root subdirectory as well?

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [March 12, 2012, 6:58pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/4 "2012-03-12T18:58:56Z")

</div>

Well, in general you should have “completely removed” (i.e. “remove with any associated configuration files”) all standard Ubuntu’s ROOT packages (this would also remove the “/etc/root” subdirectory).  
For now, you could simply “sudo rm -rf /etc/root” (but do not touch the “/etc/su-to-rootrc” file).

How do you configure your ROOT?  
Do you use “–prefix”? If yes, remember to add “–etcdir” (otherwise it defaults to “/etc/root”, no matter what your “prefix” is).  
If you configure your ROOT without “–prefix” then the “/etc/root” subdirectory should not make you any problems (even if it exists and contains “outdated” contents - it’s not used in this case at all).

If you post any simple source code which demonstrates your problem, I could try to compile/link it on my system (Ubuntu 10.04.4 LTS i686).

---

<div class="post-metadata">

**Author:** ![teb27](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@teb27](https://root-forum.cern.ch/u/teb27)\
**Post date:** [March 13, 2012, 1:48pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/5 "2012-03-13T13:48:16Z")

</div>

No, I do not use “–prefix”, so this has no effect on the issue. However, I did notice that the CINT interpreter is version 5.18.00

```auto
 *******************************************
  * *
  * W E L C O M E to R O O T *
  * *
  * Version 5.30/06 10 January 2012 *
  * *
  * You are welcome to visit our Web site *
  * http://root.cern.ch *
  * *
  *******************************************

ROOT 5.30/06 (tags/v5-30-06@42590, Mar 12 2012, 15:49:20 on linux)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
```

would this have anything to do with it?

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [March 13, 2012, 1:57pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/6 "2012-03-13T13:57:35Z")

</div>

The CINT version is expected to be 5.18.00 (even in the newest ROOT 5.32/01).

---

<div class="post-metadata">

**Author:** ![teb27](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@teb27](https://root-forum.cern.ch/u/teb27)\
**Post date:** [March 13, 2012, 5:21pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/7 "2012-03-13T17:21:00Z")

</div>

By checking other posts, it sounds like I have to link a few libraries.  
[url][Failed compilation from RooFit since ROOTv5.28](https://root-forum.cern.ch/t/failed-compilation-from-roofit-since-rootv5-28/11603/1)  
In the /root/Makefile, I tried

```auto
ROOTLIBS := $(BOOTLIBS) -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad \
                -lTree -lMatrix -lThread -lMinuit -lFoam -lRooFit -lRooFitCore -lMathMore
```

However, this didn’t work as it did for others. Am I linking these libraries correctly?

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [March 13, 2012, 5:27pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/8 "2012-03-13T17:27:36Z")

</div>

Try:  
root-config --libs  
root-config --glibs  
root-config --evelibs  
Take the “most complete” that suits your needs and simply add the “missing” ones.

I’m telling you … give me a “workinig example” of your problem and I will try to get it working, too. ![:mrgreen:](https://root-forum.cern.ch/uploads/default/original/2X/2/2799b3ea86c419a02327c767288415b2a17e6ee1.gif "Mr. Green")  
Or at least one should precisely check the “linking step” … ![:-k](https://root-forum.cern.ch/uploads/default/original/1X/0287eb7e20db10fd88f87cb0260abb31a3c87acc.gif "Think")

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [March 13, 2012, 7:11pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/9 "2012-03-13T19:11:33Z")

</div>

I’ve got an idea … there exists the “${ROOTSYS}/test/stressRooFit.cxx”.  
See the “{ROOTSYS}/test/Makefile” for appropriate flags.  
Try to compile and link the ROOT “test” applications … simply “cd test” and type “make”.  
It seems to me that what you need is:  
ROOTLIBS := $(shell root-config --libs) -lRooFit -lRooFitCore -lHtml -lThread -lMinuit -lFoam -lMathMore

---

<div class="post-metadata">

**Author:** ![teb27](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@teb27](https://root-forum.cern.ch/u/teb27)\
**Post date:** [March 13, 2012, 7:16pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/10 "2012-03-13T19:16:30Z")

</div>

…

---

<div class="post-metadata">

**Author:** ![teb27](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@teb27](https://root-forum.cern.ch/u/teb27)\
**Post date:** [March 13, 2012, 7:18pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/11 "2012-03-13T19:18:59Z")

</div>

Here is the content of the Makefile I am using.

```auto
#CC = /afs/cern.ch/sw/lcg/external/gcc/4.3.2/x86_64/bin/g++
CC = /usr/bin/g++
CCFLAGS = -Wall -g
INCS = `root-config --cflags` -I.
LIBS = `root-config --libs` -lRooFit -lRooFitCore -lRooStats

WAnalysisTrigCorrv5 : WAnalysisTrigCorrv5.C flavourFitterHIDepTrigCorrv2.o RooShiftedKeysPdf.o Dict.o
	$(CC) $(CCFLAGS) $< RooShiftedKeysPdf.o Dict.o -o $@ $(INCS) $(LIBS)

flavourFitterHI : flavourFitterHI.C flavourFitterHIDepTrigCorrv2.o RooShiftedKeysPdf.o Dict.o
	$(CC) $(CCFLAGS) $< RooShiftedKeysPdf.o Dict.o -o $@ $(INCS) $(LIBS)

flavourFitterHIDepTrigCorrv2 : flavourFitterHIDepTrigCorrv2.C RooShiftedKeysPdf.o Dict.o
	$(CC) $(CCFLAGS) $< RooShiftedKeysPdf.o Dict.o -o $@ $(INCS) $(LIBS)

flavourFitterHIDepTrigCorrv2.o : flavourFitterHIDepTrigCorrv2.C
	$(CC) $(CCFLAGS) -c $< $(INCS) $(LIBS)

RooShiftedKeysPdf.o : RooShiftedKeysPdf.cxx RooShiftedKeysPdf.h
	$(CC) $(CCFLAGS) -c $< $(INCS) $(LIBS)

#AtlasUtils.o : ${HOME}/atlasstyle-00-03-04/AtlasUtils.C 
AtlasUtils.o : ${TestArea}/HeavyIonSingleMuons2011/code/AtlasUtils.C 
	$(CC) $(CCFLAGS) -c $< $(INCS) $(LIBS)

Dict.o : Dict.cxx
	$(CC) $(CCFLAGS) -c $< $(INCS) $(LIBS)

Dict.cxx : RooShiftedKeysPdf.h
	rootcint -f $@ -c $<+

clean : 
	rm -f flavourFitterHIDepTrigCorrv2 WAnalysisTrigCorrv5 RooShiftedKeysPdf.o Dict.o Dict.cxx Dict.h
	rm -f flavourFitterHIDepTrigCorrv2 RooShiftedKeysPdf.o Dict.o Dict.cxx Dict.h
# rm -f flavourFitterHIDepTrigCorrv2 RooShiftedKeysPdf.o Dict.o Dict.cxx Dict.h
```

---

<div class="post-metadata">

**Author:** ![teb27](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@teb27](https://root-forum.cern.ch/u/teb27)\
**Post date:** [March 13, 2012, 7:23pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/12 "2012-03-13T19:23:09Z")

</div>

Actually, by linking the libraries using this Makefile, everything seems to be working. Thank you for all your help!

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [March 13, 2012, 7:29pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/13 "2012-03-13T19:29:12Z")

</div>

That means you have it working now? Or should I still try to compile and link it myself?

---

<div class="post-metadata">

**Author:** ![teb27](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@teb27](https://root-forum.cern.ch/u/teb27)\
**Post date:** [March 13, 2012, 7:36pm UTC](https://root-forum.cern.ch/t/trouble-with-root-5-30-06-on-ubuntu-10-04-3/13950/14 "2012-03-13T19:36:57Z")

</div>

I have it working. Thanks again.
