[MacPorts] #64138: py-cryptography@ 2.9.2_2 dlopen() symbol not found: _EVP_PKEY_size
MacPorts
noreply at macports.org
Mon Jan 3 20:46:26 UTC 2022
#64138: py-cryptography@ 2.9.2_2 dlopen() symbol not found: _EVP_PKEY_size
------------------------------+-----------------------------
Reporter: khepler | Owner: stromnov
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords: powerpc leopard
Port: py-cryptography |
------------------------------+-----------------------------
Comment (by neirbowj):
On `bigsur` `arm64` and with 2.7.1, I observed a substantially similar
traceback in `py-cryptography` (35.0.0_3) after diagnosing a problem
affecting the `ansible-vault` utility from `py-ansible`.
{{{
$ python -c "from cryptography.hazmat.backends import openssl"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 6,
in <module>
from cryptography.hazmat.backends.openssl.backend import backend
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 82,
in <module>
from cryptography.hazmat.bindings.openssl import binding
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14,
in <module>
from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError:
dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so, 2): Symbol
not found: _ERR_put_error
Referenced from:
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so
Expected in: flat namespace
in
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so
}}}
What I have managed to determine is that the proximate cause appears to be
confusion between the version of OpenSSL `py-cryptography` was built
against and which version it is being dynamically linked against. I came
up with a short shell script to demonstrate the problem, which, on my
system, affects 3.8, but not 3.7 nor 3.9.
{{{
# script
TESTCODE="from cryptography.hazmat.backends import openssl"
for i in 7 8 9; do
echo "==> 3.${i}"
port echo depof:py3${i}-cryptography | grep openssl
SITEPKG=$(python3.${i} -c "import sys;print(sys.path[-1])")
otool -L ${SITEPKG}/cryptography/hazmat/bindings/_openssl.abi3.so \
| grep -oE "openssl[0-9]+"
if python3.${i} -c "${TESTCODE}" 2> /dev/null; then
echo succeeds
else
echo fails
fi
done
}}}
{{{
# output
==> 3.7
openssl11
openssl11
openssl11
succeeds
==> 3.8
openssl11
openssl3
openssl3
fails
==> 3.9
openssl3
openssl3
openssl3
succeeds
}}}
--
Ticket URL: <https://trac.macports.org/ticket/64138#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list