Add EasyBlock for cryptography to fix missing -pthread for all versions#1874
Add EasyBlock for cryptography to fix missing -pthread for all versions#1874boegel merged 2 commits intoeasybuilders:developfrom
Conversation
|
@boegel I created an upstream PR which is likely to be accepted and fix the issue: pyca/cryptography#5086 As this is a blocker for TensorFlow on Power I'd like a decision here:
|
|
I don't mind adding a custom easyblock for If your patch is indeed fixed upstream we can make this fix conditional so it's only done for older versions. Why hasn't this popped up for others yet though, that surprises me a bit... The problem doesn't look specific to POWER at all? |
boegel
left a comment
There was a problem hiding this comment.
@Flamefire Does it also make sense to run python -c "from cryptography.hazmat.bindings._openssl import lib" as a custom sanity check command, since we know that triggers the problem being fixed here?
See my comment easybuilders/easybuild-easyconfigs#9446 (comment). The TL&DR is: On (e.g.) Power Additionally this specific extension doesn't seem to be used that often and an import check did not find it until a change in another module exposed it.
I'm waiting for it to be merged. Note that my patch is slightly different there: Here I use |
Flamefire
left a comment
There was a problem hiding this comment.
Does it also make sense to run python -c "from cryptography.hazmat.bindings._openssl import lib" as a custom sanity check command, since we know that triggers the problem being fixed here?
Done, good idea 👍
|
@Flamefire Should we put this on hold until the upstream fix is merged so we can add the version condition? |
|
I wouldn't wait (to long). This does not conflict with a potentially fixed upstream so a later added version check does not hurt. Up to you. |
|
Is this sufficient to make the vanilla If so, can you upload a test report and share it here? |
|
Yes. Will do on monday |
|
pyca/cryptography#5086 has been merged, so the next release will hopefully contain this fix |
|
Tested this with several |
This fixes easybuilders/easybuild-easyconfigs#9446 for all versions of cryptography as all suffer from the same issue. See pyca/cryptography#5084
The approach was taken from https://github.com/bear-rsg/easybuild-easyconfigs/blob/2019b/easybuild/easyconfigs/p/Python/Python-3.7.4-GCCcore-8.3.0.eb#L119
The alternative would be to go and fix every single EC installing the package to add this to the preinstallopts.
Note also that I'm adding
-pthreadas opposed to-lpthreadbecause the former a) is independent of the position in the command line and b) may add other compile definitions as required. Cursory check seems to verify that all used compilers support this flag: clang, gcc, icc, pgcc (at least via patch)