Can't install ports/www/uwsgi

I get the following error message
Code:
[olav@zpool /usr/ports/www/uwsgi]$ sudo make reinstall clean
Password:
===>  Building for uwsgi-1.4.9
/usr/local/bin/python2.7 uwsgiconfig.py --build
cc1: warnings being treated as errors
In file included from /usr/local/include/python2.7/Python.h:126,
                 from plugins/python/uwsgi_python.h:2,
                 from plugins/python/python_plugin.c:1:
/usr/local/include/python2.7/modsupport.h:27: warning: 'PyArg_ParseTuple' is an unrecognized format function type
cc1: warnings being treated as errors
In file included from /usr/local/include/python2.7/Python.h:126,
                 from plugins/python/uwsgi_python.h:2,
                 from plugins/python/pyutils.c:1:
/usr/local/include/python2.7/modsupport.h:27: warning: 'PyArg_ParseTuple' is an unrecognized format function type
*** [all] Error code 1
1 error
*** [do-build] Error code 1

Stop in /usr/ports/www/uwsgi.
*** [reinstall] Error code 1

Stop in /usr/ports/www/uwsgi.

Does anyone have an idea what I can do?
 
I had something to do with GCC 4.8 not having the flag -Wformat enabled by default. I solved this by adding
Code:
CFLAGS=-Wformat
to /etc/make.conf and recompiling Python.
 
Maybe you should put
Code:
CFLAGS+=-Wformat

just to be on the safe side, so you'll append this to the existing CFLAGS, which might be present for example in a Makefile, without overriding them.
 
It's best not to muck about with CFLAGS but in this case you don't seem to have many options. To make sure these options are only used with this port use something like this in /etc/make.conf:
Code:
.if ${.CURDIR:M/*www/uwsgi}
CFLAGS+=-Wformat
.endif
 
Back
Top