Description of problem: Swig produces code that breaks compilation with -Wall -Werror > ./libecryptfs_wrap.c: In function '_wrap_ecryptfs_passphrase_blob': > ./libecryptfs_wrap.c:2619: error: pointer targets in passing argument 1 of 'PyString_FromStringAndSize' differ in signedness > ./libecryptfs_wrap.c: In function '_wrap_ecryptfs_passphrase_sig_from_blob': > ./libecryptfs_wrap.c:2648: error: pointer targets in passing argument 1 of > 'PyString_FromStringAndSize' differ in signedness Version-Release number of selected component (if applicable): swig-1.3.35 How reproducible: allways Steps to Reproduce: 1. download and install recent ecryptfs-utils srpm 2. prepare build (rpmbuild -bp <path_to_spec> ) 3. remove src/libecryptfs-swig/libecryptfs_wrap.c 4. build it Actual results: build fails Expected results: build completes Additional info: This was working with swig-1.3.31 (and with 1.3.33 probably)
Problem is in your code: src/include/ecryptfs.h: ... typedef struct binary_data { int size; unsigned char *data; } binary_data; ... ------------- src/libecryptfs-swig/libecryptfs.i: ... %typemap(out) binary_data { $result = PyString_FromStringAndSize($1.data,$1.size); } ... ------------- /usr/include/python2.6/stringobject.h: ... PyAPI_FUNC(PyObject *) PyString_FromStringAndSize(const char *, Py_ssize_t); ... ------------- As you can see function PyString_FromStringAndSize() takes "const char *" argument bug you are passing unsigned char*. You should modify binary_data structure to contain signed char instead of unsigned or you could modify PyString_FromStringAndSize call in libecryptfs.i: $result = PyString_FromStringAndSize((char *)($1.data),$1.size); Not sure which solution is better from ecryptfs-utils perspective. Closing.