# gSystem-\>Load problem pcm files not found

**URL:** <https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306>\
**Category:** ROOT\
**Created:** [May 7, 2020, 6:00pm UTC](https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306 "2020-05-07T18:00:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javier\_Galan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/javier_galan/32/29662_2.png) [@Javier\_Galan](https://root-forum.cern.ch/u/Javier_Galan)\
**Post date:** [May 7, 2020, 6:00pm UTC](https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306/1 "2020-05-07T18:00:15Z")

</div>

_ROOT Version:_ 6.20/00  
_Platform:_ Linux  
_Compiler:_ The CXX compiler identification is GNU 6.3.0

* * *

Hi, I have the following problem.

We keep working with the same CMakeLists since a long time, using it to compile a ROOT-based library.

For reasons I dont understand we get now some error message when loading the library in the ROOT command line.

```auto
gSystem->Load("myLibrary.so");

```

and I get the following message output

```auto
Error in <TCling::LoadPCM>: ROOT PCM /MY_SOURCE_DIR/build/CINT_mpreal_rdict.pcm file does not exist
Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /programas/root/root-6.20/lib/libASImageGui_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /programas/root/root-6.20/lib/libASImage_rdict.pcm

```

where `MY_SOURCE_DIR` is the project directory.

It seems that when I load the library it is looking for the `CINT_mpreal_rdict.pcm` file at the `/build/` directory. This file is generated in the make process, but it is placed at `/build/rootdict`.

This pcm files are also at the installation target `/path/to/installation/lib/`.

**So, here it is the question. How do I link the .so library so that it looks for the CINT\_xxx.pcm files in the right path, at `/path/to/installation/lib/?**

Thanks!

---

<div class="post-metadata">

**Author:** ![Javier\_Galan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/javier_galan/32/29662_2.png) [@Javier\_Galan](https://root-forum.cern.ch/u/Javier_Galan)\
**Post date:** [May 7, 2020, 7:37pm UTC](https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306/2 "2020-05-07T19:37:47Z")

</div>

I have seen that there is a related problem here:

> [@Cannot find my rdict.pcm files](https://root-forum.cern.ch/t/cannot-find-my-rdict-pcm-files/21901/6):
>
> Hi, As Danilo said. The idea is that it’s next to the library. We simply have not thought about providing anything special for binaries. We are discussing what we can do here; I understand that this is especially awkward when all you have is a binary… Cheers, Axel.

An answer says `rdict.pcm` files are searched at `LD_LIBRARY_PATH`. Those files exist at my `/path/to/installation/lib/` a path that is also present at `LD_LIBRARY_PATH`.

So, why when I load my libraries in ROOT it tries to search at `SOURCE_DIR/build/` directory?

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [May 11, 2020, 9:36am UTC](https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306/3 "2020-05-11T09:36:48Z")

</div>

Let’s see whether @vvassilev can help here!

---

<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:** [May 12, 2020, 10:32am UTC](https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306/4 "2020-05-12T10:32:22Z")

</div>

We have changed the way we discover the rdict.pcm files to improve consistency between files and libraries. The rdict.pcm file needs to be next to the .so file (either physically or by a symlink). If you `export ROOTDEBUG=7` and run the failing command you will see which library was loaded from which folder and where the rdict.pcm file should be.

---

<div class="post-metadata">

**Author:** ![Javier\_Galan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/javier_galan/32/29662_2.png) [@Javier\_Galan](https://root-forum.cern.ch/u/Javier_Galan)\
**Post date:** [May 12, 2020, 4:07pm UTC](https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306/5 "2020-05-12T16:07:34Z")

</div>

> [@vvassilev](#):
>
> The rdict.pcm file needs to be next to the .so file

Yes, I believe that is our case, we place everything at a common path `/path/to/installation/lib`.

But, I think I found something interesting while trying to get all the output you mentioned.

I have realised just now that it only happens when I launch root from my build directory.

I usually compile and then test the library loading it from the `build`.

If I change directory problem solved! The messages go away!

I think I can live with that, but I have a related problem that I dont know if I should post in another topic.

If I remove my source directory `MY_SOURCE_PATH`, it complains that it does not find the headers. But they have been installed at `/path/to/installation/include/`. So why when I load my libraries it is searching at my source directory and not at my installation directory?

```auto
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for /MY_SPOURCE_PATH/source/processes/general/inc/TRestHitsShuffleProcess.h
   requested to autoload type TRestHitsShuffleProcess

```

I tried adding `/path/to/installation/include/` to `ROOT_INCLUDE_PATH` but it didn’t solve the problem.

This is not good if someone has no access rights to the source directory, but he does to the installation path.

Thanks!

---

<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:** [May 20, 2020, 8:00am UTC](https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306/6 "2020-05-20T08:00:24Z")

</div>

Can you open a bug report for that?

---

<div class="post-metadata">

**Author:** ![Javier\_Galan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/javier_galan/32/29662_2.png) [@Javier\_Galan](https://root-forum.cern.ch/u/Javier_Galan)\
**Post date:** [May 20, 2020, 8:33am UTC](https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306/7 "2020-05-20T08:33:21Z")

</div>

Ok, reporting bugs is something new to me. I ended up in the following site:

[https://root.cern.ch/bug-reports](https://root.cern.ch/bug-reports)

That shows the following information.

```auto
If you are new to using JIRA, you might want to read the ROOT [Bug Tracker](https://root.cern.ch/drupal/content/bug-tracker) page first.

[Report a bug in VMC packages.](https://sft.its.cern.ch/jira/browse/VMC)

```

The [Bug Tracker] link is broken.

 ![Screenshot 2020-05-20 at 10.06.43](https://root-forum.cern.ch/uploads/default/original/3X/8/1/81893d76d28d76b8a4f1860512b904189d95243e.png)

The following page was ok.

[https://root.cern.ch/guidelines-submitting-bug](https://root.cern.ch/guidelines-submitting-bug)

I have created the bug report at  
[https://sft.its.cern.ch/jira/browse/ROOT-10785](https://sft.its.cern.ch/jira/browse/ROOT-10785)

---

<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:** [June 3, 2020, 8:33am UTC](https://root-forum.cern.ch/t/gsystem-load-problem-pcm-files-not-found/39306/8 "2020-06-03T08:33:21Z")

</div>

Closed on June 3, 2020, 8:33am UTC

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