Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
proton-0.6
-
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.