[
https://issues.apache.org/jira/browse/PROTON-2518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17507218#comment-17507218
]
Andrew Stitcher commented on PROTON-2518:
-----------------------------------------
I'm failing to replicate this with a vagrant based Centos7 environment:
Commands:
{noformat}
$ sudo yum install python3 python3-devel python3-pip
...
$ python3 -m venv xxx
...
$ . xxx/bin/activate
(xxx) $ pip install python-qpid-proton
(xxx) $ python
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import proton
>>> proton.VERSION
(0, 36, 0)
>>>
{noformat}
The active version of libssl in this environment is 1.0.2k:
{noformat}
(xxx) $ ls -l /usr/lib64/libssl*
-rwxr-xr-x. 1 root root 412984 Dec 3 17:57 /usr/lib64/libssl3.so
lrwxrwxrwx. 1 root root 16 Mar 15 19:34 /usr/lib64/libssl.so ->
libssl.so.1.0.2k
lrwxrwxrwx. 1 root root 16 Mar 15 19:33 /usr/lib64/libssl.so.10 ->
libssl.so.1.0.2k
-rwxr-xr-x. 1 root root 470328 Jan 18 13:56 /usr/lib64/libssl.so.1.0.2k
(xxx) $ ls -l /usr/lib64/libcrypto.so*
lrwxrwxrwx. 1 root root 19 Mar 15 19:34 /usr/lib64/libcrypto.so ->
libcrypto.so.1.0.2k
lrwxrwxrwx. 1 root root 19 Mar 15 19:33 /usr/lib64/libcrypto.so.10 ->
libcrypto.so.1.0.2k
-rwxr-xr-x. 1 root root 2520744 Jan 18 13:56 /usr/lib64/libcrypto.so.1.0.2k
(xxx) $
{noformat}
and the relevant libraries linked with the installed version of _cproton.so is:
{noformat}
(xxx) $ ldd
xxx/lib64/python3.6/site-packages/_cproton.cpython-36m-x86_64-linux-gnu.so
...
libssl.so.10 => /lib64/libssl.so.10 (0x00007f89ee18d000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f89edd2a000)
libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007f89edb0d000)
libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f89ed5e5000)
...
(xxx) $
{noformat}
My guess is (as [~jdanek] indicated) you have the -devel package for libssl3 or
maybe libssl1.1 which has made the python package install confused and linked
the wrong shared objects for the header files. If this is the case it will be
fixed with proton 0.37 which is just about to be released.
It would help to confirm this diagnosis if you could post the results of ldd
against the _cproton.so that is failing.
> Installing Python bindings via pip in a venv causes an ImportError
> ------------------------------------------------------------------
>
> Key: PROTON-2518
> URL: https://issues.apache.org/jira/browse/PROTON-2518
> Project: Qpid Proton
> Issue Type: Bug
> Components: python-binding
> Affects Versions: proton-c-0.36.0
> Environment: CentOS 7
> Python 3.8.12 (Anaconda 4.11.0)
> Using a standard venv within that. That is I created a python virtual
> environment inside an anaconda environment. (Not my choice but if it makes a
> difference I've run into the same issue without it)
> Reporter: Paul Banks
> Priority: Major
>
> When attempting to use the Qpid Proton libraries by installing the
> `python-qpid-proton` package in pip an ImportError appears related to the
> _cproton shared object.
> I was able to recreate it with a python 3.6.8 virtual environment. The error
> is the same in my python 3.8.12 environment. I am attempting to run one of
> the provided examples.
> {code:java}
> Traceback (most recent call last):
> File
> "/export/home/pbanks/Downloads/qpid-proton-0.36.0/python/examples/simple_recv.py",
> line 22, in <module>
> from proton.handlers import MessagingHandler
> File
> "/export/home/pbanks/anaconda3/envs/testEnviron/lib/python3.6/site-packages/proton/__init__.py",
> line 35, in <module>
> from cproton import PN_VERSION_MAJOR, PN_VERSION_MINOR, PN_VERSION_POINT
> File
> "/export/home/pbanks/anaconda3/envs/testEnviron/lib/python3.6/site-packages/cproton.py",
> line 15, in <module>
> import _cproton
> ImportError:
> /export/home/pbanks/anaconda3/envs/testEnviron/lib/python3.6/site-packages/_cproton.cpython-36m-x86_64-linux-gnu.so:
> undefined symbol: CRYPTO_set_locking_callback{code}
> Normally in CentOS7 I would use the Fedora provided yum package
> `python36-qpid-proton` as that works without issue.
> My current workaround is to replace the shared object provided by the pip
> package with the yum package.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]