# Make install and search for headers

**URL:** <https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398>\
**Category:** Newbie\
**Created:** [December 5, 2024, 1:01pm UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398 "2024-12-05T13:01:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![YannickPatois](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yannickpatois/32/33076_2.png) [@YannickPatois](https://root-forum.cern.ch/u/YannickPatois)\
**Post date:** [December 5, 2024, 1:01pm UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398/1 "2024-12-05T13:01:37Z")

</div>

Hi,

It seems I’m doing something wrong with the installation of custom ROOT libs, but I can’t se where and why.

I made a small example one can find here:

> **[GitHub - YPatois/root\_test: A simple test](https://github.com/YPatois/root_test)**
>
> A simple test

```auto
git clone https://github.com/YPatois/root_test.git
cd root_test
./test1.sh

```

The small test1.sh scripts do (assuming root has been configured):

- Compile a small “unTest.so” lib b(under pwd/build), and install it (under pwd/local")
- Run the test1.C script, that just load that lib once (it works)
- Erase the _source_ .h file (not the installed ones)
- Run again test1.C and one (and only one) of the .h file is not found (it’s only looked for at source location, the other being rightly find at install location).

I don’t understand that behavior. The only thing that I could see is that the source file location is hardcoded in the pcm file, which is not very useful, as they are then installed, and may be where that incorrect patrh is taken from (but then why only for one file?).

Could someone enlighten me?

Thanks.

_ROOT Version:_ 6.32.04  
_Platform:_ Alma9  
_Compiler:_ g++ (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)

---

<div class="post-metadata">

**Author:** ![mczurylo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mczurylo/32/33269_2.png) [@mczurylo](https://root-forum.cern.ch/u/mczurylo)\
**Post date:** [December 6, 2024, 8:59am UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398/2 "2024-12-06T08:59:11Z")

</div>

Hi @YannickPatois,

thank you for the reproducer and explanation. Maybe @bellenot could help here?

Cheers,  
Marta

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [December 6, 2024, 9:07am UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398/3 "2024-12-06T09:07:08Z")

</div>

No idea, but I’ll try to figure it out, or find someone who knows…

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [December 6, 2024, 9:18am UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398/4 "2024-12-06T09:18:19Z")

</div>

Looking at this error message:

```auto
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
   Missing FileEntry for /home/ubuntu/rootdev/forum/YannickPatois/root_test/TTAB.h
   requested to autoload type TTMAB

```

I guess maybe @vvassilev can help?

---

<div class="post-metadata">

**Author:** ![YannickPatois](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yannickpatois/32/33076_2.png) [@YannickPatois](https://root-forum.cern.ch/u/YannickPatois)\
**Post date:** [November 26, 2025, 2:32pm UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398/5 "2025-11-26T14:32:05Z")

</div>

I’m back on that topic after a year, but still no solution.  
How does one compile, link and install a root based software?  
I looked again in the doc, or elsewhere, I couldn’t find anything.  
As one can see from my little example, “make install” is not producing a working app.  
What do I miss?  
Thanks.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [November 26, 2025, 2:34pm UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398/6 "2025-11-26T14:34:04Z")

</div>

I ping @vvassilev like @bellenot did last year.

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [November 26, 2025, 3:59pm UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398/7 "2025-11-26T15:59:24Z")

</div>

Side note:

This will not solve your problem, but consider modernizing a bit your CMakeLists following: [https://github.com/user-attachments/files/22621538/zdt.zip](https://github.com/user-attachments/files/22621538/zdt.zip)

or [ROOT — Modern CMake](https://cliutils.gitlab.io/modern-cmake/chapters/packages/ROOT.html)

you can use target\_link\_libraries ROOT::MyComponent instead ${ROOT\_LIBRARIES}

If you want to improve things even more, take a look at using CMake FILE\_SETs

see [CMake File sets (#52) · Issues · CLIUtils / Modern CMake · GitLab](https://gitlab.com/CLIUtils/modern-cmake/-/issues/52)

then you can easily control where your header destination goes installed into.

---

<div class="post-metadata">

**Author:** ![YannickPatois](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yannickpatois/32/33076_2.png) [@YannickPatois](https://root-forum.cern.ch/u/YannickPatois)\
**Post date:** [November 27, 2025, 9:21am UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398/8 "2025-11-27T09:21:58Z")

</div>

Hi,  
I updated my CMakeLists.txt according to the example given, and now it works!

Thanks a lot!

Yannick

PS:

- Git code is updated (and should work)
- Still a question: are ROOT macros not able to take care of install path and generated PCM and rootmap?  
Thanks.

---

<div class="post-metadata">

**Author:** ![YannickPatois](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yannickpatois/32/33076_2.png) [@YannickPatois](https://root-forum.cern.ch/u/YannickPatois)\
**Post date:** [November 28, 2025, 8:29am UTC](https://root-forum.cern.ch/t/make-install-and-search-for-headers/62398/9 "2025-11-28T08:29:05Z")

</div>

Hi,

I finally found out: the ROOT macros misbehaves on GLOB() directives, but it’s clearly illustrated on the latest version of my github code.  
Replacing GLOB() by the list makes it work.
