# Warning in \<TInterpreter::ReadRootmapFile\>

**URL:** <https://root-forum.cern.ch/t/warning-in-tinterpreter-readrootmapfile/47871>\
**Category:** ROOT\
**Tags:** rootcling\
**Created:** [November 29, 2021, 9:48pm UTC](https://root-forum.cern.ch/t/warning-in-tinterpreter-readrootmapfile/47871 "2021-11-29T21:48:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![giovinazzo](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/g/8baadc/32.png) [@giovinazzo](https://root-forum.cern.ch/u/giovinazzo)\
**Post date:** [November 29, 2021, 9:48pm UTC](https://root-forum.cern.ch/t/warning-in-tinterpreter-readrootmapfile/47871/1 "2021-11-29T21:48:17Z")

</div>

ROOT version: 6.xx  
platform: centos7  
compiler: g++

I created small libraries based on ROOT, including a dictionary for ROOT (created with rootcling).  
I have been doing that for quite a while, but I am now experiencing a strange problem

- at program execution runtime, I receive a warning that some classes of the 2nd library are already in the first one
- this appears with a dummy program, linked with my libraries, just creating a TFile

the warning looks like

> Warning in TInterpreter::ReadRootmapFile: class RExtremaFinder found in libRAnalysis.so is already in libRBase.so

I scanned my first library with **nm -C** , and there is absolutely no trace of the classes in the first library (here libRBase.so) !  
There is also nothing about this class in the **“.rootmap”** file generated by rootcling.

This is the case for some of the classes created in the second library, but not all of them…  
Despite they are created the same way with respect to ROOT.

I removed the .rootmap files (for both libraries) from the libraries directory, and **there is no warning at execution anymore**.

**But I wonder if there’s something I am doing wrong** … (and that may have an influence that I do not see in using my libraries)

Additional information:

- these classes existed in a previous version of my libraries
- I add issues with template classes (that changed in the new libraries), with an extremely long runtime warning:

> Warning in TInterpreter::LoadLibraryMap: Problems in (null) declaring 'namespace std { }namespace ROOT { }namespace ROOT { namespace Math { } […VERY LONG LIST OF CLASSES AND OTHER…] ’ were encountered.

In this warning, there are classes from old libraries, or from **other personal libraries that I do not use** in the problem mentioned.  
So it seems to me that some old stuff remain, related to `TInterpreter`.  
But I suppose this should be impossible ?

Thank you for helping.

---

<div class="post-metadata">

**Author:** ![giovinazzo](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/g/8baadc/32.png) [@giovinazzo](https://root-forum.cern.ch/u/giovinazzo)\
**Post date:** [November 30, 2021, 2:42pm UTC](https://root-forum.cern.ch/t/warning-in-tinterpreter-readrootmapfile/47871/2 "2021-11-30T14:42:18Z")

</div>

I found the reason of the problems, but **I would be interested in an explanation of the reason**.

My situation was the following:

- I defined previously som libraries (let’s call them `libA` and `libB`) compiled with ROOT (with dictionary generation)
- then I created a new version of these libraries… with same names, but several differences

There are no problem at compilation time, but the warnings can be triggered at run time, for example by simply creating a `TFile` (my interpretation is that this will trig something with the `TInterpreter` class… to be confirmed).

The problem comes from the fact that the old libraries still exist

1. a class (with same name, for example `MyClass`) that was previously declared in `libA` is now declared in `libB`
2. some templates that were previously declared (ex.: `template < class T > class MyTemp`) are redefined in the new libraries as `template < class T, class Q > class MyTemp`

The point 1 generates the following warning

> Warning in TInterpreter::ReadRootmapFile: class MyClass found in libB.so is already in libA.so

The point 2 generates the following warning

> input\_line\_16:1:8276: error: too many template parameters in template redeclaration  
> input\_line\_16:1:7787: note: previous template declaration is here  
> […]  
> Warning in TInterpreter::LoadLibraryMap: Problems in (null) declaring ‘namespace std { }namespace ROOT { }namespace ROOT { namespace Math { } }namespace ROOT { namespace Math { class IParametricGradFunctionOneDim; } }namespace ROOT  
> […]  
> ;template class MyTemp; …’ were encountered.

This can be solved easily:

- by removing the old libraries
- or by removing the old libraries path from `LD_LIBRARY_PATH`

My question is: **how can this happen** while in the new version of my libraries (and the test program), there is absolutely no reference, no link, no include or whatever to the old libraries !!!

**How/why does `TInterpreter` keep track of the old stuff ?**

---

<div class="post-metadata">

**Author:** ![vvassilev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/f0a364/32.png) [@vvassilev](https://root-forum.cern.ch/u/vvassilev)\
**Post date:** [December 3, 2021, 10:32pm UTC](https://root-forum.cern.ch/t/warning-in-tinterpreter-readrootmapfile/47871/3 "2021-12-03T22:32:57Z")

</div>

ROOT scans for \*.rootmap files in all folders on the LD\_LIBRARY\_PATH (including the current folder). Then, at startup, it loads the rootmap file and builds a mapping between class name and the corresponding library. I suspect that you had the new and the old rootmaps which caused that warning. Good job in finding that subtle behavior on your own!

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [December 17, 2021, 10:33pm UTC](https://root-forum.cern.ch/t/warning-in-tinterpreter-readrootmapfile/47871/4 "2021-12-17T22:33:03Z")

</div>

Closed on December 17, 2021, 10:33pm UTC

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