Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCM file not found #9697

Closed
belmakier opened this issue Jan 25, 2022 · 6 comments · Fixed by #9911
Closed

PCM file not found #9697

belmakier opened this issue Jan 25, 2022 · 6 comments · Fixed by #9911

Comments

@belmakier
Copy link
Contributor

belmakier commented Jan 25, 2022

[x] Checked for duplicates

Describe the bug

Error message

Error in <TCling::LoadPCM>: ROOT PCM <root_build_directory/bin/library_rdict.pcm> file does not exist

is printed when a dynamic library is loaded in the ROOT prompt, even when the appropriate *_rdict.pcm file exists in the same directory as the library.

Expected behavior

ROOT should search both the $LD_LIBRARY_PATH and the directory where the library is located for the *_rdict.pcm file.

To Reproduce

Load a dynamic library with
gROOT->ProcessLine(".L path_to_library.dylib")
or equivalent

Setup

  1. ROOT 6.27/01
  2. macOS 11.4
  3. built from source
@belmakier
Copy link
Contributor Author

As far as I can tell, this is related to the following snippet from here.

  // Handle path list items
  for (auto item : p) {
    if (item.startswith(".")) {
      if (item == "..") {
        size_t s = result.rfind(sep);
        if (s != llvm::StringRef::npos) result.resize(s);
        if (result.empty()) result = sep;
      }
      continue;  
    } else if (item == "~") {
      continue;
    }

The absolute path to my library contains a hidden file ($HOME/.local), so when the path is iterated through it skips over any directory starting with a period character. If I remove the first continue statement above, it seems to work fine.

Tim

@Axel-Naumann
Copy link
Member

Wow, well done, Tim, thanks so much for your help with debugging this! I'll check what this code is meant to do.

Axel-Naumann added a commit to Axel-Naumann/root that referenced this issue Feb 16, 2022
path elements starting with "." should not be ignored, only "./" itself.
Fixes issue root-project#9697.
@Axel-Naumann
Copy link
Member

That's #9911 !

Axel-Naumann added a commit that referenced this issue Feb 17, 2022
path elements starting with "." should not be ignored, only "./" itself.
Fixes issue #9697.
@Axel-Naumann
Copy link
Member

Merged, thanks for reporting. Do you need this in the upcoming 6.26 or in 6.24, or is it enough to fix this in master and the future 6.28?

@belmakier
Copy link
Contributor Author

It's not urgent, I can wait for 6.28. Thanks!

@Axel-Naumann Axel-Naumann linked a pull request Feb 18, 2022 that will close this issue
@Axel-Naumann
Copy link
Member

Thanks!

Axel-Naumann added a commit to Axel-Naumann/root that referenced this issue Mar 8, 2022
path elements starting with "." should not be ignored, only "./" itself.
Fixes issue root-project#9697.

(cherry picked from commit 37a396c)
Axel-Naumann added a commit that referenced this issue Mar 8, 2022
path elements starting with "." should not be ignored, only "./" itself.
Fixes issue #9697.

(cherry picked from commit 37a396c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants