Skip to content

NA: Use relative path for NA plugin search #789

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

Merged
merged 1 commit into from
Apr 17, 2025

Conversation

jolivier23
Copy link
Contributor

Calculate relative path at build time and use it at runtime to find the plugin directory

Copy link

github-actions bot commented Apr 17, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@jolivier23
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@jolivier23 jolivier23 force-pushed the master branch 3 times, most recently from 883a833 to 8f30b7b Compare April 17, 2025 05:29
Copy link
Member

@soumagne soumagne left a comment

Choose a reason for hiding this comment

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

just a few comments but looks good to me otherwise, thanks!

@soumagne
Copy link
Member

See also this warning from the CI: https://cdash.mercury.daos.io/viewBuildError.php?type=1&buildid=2910

/home/runner/work/mercury/mercury/src/na/na.c: In function 'resolve_plugin_path':
[CTest: warning matched] /home/runner/work/mercury/mercury[na/na.c:279](https://github.com/mercury-hpc/mercury/blob/8f30b7be1d8fd6b0bf99c2f572dc9b277661c44b/na/na.c#L279):17: warning: ISO C forbids passing argument 1 of 'dladdr' between function pointer and 'void *' [-Wpedantic]
  279 |     if (!dladdr(resolve_plugin_path, &info)) {
      |                 ^~~~~~~~~~~~~~~~~~~
In file included from /home/runner/work/mercury/mercury[util/mercury_dl.h:18](https://github.com/mercury-hpc/mercury/blob/8f30b7be1d8fd6b0bf99c2f572dc9b277661c44b/util/mercury_dl.h#L18),
                 from /home/runner/work/mercury/mercury[na/na.c:19](https://github.com/mercury-hpc/mercury/blob/8f30b7be1d8fd6b0bf99c2f572dc9b277661c44b/na/na.c#L19):
[CTest: warning matched] [include/dlfcn.h:98](https://github.com/mercury-hpc/mercury/blob/8f30b7be1d8fd6b0bf99c2f572dc9b277661c44b/include/dlfcn.h#L98):32: note: expected 'const void *' but argument is of type 'char * (*)(const char *)'
   98 | extern int dladdr (const void *__address, Dl_info *__info)
      |                    ~~~~~~~~~~~~^~~~~~~~~

@jolivier23
Copy link
Contributor Author

See also this warning from the CI: https://cdash.mercury.daos.io/viewBuildError.php?type=1&buildid=2910

/home/runner/work/mercury/mercury/src/na/na.c: In function 'resolve_plugin_path':
[CTest: warning matched] /home/runner/work/mercury/mercury[na/na.c:279](https://github.com/mercury-hpc/mercury/blob/8f30b7be1d8fd6b0bf99c2f572dc9b277661c44b/na/na.c#L279):17: warning: ISO C forbids passing argument 1 of 'dladdr' between function pointer and 'void *' [-Wpedantic]
  279 |     if (!dladdr(resolve_plugin_path, &info)) {
      |                 ^~~~~~~~~~~~~~~~~~~
In file included from /home/runner/work/mercury/mercury[util/mercury_dl.h:18](https://github.com/mercury-hpc/mercury/blob/8f30b7be1d8fd6b0bf99c2f572dc9b277661c44b/util/mercury_dl.h#L18),
                 from /home/runner/work/mercury/mercury[na/na.c:19](https://github.com/mercury-hpc/mercury/blob/8f30b7be1d8fd6b0bf99c2f572dc9b277661c44b/na/na.c#L19):
[CTest: warning matched] [include/dlfcn.h:98](https://github.com/mercury-hpc/mercury/blob/8f30b7be1d8fd6b0bf99c2f572dc9b277661c44b/include/dlfcn.h#L98):32: note: expected 'const void *' but argument is of type 'char * (*)(const char *)'
   98 | extern int dladdr (const void *__address, Dl_info *__info)
      |                    ~~~~~~~~~~~~^~~~~~~~~

hopefully it's fixed with the cast

@jolivier23 jolivier23 requested a review from soumagne April 17, 2025 17:18
Calculate relative path at build time and use it at runtime to find the
plugin directory

Signed-off-by: Jeff Olivier <[email protected]>
@soumagne soumagne merged commit 56d00a8 into mercury-hpc:master Apr 17, 2025
21 of 22 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants