unbit / uwsgi

uWSGI application server container
http://projects.unbit.it/uwsgi
Other
3.45k stars 691 forks source link

Python plugin does not compile with python 2.7.4 #220

Closed 0x1997 closed 11 years ago

0x1997 commented 11 years ago
Downloading/unpacking uwsgi
  Downloading uwsgi-1.9.5.tar.gz (594kB): 594kB downloaded
  Running setup.py egg_info for package uwsgi

Installing collected packages: uwsgi
  Running setup.py install for uwsgi
    using profile: buildconf/default.ini
    detected include path: ['/usr/lib/gcc/i686-pc-linux-gnu/4.8.0/include', '/usr/local/include', '/usr/lib/gcc/i686-pc-linux-gnu/4.8.0/include-fixed', '/usr/include']
    Patching "bin_name" to properly install_scripts dir
    detected CPU cores: 2
    configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY  -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_CAP -DUWSGI_UUID -DUWSGI_VERSION="\"1.9.5\"" -DUWSGI_VERSION_BASE="1" -DUWSGI_VERSION_MAJOR="9" -DUWSGI_VERSION_MINOR="5" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_LIBYAML -DUWSGI_LDAP -DUWSGI_SSL -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_SQLITE3 -DUWSGI_PLUGIN_DIR=\".\" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);"
    *** uWSGI compiling server core ***
    [thread 1][gcc -pthread] core/utils.o
    [thread 0][gcc -pthread] core/protocol.o
    [thread 0][gcc -pthread] core/socket.o
    [thread 1][gcc -pthread] core/logging.o
    [thread 0][gcc -pthread] core/master.o
    [thread 1][gcc -pthread] core/master_utils.o
    [thread 0][gcc -pthread] core/emperor.o
    [thread 1][gcc -pthread] core/notify.o
    [thread 0][gcc -pthread] core/mule.o
    [thread 1][gcc -pthread] core/subscription.o
    [thread 0][gcc -pthread] core/stats.o
    [thread 1][gcc -pthread] core/sendfile.o
    [thread 0][gcc -pthread] core/async.o
    [thread 1][gcc -pthread] core/master_checks.o
    [thread 0][gcc -pthread] core/offload.o
    [thread 1][gcc -pthread] core/io.o
    [thread 0][gcc -pthread] core/static.o
    [thread 1][gcc -pthread] core/websockets.o
    [thread 0][gcc -pthread] core/spooler.o
    [thread 1][gcc -pthread] core/snmp.o
    [thread 1][gcc -pthread] core/exceptions.o
    [thread 0][gcc -pthread] core/config.o
    [thread 0][gcc -pthread] core/setup_utils.o
    [thread 1][gcc -pthread] core/clock.o
    [thread 0][gcc -pthread] core/init.o
    [thread 1][gcc -pthread] core/buffer.o
    [thread 0][gcc -pthread] core/reader.o
    [thread 1][gcc -pthread] core/writer.o
    [thread 0][gcc -pthread] core/alarm.o
    [thread 1][gcc -pthread] core/plugins.o
    [thread 0][gcc -pthread] core/lock.o
    [thread 1][gcc -pthread] core/cache.o
    [thread 0][gcc -pthread] core/daemons.o
    [thread 0][gcc -pthread] core/errors.o
    [thread 0][gcc -pthread] core/hash.o
    [thread 1][gcc -pthread] core/master_events.o
    [thread 0][gcc -pthread] core/queue.o
    [thread 1][gcc -pthread] core/event.o
    [thread 0][gcc -pthread] core/signal.o
    [thread 1][gcc -pthread] core/strings.o
    [thread 0][gcc -pthread] core/progress.o
    [thread 1][gcc -pthread] core/timebomb.o
    [thread 1][gcc -pthread] core/ini.o
    [thread 0][gcc -pthread] core/rpc.o
    [thread 1][gcc -pthread] core/gateway.o
    [thread 0][gcc -pthread] core/loop.o
    [thread 1][gcc -pthread] core/cookie.o
    [thread 0][gcc -pthread] core/querystring.o
    [thread 0][gcc -pthread] core/rb_timers.o
    [thread 1][gcc -pthread] core/uwsgi.o
    [thread 0][gcc -pthread] proto/base.o
    [thread 0][gcc -pthread] proto/uwsgi.o
    [thread 0][gcc -pthread] proto/http.o
    [thread 0][gcc -pthread] proto/fastcgIn file included from /usr/include/python2.7/Python.h:126:0,
                     from plugins/python/uwsgi_python.h:2,
                     from plugins/python/python_plugin.c:1:
    /usr/include/python2.7/modsupport.h:27:1: error: ‘PyArg_ParseTuple’ is an unrecognized format function type [-Werror=format=]
     PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
     ^
    In file included from /usr/include/python2.7/Python.h:126:0,
                     from plugins/python/uwsgi_python.h:2,
                     from plugins/python/pyutils.c:1:
    /usr/include/python2.7/modsupport.h:27:1: error: ‘PyArg_ParseTuple’ is an unrecognized format function type [-Werror=format=]
     PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
     ^
    cc1: all warnings being treated as errors
    cc1: all warnings being treated as errors
    Complete output from command /home/mattias/test/bin/python2 -c "import setuptools;__file__='/home/mattias/test/build/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-k7mUu9-record/install-record.txt --single-version-externally-managed --install-headers /home/mattias/test/include/site/python2.7:
    running install

using profile: buildconf/default.ini

