Skip to content

Add util to check executables/shared libs for missing shared libs#890

Merged
climbfuji merged 8 commits intoJCSDA:developfrom
AlexanderRichert-NOAA:lddcheckutil
Dec 8, 2023
Merged

Add util to check executables/shared libs for missing shared libs#890
climbfuji merged 8 commits intoJCSDA:developfrom
AlexanderRichert-NOAA:lddcheckutil

Conversation

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Collaborator

@AlexanderRichert-NOAA AlexanderRichert-NOAA commented Dec 5, 2023

Summary

Inspired by the issue we ran into with met having a missing python dependency (rpath wasn't set), this PR adds a utility to check installations for missing shared library dependencies of libraries and executables.

Testing

Tested on Orion and in CI.

Applications affected

none

Systems affected

none

Dependencies

#884 / JCSDA/spack#371 (wait for met/python dep fix)

Issue(s) addressed

none

Checklist

  • This PR addresses one issue/problem/enhancement, or has a very good reason for not doing so.
  • These changes have been tested on the affected systems and applications.
  • All dependency PRs/issues have been resolved and this PR can be merged.

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Collaborator Author

@climbfuji if this looks useful, can you populate the Darwin block with the appropriate command(s) & output pattern (I think it'll involve otool -L and/or dyld_info -dependents but I'm not sure)? It's not urgent since we'll need to wait for the met fix anyway.

@climbfuji
Copy link
Copy Markdown
Collaborator

Thanks @AlexanderRichert-NOAA I can do the macOS part, but realistically not before the 1.6.0 release.

Copy link
Copy Markdown
Collaborator

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add documentation for this (we already have a utilities section in readthedocs)?

@AlexanderRichert-NOAA AlexanderRichert-NOAA marked this pull request as ready for review December 8, 2023 02:23
@AlexanderRichert-NOAA
Copy link
Copy Markdown
Collaborator Author

@climbfuji if you're okay with merging this as-is, it'd be nice to have this at least in the ubuntu CI before the 1.6.0 release, then we can circle back later and add macOS+CI?

Copy link
Copy Markdown
Collaborator

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created an issue to remind us about adding the macOS feature: #898

Comment thread util/ldd_check.py
bin_list = glob.glob(os.path.join(searchpath, "*/*/*/bin/*"))
dlib_list = glob.glob(os.path.join(searchpath, "*/*/*/lib*/*.{so,dylib}"))

master_list = bin_list + dlib_list
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEI! DEI! We'll rename this to something less clear but politically correct when we add the macOS feature :-)

@climbfuji climbfuji enabled auto-merge (squash) December 8, 2023 04:13
@climbfuji climbfuji merged commit 8daa0de into JCSDA:develop Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

INFRA JEDI Infrastructure NOAA-EMC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants