This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1312586 - dependencies missing for python app requiring python-qpid-proton
dependencies missing for python app requiring python-qpid-proton
Status: CLOSED DUPLICATE of bug 1312590
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Rodolfo Carvalho
Wenjing Zheng
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-27 10:47 EST by Matthew Farrellee
Modified: 2016-03-02 11:48 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-02 09:37:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Farrellee 2016-02-27 10:47:22 EST
Description of problem:

the python-qpid-proton python package requires building proton-c, which requires cyrus-sasl-devel for sasl/sasl.h (at least)

sasl/sasl.h is not present in registry.access.redhat.com/openshift3/python-33-rhel7:latest (7c1f4a1a03e5) image


Version-Release number of selected component (if applicable):

oc v3.1.0.4-5-gebe80f5
kubernetes v1.1.0-origin-1107-g4c8e6f4
openshift3/python-33-rhel7 (sha 7c1f4a1a03e5)


How reproducible:

100%


Steps to Reproduce:
1. create a build for a python app w/ python-qpid-proton in the requirements.txt

or

1. docker run -it openshift3/python-33-rhel7 pip install python-qpid-proton


Actual results:

...
    cc -c /tmp/sasl_client_done3hyhld.c -o build/temp.linux-x86_64-3.3/tmp/sasl_client_done3hyhld.o
    /tmp/sasl_client_done3hyhld.c:1:23: fatal error: sasl/sasl.h: No such file or directory
     #include "sasl/sasl.h"
...
[many errors from decover.c, e.g.
    /tmp/pip-build-8fnu29/python-qpid-proton/build/bundled/qpid-proton/proton-c/src/codec/decoder.c: In function 'pn_code2type':
    /tmp/pip-build-8fnu29/python-qpid-proton/build/bundled/qpid-proton/proton-c/src/codec/decoder.c:122:8: error: 'PNE_DESCRIPTOR' undeclared (first use in this function)
       case PNE_DESCRIPTOR:
            ^]
Comment 1 Cesar Wong 2016-02-29 14:41:52 EST
Rodolfo, sending this one your way. Not sure if it belongs with the SCL team.
Comment 2 Rodolfo Carvalho 2016-03-01 04:36:09 EST
I can reproduce the problem:

----------------------------------------------------------------
$ docker run --rm -it --user root openshift/python-33-centos7 bash
bash-4.2# pip install python-qpid-proton
Downloading/unpacking python-qpid-proton
  Downloading python-qpid-proton-0.12.0.tar.gz (157kB): 157kB downloaded
  Running setup.py (path:/tmp/pip_build_root/python-qpid-proton/setup.py) egg_info for package python-qpid-proton
    
Installing collected packages: python-qpid-proton
  Running setup.py install for python-qpid-proton
    Did not find libqpid-proton via pkg-config:
    Bundling qpid-proton into the extension
    fetching http://www.apache.org/dist/qpid/proton/0.12.0/qpid-proton-0.12.0.tar.gz into build/bundled
    /opt/rh/python33/root/usr/bin/python3: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory
    /opt/rh/python33/root/usr/bin/python3: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory
    Using openssl (found via pkg-config).
...
/tmp/pip_build_root/python-qpid-proton/build/bundled/qpid-proton/proton-c/src/codec/decoder.c: In function 'pni_decoder_decode_type':