detected include path: ['/usr/lib/gcc/i686-pc-linux-gnu/4.8.0/include', '/usr/local/include', '/usr/lib/gcc/i686-pc-linux-gnu/4.8.0/include-fixed', '/usr/include']

Patching "bin_name" to properly install_scripts dir

detected CPU cores: 2

configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY  -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_CAP -DUWSGI_UUID -DUWSGI_VERSION="\"1.9.5\"" -DUWSGI_VERSION_BASE="1" -DUWSGI_VERSION_MAJOR="9" -DUWSGI_VERSION_MINOR="5" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_LIBYAML -DUWSGI_LDAP -DUWSGI_SSL -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_SQLITE3 -DUWSGI_PLUGIN_DIR=\".\" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);"

*** uWSGI compiling server core ***

[thread 1][gcc -pthread] core/utils.o

[thread 0][gcc -pthread] core/protocol.o

[thread 0][gcc -pthread] core/socket.o

[thread 1][gcc -pthread] core/logging.o

[thread 0][gcc -pthread] core/master.o

[thread 1][gcc -pthread] core/master_utils.o

[thread 0][gcc -pthread] core/emperor.o

[thread 1][gcc -pthread] core/notify.o

[thread 0][gcc -pthread] core/mule.o

[thread 1][gcc -pthread] core/subscription.o

[thread 0][gcc -pthread] core/stats.o

[thread 1][gcc -pthread] core/sendfile.o

[thread 0][gcc -pthread] core/async.o

[thread 1][gcc -pthread] core/master_checks.o

[thread 0][gcc -pthread] core/offload.o

[thread 1][gcc -pthread] core/io.o

[thread 0][gcc -pthread] core/static.o

[thread 1][gcc -pthread] core/websockets.o

[thread 0][gcc -pthread] core/spooler.o

[thread 1][gcc -pthread] core/snmp.o

[thread 1][gcc -pthread] core/exceptions.o

[thread 0][gcc -pthread] core/config.o

[thread 0][gcc -pthread] core/setup_utils.o

[thread 1][gcc -pthread] core/clock.o

[thread 0][gcc -pthread] core/init.o

[thread 1][gcc -pthread] core/buffer.o

[thread 0][gcc -pthread] core/reader.o

[thread 1][gcc -pthread] core/writer.o

[thread 0][gcc -pthread] core/alarm.o

[thread 1][gcc -pthread] core/plugins.o

[thread 0][gcc -pthread] core/lock.o

[thread 1][gcc -pthread] core/cache.o

[thread 0][gcc -pthread] core/daemons.o

[thread 0][gcc -pthread] core/errors.o

[thread 0][gcc -pthread] core/hash.o

[thread 1][gcc -pthread] core/master_events.o

[thread 0][gcc -pthread] core/queue.o

[thread 1][gcc -pthread] core/event.o

[thread 0][gcc -pthread] core/signal.o

[thread 1][gcc -pthread] core/strings.o

[thread 0][gcc -pthread] core/progress.o

[thread 1][gcc -pthread] core/timebomb.o

[thread 1][gcc -pthread] core/ini.o

[thread 0][gcc -pthread] core/rpc.o

[thread 1][gcc -pthread] core/gateway.o

[thread 0][gcc -pthread] core/loop.o

[thread 1][gcc -pthread] core/cookie.o

[thread 0][gcc -pthread] core/querystring.o

[thread 0][gcc -pthread] core/rb_timers.o

[thread 1][gcc -pthread] core/uwsgi.o

[thread 0][gcc -pthread] proto/base.o

[thread 0][gcc -pthread] proto/uwsgi.o

[thread 0][gcc -pthread] proto/http.o

[thread 0][gcc -pthread] proto/fastcgIn file included from /usr/include/python2.7/Python.h:126:0,

                 from plugins/python/uwsgi_python.h:2,

                 from plugins/python/python_plugin.c:1:

/usr/include/python2.7/modsupport.h:27:1: error: ‘PyArg_ParseTuple’ is an unrecognized format function type [-Werror=format=]

 PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);

 ^

In file included from /usr/include/python2.7/Python.h:126:0,

                 from plugins/python/uwsgi_python.h:2,

                 from plugins/python/pyutils.c:1:

/usr/include/python2.7/modsupport.h:27:1: error: ‘PyArg_ParseTuple’ is an unrecognized format function type [-Werror=format=]

 PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);

 ^

cc1: all warnings being treated as errors

cc1: all warnings being treated as errors

----------------------------------------
Command /home/mattias/test/bin/python2 -c "import setuptools;__file__='/home/mattias/test/build/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-k7mUu9-record/install-record.txt --single-version-externally-managed --install-headers /home/mattias/test/include/site/python2.7 failed with error code 1 in /home/mattias/test/build/uwsgi
Storing complete log in /home/mattias/.pip/pip.log
0x1997 commented 11 years ago

Detailed change log for python 2.7.4 http://hg.python.org/cpython/file/9290822f2280/Misc/NEWS

unbit commented 11 years ago

are you using gcc 4.8 ? which distro ?

0x1997 commented 11 years ago

yes, it's gcc 4.8. I'm using archlinux 3.8.6 i686.

unbit commented 11 years ago

it is a bug with python and gcc 4.8, but i think i can add a workaround in 1.9.6 (will be released later today)

0x1997 commented 11 years ago

thanks. i just downgraded python to 2.7.3 and it works fine with gcc 4.8

unbit commented 11 years ago

you can bypass the problem for now using

CFLAGS="-Wno-format" pip install uwsgi

0x1997 commented 11 years ago

thanks.