Ticket #775 (new defect)

Opened 5 months ago

Last modified 11 days ago

python wrapper is broken

Reported by: cstender Owned by: ehabkost
Priority: high Milestone: 0.39
Component: Plugin: python-api Version: 0.38
Severity: normal Keywords:
Cc: andrewb

Description (last modified by felixmoeller) (diff)

While building libopensync from svn I get the following warnings:

cd /usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper && /usr/bin/gcc   -D_opensync_EXPORTS -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2  -fPIC -I/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build -I/usr/src/packages/BUILD/libopensync-0.36_SVN3433/opensync -I/usr/src/packages/BUILD/libopensync-0.36_SVN3433 -I/usr/include/python2.5   -fno-strict-aliasing -o CMakeFiles/_opensync.dir/opensyncPYTHON_wrap.o   -c /usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c: In function 'FormatEnv_find_path_formats':
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c:3568: warning: passing argument 3 of 'osync_format_env_find_path_formats' from incompatible pointer type
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c: In function 'ObjTypeSink_num_objformats':
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c:4494: warning: implicit declaration of function 'osync_objtype_sink_num_objformats'
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c: In function 'ObjTypeSink_nth_objformat':
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c:4497: warning: implicit declaration of function 'osync_objtype_sink_nth_objformat'
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c:4497: warning: return makes pointer from integer without a cast
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c: In function 'ObjTypeSink_add_objformat':
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c:4500: warning: implicit declaration of function 'osync_objtype_sink_add_objformat'
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c: In function 'ObjTypeSink_remove_objformat':
/usr/src/packages/BUILD/libopensync-0.36_SVN3433/build/wrapper/opensyncPYTHON_wrap.c:4503: warning: implicit declaration of function 'osync_objtype_sink_remove_objformat'

This leads to the following traceback:

Traceback (most recent call last):

    File "/usr/lib/python2.5/site-packages/opensync.py", line 10, in <module>

        import _opensync

ImportError?: /usr/lib/python2.5/site-packages/_opensync.so: undefined symbol: osync_objtype_sink_num_objformats

Attachments

opensync-plugin.i.diff (0.7 KB) - added by apotter 8 days ago.
Three functions renamed form osync_objtype_sink*objformat to osync_objtype_sink*objformat_sink

Change History

  Changed 4 months ago by tuju

  • milestone changed from 0.40 to 0.37

  Changed 4 months ago by tuju

  • owner changed from dgollub to ehabkost
  • component changed from OpenSync to Plugin: python-module

  Changed 4 months ago by felixmoeller

  • description modified (diff)

follow-up: ↓ 6   Changed 4 months ago by felixmoeller

looking more at it, it seems the function got renamed with changeset:3319.

int osync_objtype_sink_num_objformats(OSyncObjTypeSink *sink) 

was renamed to

unsigned int osync_objtype_sink_num_objformat_sinks(OSyncObjTypeSink *sink) 

  Changed 4 months ago by dgollub

  • milestone changed from 0.37 to 0.39

Puuh, i had a brief look on this - my python knowledge is quite rare... I failed on how to handle lists in python - this seems to be the hardest part in the swig stuff. Reschedule the ticket to 0.39 - since 0.39 should contain the latest API changes.

in reply to: ↑ 4   Changed 4 months ago by dgollub

Replying to felixmoeller:

looking more at it, it seems the function got renamed with changeset:3319. {{{ int osync_objtype_sink_num_objformats(OSyncObjTypeSink *sink) }}} was renamed to {{{ unsigned int osync_objtype_sink_num_objformat_sinks(OSyncObjTypeSink *sink) }}}

Thanks for the hint... renamed.

But there are still some issues left:

[ 79%] Building C object wrapper/CMakeFiles/_opensync.dir/opensyncPYTHON_wrap.o
/home/dani/projects/opensync/opensync/build/wrapper/opensyncPYTHON_wrap.c: In function ‘FormatEnv_find_path_formats’:
/home/dani/projects/opensync/opensync/build/wrapper/opensyncPYTHON_wrap.c:3568: warning: passing argument 3 of ‘osync_format_env_find_path_formats’ from incompatible pointer type
/home/dani/projects/opensync/opensync/build/wrapper/opensyncPYTHON_wrap.c: In function ‘ObjTypeSink_nth_objformat’:
/home/dani/projects/opensync/opensync/build/wrapper/opensyncPYTHON_wrap.c:4512: warning: return makes pointer from integer without a cast

  Changed 4 weeks ago by guysoft

Getting this in debian too.

guy@golem3:~/tmp/opensync/moto-sync$ python
Python 2.5.2 (r252:60911, Aug  8 2008, 09:22:44)
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import _opensync
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /var/lib/python-support/python2.5/_opensync.so: undefined symbol: osync_objtype_sink_remove_objformat
>>>

  Changed 11 days ago by tuju

  • version changed from 0.36 to 0.38

Changed 8 days ago by apotter

Three functions renamed form osync_objtype_sink*objformat to osync_objtype_sink*objformat_sink

Note: See TracTickets for help on using tickets.