View previous topic :: View next topic |
Author |
Message |
zebul666
Joined: 22 Apr 2008 Posts: 1
|
Posted: Tue Apr 22, 2008 2:17 pm Post subject: python module failed compilation |
|
|
hi.
when i try to compile the python of miniupnpc from the 1.0 realease
i got :
Code: | $ make pythonmodule
python setup.py build
running build
running build_ext
building 'miniupnpc' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c miniupnpcmodule.c -o build/temp.linux-i686-2.5/miniupnpcmodule.o
miniupnpcmodule.c: In function 'UPnP_statusinfo':
miniupnpcmodule.c:140: error: too few arguments to function 'UPNP_GetStatusInfo'
error: command 'gcc' failed with exit status 1
make: *** [pythonmodule] Error 1 |
it's clear the UPnP_statusinfo needs 5 arguments and only has 4.
and make install do not install any binary
and make installpythonmodule do install the python module |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Wed Apr 23, 2008 12:13 pm Post subject: |
|
|
That patch should fix the problem :
Code: |
diff -u -r1.7 miniupnpcmodule.c
--- miniupnpcmodule.c 19 Dec 2007 15:00:47 -0000 1.7
+++ miniupnpcmodule.c 23 Apr 2008 12:12:16 -0000
@@ -134,11 +134,13 @@
UPnP_statusinfo(UPnPObject *self)
{
char status[64];
+ char lastconnerror[64];
unsigned int uptime = 0;
status[0] = '\0';
+ lastconnerror[0] = '\0';
UPNP_GetStatusInfo(self->urls.controlURL, self->data.servicetype,
- status, &uptime);
- return Py_BuildValue("(s,I)", status, uptime);
+ status, &uptime, lastconnerror);
+ return Py_BuildValue("(s,I,s)", status, uptime, lastconnerror);
}
static PyObject *
|
I'm going to test again all this python stuff.
Thanks for the feed back _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Wed Apr 23, 2008 12:16 pm Post subject: Re: python module failed compilation |
|
|
zebul666 wrote: |
and make install do not install any binary
and make installpythonmodule do install the python module |
make install only install the libraries and .h files. Indeed it could be interesting to install upnpc-shared binary to /usr/bin...
make installpythonmodule should work once as soon as the python module is fixed _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
mj234
Joined: 27 Jan 2012 Posts: 3 Location: Denmark
|
Posted: Fri Jan 27, 2012 7:17 pm Post subject: module request |
|
|
ok, a have posted this in other post but here it is again:
could someone please provide a link for the python module?
i get this whe try to compile. it seems it uses an deprecated argument on gcc:
D:\Download\miniupnpc-1.6.20120125>setupmingw32.py build
running build
running build_ext
building 'miniupnpc' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include -IC:\Pytho
n27\PC -c miniupnpcmodule.c -o build\temp.win-amd64-2.7\Release\miniupnpcmodule.
o
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1 |
|
Back to top |
|
|
|