gSystem->Load problem pcm files not found

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.

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

and I get the following message output

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!

1 Like

I have seen that there is a related problem here:

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?

Let’s see whether @vvassilev can help here!

2 Likes

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.

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?

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!

Can you open a bug report for that?

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

https://root.cern.ch/bug-reports

That shows the following information.

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.

The following page was ok.

https://root.cern.ch/guidelines-submitting-bug

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

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