/tmp/pip_build_root/python-qpid-proton/build/bundled/qpid-proton/proton-c/src/codec/decoder.c:451:15: error: 'PNE_DESCRIPTOR' undeclared (first use in this function)

   if (next == PNE_DESCRIPTOR) {

               ^

error: command 'gcc' failed with exit status 1
----------------------------------------------------------------





However, it turns out that `cyrus-sasl-devel` is already installed:

----------------------------------------------------------------
bash-4.2# yum info cyrus-sasl-devel
Installed Packages
Name        : cyrus-sasl-devel
Arch        : x86_64
Version     : 2.1.26
Release     : 19.2.el7
Size        : 1.0 M
Repo        : installed
From repo   : base
Summary     : Files needed for developing applications with Cyrus SASL
URL         : http://asg.web.cmu.edu/sasl/sasl-library.html
License     : BSD with advertising
Description : The cyrus-sasl-devel package contains files needed for developing and
            : compiling applications which use the Cyrus SASL library.
----------------------------------------------------------------


I tried:

- yum update cyrus-sasl-devel
- pip install -U pip (update pip)
- yum install saslwrapper-devel
- yum install qpid-proton-c-devel

But none of the steps above helped.



Finally, I tried Python 2.7:

----------------------------------------------------------------
$ docker run --rm -it --user root centos/python-27-centos7 bash
bash-4.2# pip install python-qpid-proton
Downloading/unpacking python-qpid-proton
  Downloading python-qpid-proton-0.12.0.tar.gz (157kB): 157kB downloaded
  Running setup.py (path:/tmp/pip-build-jsbbFO/python-qpid-proton/setup.py) egg_info for package python-qpid-proton
    
Installing collected packages: python-qpid-proton
  Running setup.py install for python-qpid-proton
    Did not find libqpid-proton via pkg-config:
    Bundling qpid-proton into the extension
    fetching http://www.apache.org/dist/qpid/proton/0.12.0/qpid-proton-0.12.0.tar.gz into build/bundled
    Using openssl (found via pkg-config).
...
    
Successfully installed python-qpid-proton
Cleaning up...
----------------------------------------------------------------


And then Python 3.4:

----------------------------------------------------------------
$ docker run --rm -it --user root centos/python-34-centos7 bash
bash-4.2# pip install python-qpid-proton
Downloading/unpacking python-qpid-proton
  Downloading python-qpid-proton-0.12.0.tar.gz (157kB): 157kB downloaded
  Running setup.py (path:/tmp/pip-build-vo35namb/python-qpid-proton/setup.py) egg_info for package python-qpid-proton
    
Installing collected packages: python-qpid-proton
  Running setup.py install for python-qpid-proton
    Did not find libqpid-proton via pkg-config:
    Bundling qpid-proton into the extension
    fetching http://www.apache.org/dist/qpid/proton/0.12.0/qpid-proton-0.12.0.tar.gz into build/bundled
    /opt/rh/rh-python34/root/usr/bin/python3: error while loading shared libraries: libpython3.4m.so.rh-python34-1.0: cannot open shared object file: No such file or directo
ry
    /opt/rh/rh-python34/root/usr/bin/python3: error while loading shared libraries: libpython3.4m.so.rh-python34-1.0: cannot open shared object file: No such file or directo
ry
    Using openssl (found via pkg-config).
...
/tmp/pip-build-vo35namb/python-qpid-proton/build/bundled/qpid-proton/proton-c/src/codec/decoder.c:451:15: error: 'PNE_DESCRIPTOR' undeclared (first use in this function)

   if (next == PNE_DESCRIPTOR) {

               ^

error: command 'gcc' failed with exit status 1
----------------------------------------------------------------



According to PyPI python-qpid-proton supports Python 3.3:

https://pypi.python.org/pypi/python-qpid-proton/0.12.0


So I don't know why it installs out-of-the-box for Python 2.7 and not for Python 3.3, since in both cases it is using Python from SCL.


*******************************************
But I did notice that for both Python 3.3 and 3.4 there's an error message:

    /opt/rh/python33/root/usr/bin/python3: error while loading shared libraries: libpython3.3m.so.1.0: cannot open shared object file: No such file or directory
    /opt/rh/rh-python34/root/usr/bin/python3: error while loading shared libraries: libpython3.4m.so.rh-python34-1.0: cannot open shared object file: No such file or directory
*******************************************

@hhorak, do you know if there's something about the Python versions that could be causing this problem?
Why do we get the errors above for Python 3.3 and 3.4 and not for 2.7?
Comment 3 Honza Horak 2016-03-01 06:50:17 EST
(In reply to Rodolfo Carvalho from comment #2)
> But I did notice that for both Python 3.3 and 3.4 there's an error message:
> 
>     /opt/rh/python33/root/usr/bin/python3: error while loading shared
> libraries: libpython3.3m.so.1.0: cannot open shared object file: No such
> file or directory
>     /opt/rh/rh-python34/root/usr/bin/python3: error while loading shared
> libraries: libpython3.4m.so.rh-python34-1.0: cannot open shared object file:
> No such file or directory
> *******************************************
> 
> @hhorak, do you know if there's something about the Python versions that
> could be causing this problem?
> Why do we get the errors above for Python 3.3 and 3.4 and not for 2.7?

I don't know what is the difference between 2.7 and 3.3/3.4, but the error above seems like problem with SCL environment, that it is not properly set. Can you check the environment at the time the error above occurs?
Comment 4 Rodolfo Carvalho 2016-03-01 07:00:33 EST
@hhorak sure, here it goes:

----------------------------------------------------------------
$ docker run --rm -it --user root centos/python-27-centos7 bash
bash-4.2# printenv
MANPATH=/opt/rh/python27/root/usr/share/man:
HOSTNAME=2659ef617d21
TERM=xterm
X_SCLS=python27 
LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64
PYTHON_VERSION=2.7
PATH=/opt/rh/python27/root/usr/bin:/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
STI_SCRIPTS_URL=image:///usr/libexec/s2i
PWD=/opt/app-root/src
STI_SCRIPTS_PATH=/usr/libexec/s2i
HOME=/opt/app-root/src
SHLVL=1
XDG_DATA_DIRS=/opt/rh/python27/root/usr/share
PKG_CONFIG_PATH=/opt/rh/python27/root/usr/lib64/pkgconfig
_=/usr/bin/printenv
bash-4.2# ls /opt/rh/python27/root/usr/lib64
X11  games  libpython2.7.so  libpython2.7.so.1.0  pkgconfig  pm-utils  python2.7  sse2  tls
bash-4.2# ls /opt/rh/python27/root/usr/lib64 -l
total 1800
dr-xr-xr-x.  2 root root       6 Oct  1 15:50 X11
dr-xr-xr-x.  2 root root       6 Oct  1 15:50 games
lrwxrwxrwx.  1 root root      19 Feb 11 16:53 libpython2.7.so -> libpython2.7.so.1.0
-r-xr-xr-x.  1 root root 1802616 Oct  1 16:25 libpython2.7.so.1.0
drwxr-xr-x.  2 root root      62 Feb 11 16:53 pkgconfig
dr-xr-xr-x.  5 root root      52 Feb 11 16:52 pm-utils
drwxr-xr-x. 26 root root   20480 Feb 11 16:52 python2.7
dr-xr-xr-x.  2 root root       6 Oct  1 15:50 sse2
dr-xr-xr-x.  2 root root       6 Oct  1 15:50 tls
----------------------------------------------------------------

----------------------------------------------------------------
$ docker run --rm -it --user root openshift/python-33-centos7 bash
bash-4.2# printenv
MANPATH=/opt/rh/python33/root/usr/share/man:
HOSTNAME=c6823c812853
TERM=xterm
X_SCLS=python33 
LD_LIBRARY_PATH=/opt/rh/python33/root/usr/lib64
PYTHON_VERSION=3.3
PATH=/opt/rh/python33/root/usr/bin:/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
STI_SCRIPTS_URL=image:///usr/libexec/s2i
PWD=/opt/app-root/src
STI_SCRIPTS_PATH=/usr/libexec/s2i
HOME=/opt/app-root/src
SHLVL=1
XDG_DATA_DIRS=/opt/rh/python33/root/usr/share
PKG_CONFIG_PATH=/opt/rh/python33/root/usr/lib64/pkgconfig
_=/usr/bin/printenv
bash-4.2# ls /opt/rh/python33/root/usr/lib64
X11  games  libpython3.3m.so  libpython3.3m.so.1.0  libpython3.so  pkgconfig  pm-utils  python3.3  sse2  tls
bash-4.2# ls /opt/rh/python33/root/usr/lib64 -l
total 2468
dr-xr-xr-x.  2 root root       6 Oct  1 16:32 X11
dr-xr-xr-x.  2 root root       6 Oct  1 16:32 games
lrwxrwxrwx.  1 root root      20 Feb 11 16:59 libpython3.3m.so -> libpython3.3m.so.1.0
-rwxr-xr-x.  1 root root 2503984 Oct  1 17:02 libpython3.3m.so.1.0
-rwxr-xr-x.  1 root root    6688 Oct  1 17:02 libpython3.so
drwxr-xr-x.  2 root root      84 Feb 11 16:59 pkgconfig
dr-xr-xr-x.  5 root root      52 Feb 11 16:59 pm-utils
drwxr-xr-x. 32 root root    8192 Feb 11 16:59 python3.3
dr-xr-xr-x.  2 root root       6 Oct  1 16:32 sse2
dr-xr-xr-x.  2 root root       6 Oct  1 16:32 tls
----------------------------------------------------------------
Comment 5 Honza Horak 2016-03-02 09:31:38 EST
I don't really have an idea, moving needinfo to the Python maintainer. Robert, do you have an idea what might be different here?
Comment 6 Robert Kuska 2016-03-02 09:37:39 EST
This is actually a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1312590 , I've already sent a PR to qpid-proton to address the issue.

*** This bug has been marked as a duplicate of bug 1312590 ***
Comment 7 Robert Kuska 2016-03-02 09:40:07 EST
Btw, it worked with python27 because system python is linked against same .so file as python shipped within python27 collection, so python27 collection used the one located in /usr/lib64 (instead of /opt/rh/..../usr/lib64/).
Comment 8 Rodolfo Carvalho 2016-03-02 11:48:35 EST
Thanks Robert!

Note You need to log in before you can comment on or make changes to this bug.