You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "Andrew Stitcher (JIRA)" <ji...@apache.org> on 2015/07/20 21:44:04 UTC

[jira] [Commented] (PROTON-952) Building Proton with python 2.6 and python 3.4 on Travis CI finds and links wrong libpython

    [ https://issues.apache.org/jira/browse/PROTON-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14633992#comment-14633992 ] 

Andrew Stitcher commented on PROTON-952:
----------------------------------------

Build log for python 3.4 (2.6 is similar)
{quote}
...
$ cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install
...
-- Build type is "RelWithDebInfo" (has debug symbols)
-- PN_VERSION: 0.10 (SNAPSHOT)
...
-- Found PythonInterp: /home/travis/virtualenv/python3.4.2/bin/python 
...
-- Found PythonLibs: /usr/lib/libpython2.7.so 
...
{quote}

So it finds the correct python executable but the incorrect libpython. This may be a bug in the version of cmake being used (as I don't get this problem on my fedora 21/22 developer boxes).

The failure symptoms are:

For Python 3.4 -
{quote}
...
$ ctest -V
...
test 2
      Start  2: python-test
2: Test command: /home/travis/virtualenv/python3.4.2/bin/python "/home/travis/build/astitcher/qpid-proton/proton-c/env.py" "PATH=/home/travis/build/astitcher/qpid-proton/Build/proton-c:/home/travis/build/astitcher/qpid-proton/Build/tests/tools/apps/c:/home/travis/build/astitcher/qpid-proton/tests/tools/apps/python:/home/travis/.local/bin:/home/travis/virtualenv/python3.4.2/bin:/home/travis/bin:/home/travis/.local/bin:/home/travis/.gimme/versions/go1.4.1.linux.amd64/bin:/opt/python/2.7.9/bin:/opt/python/2.6.9/bin:/opt/python/3.4.2/bin:/opt/python/3.3.5/bin:/opt/python/3.2.5/bin:/opt/python/pypy-2.5.0/bin:/opt/python/pypy3-2.4.0/bin:/usr/local/phantomjs/bin:/home/travis/.nvm/v0.10.36/bin:./node_modules/.bin:/usr/local/maven-3.2.5/bin:/usr/local/clang-3.4/bin:/home/travis/.gimme/versions/go1.4.1.linux.amd64/bin:/opt/python/2.7.9/bin:/opt/python/2.6.9/bin:/opt/python/3.4.2/bin:/opt/python/3.3.5/bin:/opt/python/3.2.5/bin:/opt/python/pypy-2.5.0/bin:/opt/python/pypy3-2.4.0/bin:/usr/local/phantomjs/bin:./node_modules/.bin:/usr/local/maven-3.2.5/bin:/usr/local/clang-3.4/bin:/home/travis/.gimme/versions/go1.4.1.linux.amd64/bin:/home/travis/.rvm/gems/ruby-1.9.3-p551/bin:/home/travis/.rvm/gems/ruby-1.9.3-p551@global/bin:/home/travis/.rvm/rubies/ruby-1.9.3-p551/bin:/opt/python/2.7.9/bin:/opt/python/2.6.9/bin:/opt/python/3.4.2/bin:/opt/python/3.3.5/bin:/opt/python/3.2.5/bin:/opt/python/pypy-2.5.0/bin:/opt/python/pypy3-2.4.0/bin:/usr/local/phantomjs/bin:./node_modules/.bin:/usr/local/maven-3.2.5/bin:/usr/local/clang-3.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/travis/.rvm/bin:/home/travis/.rvm/bin:/home/travis/.rvm/bin" "PYTHONPATH=/home/travis/build/astitcher/qpid-proton/tests/python:/home/travis/build/astitcher/qpid-proton/proton-c/bindings/python:/home/travis/build/astitcher/qpid-proton/Build/proton-c/bindings/python:/home/travis/build/astitcher/qpid-proton/Build/proton-c/bindings/python" "PKG_CONFIG_PATH=/home/travis/build/astitcher/qpid-proton/Build/proton" "CLASSPATH=/home/travis/build/astitcher/qpid-proton/Build/proton-j/proton-j.jar" "SASLPASSWD=/usr/sbin/saslpasswd2" "VALGRIND=/usr/bin/valgrind" "/home/travis/virtualenv/python3.4.2/bin/python" "/home/travis/build/astitcher/qpid-proton/tests/python/proton-test"
2: Test timeout computed to be: 1500
2: Traceback (most recent call last):
2:   File "/home/travis/build/astitcher/qpid-proton/tests/python/proton-test", line 620, in <module>
2:     m = __import__(name, None, None, ["dummy"])
2:   File "/home/travis/build/astitcher/qpid-proton/tests/python/proton_tests/__init__.py", line 20, in <module>
2:     import proton_tests.codec
2:   File "/home/travis/build/astitcher/qpid-proton/tests/python/proton_tests/codec.py", line 21, in <module>
2:     from . import common
2:   File "/home/travis/build/astitcher/qpid-proton/tests/python/proton_tests/common.py", line 26, in <module>
2:     from proton import Connection, Transport, SASL, Endpoint, Delivery, SSL
2:   File "/home/travis/build/astitcher/qpid-proton/proton-c/bindings/python/proton/__init__.py", line 34, in <module>
2:     from cproton import *
2:   File "/home/travis/build/astitcher/qpid-proton/Build/proton-c/bindings/python/cproton.py", line 26, in <module>
2:     _cproton = swig_import_helper()
2:   File "/home/travis/build/astitcher/qpid-proton/Build/proton-c/bindings/python/cproton.py", line 22, in swig_import_helper
2:     _mod = imp.load_module('_cproton', fp, pathname, description)
2:   File "/home/travis/virtualenv/python3.4.2/lib/python3.4/imp.py", line 243, in load_module
2:     return load_dynamic(name, filename, file)
2: ImportError: dynamic module does not define init function (PyInit__cproton)
 2/12 Test  #2: python-test ......................***Failed  Required regular expression not found.Regex=[Totals: .* 0 failed
]  0.24 sec
...
{quote}
For Python 2.6-
{quote}
...
$ ctest -V
...
test 2
      Start  2: python-test
2: Test command: /home/travis/virtualenv/python2.6.9/bin/python "/home/travis/build/astitcher/qpid-proton/proton-c/env.py" "PATH=/home/travis/build/astitcher/qpid-proton/Build/proton-c:/home/travis/build/astitcher/qpid-proton/Build/tests/tools/apps/c:/home/travis/build/astitcher/qpid-proton/tests/tools/apps/python:/home/travis/.local/bin:/home/travis/virtualenv/python2.6.9/bin:/home/travis/bin:/home/travis/.local/bin:/home/travis/.gimme/versions/go1.4.1.linux.amd64/bin:/opt/python/2.7.9/bin:/opt/python/2.6.9/bin:/opt/python/3.4.2/bin:/opt/python/3.3.5/bin:/opt/python/3.2.5/bin:/opt/python/pypy-2.5.0/bin:/opt/python/pypy3-2.4.0/bin:/usr/local/phantomjs/bin:/home/travis/.nvm/v0.10.36/bin:./node_modules/.bin:/usr/local/maven-3.2.5/bin:/usr/local/clang-3.4/bin:/home/travis/.gimme/versions/go1.4.1.linux.amd64/bin:/opt/python/2.7.9/bin:/opt/python/2.6.9/bin:/opt/python/3.4.2/bin:/opt/python/3.3.5/bin:/opt/python/3.2.5/bin:/opt/python/pypy-2.5.0/bin:/opt/python/pypy3-2.4.0/bin:/usr/local/phantomjs/bin:./node_modules/.bin:/usr/local/maven-3.2.5/bin:/usr/local/clang-3.4/bin:/home/travis/.gimme/versions/go1.4.1.linux.amd64/bin:/home/travis/.rvm/gems/ruby-1.9.3-p551/bin:/home/travis/.rvm/gems/ruby-1.9.3-p551@global/bin:/home/travis/.rvm/rubies/ruby-1.9.3-p551/bin:/opt/python/2.7.9/bin:/opt/python/2.6.9/bin:/opt/python/3.4.2/bin:/opt/python/3.3.5/bin:/opt/python/3.2.5/bin:/opt/python/pypy-2.5.0/bin:/opt/python/pypy3-2.4.0/bin:/usr/local/phantomjs/bin:./node_modules/.bin:/usr/local/maven-3.2.5/bin:/usr/local/clang-3.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/travis/.rvm/bin:/home/travis/.rvm/bin:/home/travis/.rvm/bin" "PYTHONPATH=/home/travis/build/astitcher/qpid-proton/tests/python:/home/travis/build/astitcher/qpid-proton/proton-c/bindings/python:/home/travis/build/astitcher/qpid-proton/Build/proton-c/bindings/python:/home/travis/build/astitcher/qpid-proton/Build/proton-c/bindings/python" "PKG_CONFIG_PATH=/home/travis/build/astitcher/qpid-proton/Build/proton" "CLASSPATH=/home/travis/build/astitcher/qpid-proton/Build/proton-j/proton-j.jar" "SASLPASSWD=/usr/sbin/saslpasswd2" "VALGRIND=/usr/bin/valgrind" "/home/travis/virtualenv/python2.6.9/bin/python" "/home/travis/build/astitcher/qpid-proton/tests/python/proton-test"
2: Test timeout computed to be: 1500
 2/12 Test  #2: python-test ......................***Failed  Required regular expression not found.Regex=[Totals: .* 0 failed
]  0.18 sec
...
{quote}

> Building Proton with python 2.6 and python 3.4 on Travis CI finds and links wrong libpython
> -------------------------------------------------------------------------------------------
>
>                 Key: PROTON-952
>                 URL: https://issues.apache.org/jira/browse/PROTON-952
>             Project: Qpid Proton
>          Issue Type: Bug
>    Affects Versions: 0.10
>         Environment: Travis CI build environment (highly customised Ubuntu)
>            Reporter: Andrew Stitcher
>
> You can specify a specifiv version of python to use in the Traviis build process and that will set up the build environment to use a python virtualenv with that version of python.
> When using python 2.6 or 3.4 (and probably 3.3 too but I've not tested that)
> the cmake installed will find the python 2.7 libs and link them into the proton bindings extension. This seems to succeed at build time but seems to make the "python-test" fail to even start in both cases (though with slightly different symptoms).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)