Description of problem: python-qpid-proton build invokes python during its build to generate C header encodings.h. the invocation of python fails resulting in missing types later in the build. Version-Release number of selected component (if applicable): EL7, rh-python34 How reproducible: 100% Steps to Reproduce: 0. (following https://www.softwarecollections.org/en/scls/rhscl/rh-python34/) 1. yum install scl-utils 2. yum install https://www.softwarecollections.org/en/scls/rhscl/rh-python34/epel-7-x86_64/download/rhscl-rh-python34-epel-7-x86_64.noarch.rpm 3. yum install rh-python34 4. scl enable rh-python34 -- pip install python-qpid-proton Actual results: python-qpid-proton build failures after python invocation fails with 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 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 ... /tmp/pip-build-pazpj1by/python-qpid-proton/build/bundled/qpid-proton/proton-c/src/codec/decoder.c: In function 'pn_code2type': /tmp/pip-build-pazpj1by/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: ^ ... Expected results: python-qpid-proton installed under rh-python34 Additional info: this also fails under python33
I've checked prelinked libraries of python binary: [root@deimos /]# ldd /opt/rh/rh-python34/root/usr/bin/python linux-vdso.so.1 => (0x00007ffc16872000) libpython3.4m.so.rh-python34-1.0 => /opt/rh/rh-python34/root/usr/lib64/libpython3.4m.so.rh-python34-1.0 (0x00007fddeb0e8000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fddeaec5000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fddeacc1000) libutil.so.1 => /lib64/libutil.so.1 (0x00007fddeaabe000) libm.so.6 => /lib64/libm.so.6 (0x00007fddea7bb000) libc.so.6 => /lib64/libc.so.6 (0x00007fddea3fa000) /lib64/ld-linux-x86-64.so.2 (0x0000563bd0b4c000) Also checked user rights and if the library mentioned above exists: [root@deimos /]# ls -l /opt/rh/rh-python34/root/usr/lib64/libpython3.4m.so.rh-python34-1.0 -rwxr-xr-x. 1 root root 2594992 Mar 25 2015 /opt/rh/rh-python34/root/usr/lib64/libpython3.4m.so.rh-python34-1.0 LD_LIBRARY_PATH seems to be also correct: [root@deimos /]# echo $LD_LIBRARY_PATH /opt/rh/rh-python34/root/usr/lib64
Diggin into this deeper this seems to be python-qpid-proton issue as it does modify environment variables. See its setup.py@183 subprocess.Popen([sys.executable, os.path.join(proton_src, 'protocol.h.py')], env={'PYTHONPATH': proton_base}, stdout=header) env override our LD_LIBRARY_PATH variable, see: >>> subprocess.Popen('/usr/bin/echo $LD_LIBRARY_PATH', shell=True, env={'PYTHONPATH': '.'}, stdout=subprocess.PIPE).stdout.read() b'\n' >>> subprocess.Popen('/usr/bin/echo $LD_LIBRARY_PATH', shell=True, stdout=subprocess.PIPE).stdout.read() b'/opt/rh/rh-python34/root/usr/lib64\n' Correct way for qpid proton to handle env variables is to pass os.environ.copy() with modified 'PYTHONPATH' (according their needs). I will submit PR to upstream.
Possible workaround for you could be `sudo ldconfig /opt/rh/rh-python34/root/usr/lib64/ -v`.
I've submited a PR to upstream. https://github.com/apache/qpid-proton/pull/69 I will close this issue as NOTABUG if you don't mind.
*** Bug 1312586 has been marked as a duplicate of this bug. ***
FYI: I've pushed Robert's fix upstream. Thanks Robert for your help with this. https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=b9cd200c532e968bc349145b957c586684b08f02 -K
No problem, glad to help :) I am closing this as it is fixed in upstream and there's nothing more to do.
closing this is fine, but please link the mrg qpid-proton bz to track this fix getting into product
It's already merged and should be part of v0.13.0 according to Jira[0]. [0]https://issues.apache.org/jira/browse/PROTON-1150