save mfem's tpl rpath info by transforming -Xlinker items to -Wl - #1968
Open
chapman39 wants to merge 4 commits into
Open
save mfem's tpl rpath info by transforming -Xlinker items to -Wl#1968chapman39 wants to merge 4 commits into
chapman39 wants to merge 4 commits into
Conversation
chapman39
requested review from
kennyweiss and
white238
and
a lite review from Copilot
August 27, 2026 23:54
Contributor
Author
|
does this warrant a release notes update? |
There was a problem hiding this comment.
Pull request overview
This PR updates Axom’s MFEM CMake discovery logic to preserve MFEM third-party (TPL) rpath/linker flags that were previously being dropped, addressing runtime loader failures (e.g., missing libstrumpack.so).
Changes:
- Stops filtering out
-Xlinker-related link flags from MFEM’sconfig.mkparsing. - Attempts to transform
-Xlinkerrpath flags into-Wl,...form so the rpath is retained for shared TPLs.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
116
to
+120
| set(_mfem_tpl_list ${mfem_tpl_lnk_flags}) | ||
| separate_arguments(_mfem_tpl_list) | ||
| list(FILTER _mfem_tpl_list EXCLUDE REGEX Xlinker) | ||
| list(JOIN _mfem_tpl_list " " mfem_tpl_lnk_flags) | ||
| list(TRANSFORM _mfem_tpl_list | ||
| REPLACE "^-Xlinker=-rpath,(.*)$" "-Wl,-rpath,\\1") | ||
| set(mfem_tpl_lnk_flags ${_mfem_tpl_list}) |
Contributor
Author
There was a problem hiding this comment.
yeah but mfem doesnt.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the following error:
The issue is that in
FindMFEM, the rpath information was being filtered out. But, if a tpl is shared, we still need that rpath. So, transform -Xlinker into -Wl.This was tested on rzvector using a custom host config where strumpack was built as a shared library.
We might need to check if using clang or gcc compiler before performing the transformation but I'm not sure.