Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-490

[proton-c] Python binding fails to link with Python 3 libraries

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.6
    • proton-0.10
    • python-binding
    • None

    Description

      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.

      Attachments

        1. 47_proton-490_fix_proton_init.patch
          0.8 kB
          Mickael Maison
        2. 47_proton-490_fix_print_protocol.h.py.patch
          6 kB
          Mickael Maison
        3. 47_proton-490_fix_print_encodings.h.py.patch
          2 kB
          Mickael Maison
        4. 47_proton-490_fix_mllib_transforms.py.patch
          1 kB
          Mickael Maison
        5. 47_proton-490_fix_mllib_parsers.patch
          2 kB
          Mickael Maison
        6. 47_proton-490_fix_mllib_dom.patch
          2 kB
          Mickael Maison
        7. 47_proton-490_fix_import_statements_mllib_init.patch
          1 kB
          Mickael Maison
        8. 47_proton-490_fix_cproton.i.patch
          2 kB
          Mickael Maison

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kgiusti Ken Giusti
            kgiusti Ken Giusti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment