LD_LIBRARY_PATH is ignored


I recently updated root to 6.20 from 6.18, and now I cannot load anymore my shared libraries, because LD_LIBRARY_PATH is ignored by root.
echo $LD_LIBRARY_PATH correctly returns my list of paths where I have shared libraries, while with root I get this:

root [0] gSystem->GetDynamicPath()
(const char *) "~/programs/root6/install/lib/root:.:~/programs/root6/install/lib/root:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/tls/x86_64:/lib/tls:/lib/x86_64:/lib:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/x86_64:/usr/lib"
root [1] getenv("LD_LIBRARY_PATH")
(char *) "~/programs/root6/install/lib/root"

which is not the content of my LD_LIBRARY_PATH.
This happens only for LD_LIBRARY_PATH: any other environment variable is ok.

On the same system I also have an old root 5.34, for which getenv("LD_LIBRARY_PATH") returns the correct paths.
I don’t have anymore root 6.18 on my system, but if I try the same with the 6.18 version on lxplus I also get the correct paths.

Passing the full path to the libraries does not solve my problem, because some libraries depend on others:

root [0] .L build/linuxx8664gcc/root6/lib/libdebug.so 
root [1] .L build/linuxx8664gcc/root6/lib/libDateTimeTools.so 
cling::DynamicLibraryManager::loadLibrary(): libdebug.so: cannot open shared object file: No such file or directory

Any suggestions?


ROOT Version: 6.20
Platform: Ubuntu 16.04
Compiler: gcc

1 Like

Between 6.18 and 6.20, C++ modules become default for ROOT, and there was a lot changes in preloading libraries and modules routine. I suspect that it is related… @vvassilev can you take a look here please?

See this comment, might be the cause.

Could you please open a JIRA ticket? I think amadio’s comment might be pointing to the cause of this regression.

Ouch, apologies for overlooking your comment, @amadio ! No need for a ticket, I’ll fix it, for master and v6.20/02.


1 Like

Should be fixed in https://github.com/root-project/root/pull/5145

Ok, thanks!
As far as I understand, the patch is still not available on git, right?

It is now! Sorry for the wait.

I updated to 6.20/02 today, and can confirm that it works.
Thanks for the quick fix!

1 Like

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