sahlberg / libnfs-python

Python bindings for libnfs
GNU Lesser General Public License v2.1
64 stars 34 forks source link

libnfs_wrap.c Fails to Compile on Ubuntu 14.04 #9

Closed cargregter closed 7 years ago

cargregter commented 8 years ago

After sudo apt-get install libnfs-dev I think I must have a libnfs version different from the one used here to generate libnfs_wrap.c. Any suggestion to clean it up?

building 'libnfs._libnfs' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c libnfs/libnfs_wrap.c -o build/temp.linux-x86_64-2.7/libnfs/libnfs_wrap.o
libnfs/libnfs_wrap.c:2975:26: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
   static struct nfsfh * *new_NFSFileHandle() { 
                          ^
libnfs/libnfs_wrap.c:2996:20: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
   static uint64_t *new_uint64_t_ptr() { 
                    ^
libnfs/libnfs_wrap.c: In function ‘_wrap_nfs_url_server_set’:
libnfs/libnfs_wrap.c:3708:11: error: dereferencing pointer to incomplete type
   if (arg1->server) free((char*)arg1->server);
           ^
libnfs/libnfs_wrap.c:3708:37: error: dereferencing pointer to incomplete type
   if (arg1->server) free((char*)arg1->server);
                                     ^
libnfs/libnfs_wrap.c:3711:9: error: dereferencing pointer to incomplete type
     arg1->server = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
libnfs/libnfs_wrap.c:3713:9: error: dereferencing pointer to incomplete type
     arg1->server = 0;
         ^
libnfs/libnfs_wrap.c: In function ‘_wrap_nfs_url_server_get’:
libnfs/libnfs_wrap.c:3738:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->server);
                            ^
...
cargregter commented 8 years ago

Yeah ... looks like trusty is giving me an older version of libnfs.