-
Notifications
You must be signed in to change notification settings - Fork 302
add support to Python easyblock for conditionally adding patches when EasyBuild is configured to filter $LD_LIBRARY_PATH
#3860
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
base: develop
Are you sure you want to change the base?
Conversation
…iltering LD_LIBRARY_PATH
…e the patch isn't fetched
Co-authored-by: ocaisa <alan.ocais@cecam.org>
Code style check still fails:
|
@boegelbot please test @ jsc-zen3 |
@casparvl: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de PR test command '
Test results coming soon (I hope)... - notification for comment with ID 3228197327 processed Message to humans: this is just bookkeeping information for me, |
Test report by @casparvl Overview of tested easyconfigs (in order)
Build succeeded for 3 out of 3 (3 easyconfigs in total) Edit: note that these were all without the changes from easybuilders/easybuild-easyconfigs#23499 i.e. just to prove that this PR doesn't change any existing behavior and still works when EB is NOT configured to filter |
Test report by @boegelbot Overview of tested easyconfigs (in order)
Build succeeded for 3 out of 3 (3 easyconfigs in total) |
$LD_LIBRARY_PATH
…s_ld_library_path. use self.cfg.get. Also check for not filtering LIBRARY_PATH. Make sure to update the rest of the code for these name changes (and the fact that patch_ctypes_ld_library_path is now the name of a single patch fle, not a list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remark by @boegel is that we should have a sanity check that checks if the patch was applied, or more specifically, that the behavior is now correct. Since system libraries are system-specific, the only thing we can do is check if a library on LIBRARY_PATH
is found correctly. E.g. we could try to load libpython3.so
through a CDLL
and a LoadLibrary
call, and even call a find_library
on it for good measure.
… to verify that the patch has been applied correctly when EasyBuild is configured to filter LD_LIBRARY_PATH
if ( | ||
'LD_LIBRARY_PATH' in filtered_env_vars and | ||
'LIBRARY_PATH' not in filtered_env_vars and | ||
patch_ctypes_ld_library_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove the condition that a patch is applied? In other words: should we allow a user to build with filtered LD_LIBRARY_PATH
but without the patch? (currently, that is allowed, the user will just receive a warning from the elif
on line 397
Ok, sanity check seems to work as intended. Using the patch from easybuilders/easybuild-easyconfigs#23499 I get a successful sanity check, with this in the debugging output:
If I use a dummy patch that just inserts some comments, I get:
|
@boegelbot please test @ jsc-zen3 |
@casparvl: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de PR test command '
Test results coming soon (I hope)... - notification for comment with ID 3407980100 processed Message to humans: this is just bookkeeping information for me, |
Test report by @boegelbot Overview of tested easyconfigs (in order)
Build succeeded for 2 out of 3 (3 easyconfigs in total) |
3.11.5 failed because I was rebuilding that in easybuilders/easybuild-easyconfigs#23499 as well, so lock file existed. Trying again for good measure... @boegelbot please test @ jsc-zen3 |
@casparvl: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de PR test command '
Test results coming soon (I hope)... - notification for comment with ID 3408456358 processed Message to humans: this is just bookkeeping information for me, |
Test report by @boegelbot Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
This change introduces extra easyblock-specific configuration items. They allow us to define patches that should be applied conditionally if EasyBuild is configured to filter
LD_LIBRARY_PATH
. Since these patches (see Should be used together with: easybuilders/easybuild-easyconfigs#23499) are quite fundamental (changectypes
functions) we prefer them to only be applied in the scenario where they are really needed.Replaces: #3798
Should be used together with: easybuilders/easybuild-easyconfigs#23499
edit: relevant EESSI support issue: https://gitlab.com/eessi/support/-/issues/154