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

[jira] [Created] (PROTON-490) [proton-c] Python binding fails to link with Python 3 libraries

Ken Giusti created PROTON-490:
---------------------------------

             Summary: [proton-c] Python binding fails to link with Python 3 libraries
                 Key: PROTON-490
                 URL: https://issues.apache.org/jira/browse/PROTON-490
             Project: Qpid Proton
          Issue Type: New Feature
          Components: python-binding
    Affects Versions: 0.6
            Reporter: Ken Giusti


Attempting to link the Swig generated python bindings against the Python 3 development libraries produces unresolved symbol errors:

CMakeFiles/_cproton.dir/pythonPYTHON_wrap.c.o: In function `_wrap_pn_bytes':
pythonPYTHON_wrap.c:(.text+0xa567): undefined reference to `PyString_FromStringAndSize'
CMakeFiles/_cproton.dir/pythonPYTHON_wrap.c.o: In function `_wrap_pn_bytes_dup':
pythonPYTHON_wrap.c:(.text+0xa701): undefined reference to `PyString_FromStringAndSize'
CMakeFiles/_cproton.dir/pythonPYTHON_wrap.c.o: In function `_wrap_pn_message_get_user_id':
pythonPYTHON_wrap.c:(.text+0x1e827): undefined reference to `PyString_FromStringAndSize'
CMakeFiles/_cproton.dir/pythonPYTHON_wrap.c.o: In function `_wrap_pn_data_get_decimal128':
pythonPYTHON_wrap.c:(.text+0x31450): undefined reference to `PyString_FromStringAndSize'
CMakeFiles/_cproton.dir/pythonPYTHON_wrap.c.o: In function `_wrap_pn_data_get_uuid':
pythonPYTHON_wrap.c:(.text+0x31559): undefined reference to `PyString_FromStringAndSize'
CMakeFiles/_cproton.dir/pythonPYTHON_wrap.c.o:pythonPYTHON_wrap.c:(.text+0x31664): more undefined references to `PyString_FromStringAndSize' follow
collect2: error: ld returned 1 exit status

This is due to a name change in the Python 3 API:

http://docs.python.org/2/c-api/string.html?highlight=pystring_fromstring#PyString_FromStringAndSize

http://docs.python.org/2/howto/cporting.html#conditional-compilation

The wrapper C code in proton-c/bindings/python/python.i needs to be updated to support the Python 3 API.
 




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)