miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

python module failed compilation

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation
View previous topic :: View next topic  
Author Message
zebul666



Joined: 22 Apr 2008
Posts: 1

PostPosted: Tue Apr 22, 2008 2:17 pm    Post subject: python module failed compilation Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1500

PostPosted: Wed Apr 23, 2008 12:13 pm    Post subject: Reply with quote

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.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1500

PostPosted: Wed Apr 23, 2008 12:16 pm    Post subject: Re: python module failed compilation Reply with quote

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 Smile
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
mj234



Joined: 27 Jan 2012
Posts: 3
Location: Denmark

PostPosted: Fri Jan 27, 2012 7:17 pm    Post subject: module request Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.