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

Add util to check executables/shared libs for missing shared libs for macOS -> no, support on Linux only #898

Closed
climbfuji opened this issue Dec 8, 2023 · 4 comments · Fixed by #1022
Assignees
Labels
INFRA JEDI Infrastructure

Comments

@climbfuji
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
PR #890 adds a utility to check executables/shared libs for missing shared libraries for Linux. The macOS part still needs to be done post spack-stack 1.6.0

@climbfuji
Copy link
Collaborator Author

@AlexanderRichert-NOAA I suggest we don't try to implement this for macOS. There's no clean and easy way. You can either have full paths to libraries or "rpath-ed" libraries, but the output of otool is not going to tell you if a shared library can be found or not (unlike Linux). You would have to spend quite some time on the ldd_check.py utility to

  • check for each linked library with an absolute path if it exists
  • collect all rpaths stored in the dylib library
  • then loop over all rpaths for each library that is linked as @rpath/mylibrary.dylab and check if it can be found in any of these locations

Given that I haven't used the utility at all, I feel like this is too much effort. I will update the tool and the documentation to make clear this only works on Linux, and send it your way to review if that's ok.

@climbfuji
Copy link
Collaborator Author

See commit 815cd37

@climbfuji climbfuji moved this from Todo to In Progress in spack-stack-1.7.0 (2024 Q1) Mar 8, 2024
@climbfuji climbfuji changed the title Add util to check executables/shared libs for missing shared libs for macOS Add util to check executables/shared libs for missing shared libs for macOS -> no, support on Linux only Mar 8, 2024
@AlexanderRichert-NOAA
Copy link
Collaborator

That sounds good. The precipitating issue was one that involved a missing dependency in a recipe (which will apply regardless of platform), plus arguably it's mostly important to catch these things in our tier-1 platform installations, so I have no objection to making it Linux only.

@climbfuji
Copy link
Collaborator Author

Thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INFRA JEDI Infrastructure
Projects
No open projects
2 participants