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

Deal with shared lib file not found failures due to OS file extension mismatch #430

Merged
merged 2 commits into from
Aug 4, 2022

Conversation

mattw-nws
Copy link
Contributor

@mattw-nws mattw-nws commented Aug 2, 2022

Causes AbstractCLibBmiAdapter.hpp to add the appropriate extension if missing (.so or .dylib) or try the alternative extension, for a library_file if the path provided was not readable. This lets us collapse at least some places in tests that require multiple files/code just to get around this OS difference.

Additions

  • Fallback handler in AbstractCLibBmiAdapter.hpp

Removals

Changes

  • Removed use of __macos realization file from Run surfacebmi plus cfebmi test... does not delete this realization file... should we?

Testing

  1. Test Run surfacebmi plus cfebmi now uses the Linux realization file (with .so extensionless path to dylib file) on macOS and Linux tests and succeeds.

Screenshots

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist (automated report can be put here)

Target Environment support

  • Linux

@mattw-nws mattw-nws marked this pull request as ready for review August 2, 2022 21:03
#ifdef __APPLE__
alt_bmi_lib_file = bmi_lib_file + ".dylib";
#else
#ifdef __GNUC__
Copy link
Contributor

Choose a reason for hiding this comment

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

It is possible that windows compiling with Cygwin or mingw could get here. Would it be worth checking for and warning that Windows is not currently supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly... I have a feeling it wouldn't get that far. Maybe we should consider this: https://github.com/cygwin/cygwin-install-action ... someday.

@mattw-nws mattw-nws merged commit f64ffd3 into NOAA-OWP:master Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants