Error compiling Nginx with mod_wsgi - ngx_wsgi missing initializer

Hello,

I’m compiling Nginx-0.6.38 + mod_wsgi.
I encountered 2 error, and I can’t solve the second one.

The versions of my software:

  • Fedora 11
  • Nginx 0.6.38
  • mod_wsgi (tip version, mod_wsgi-8994b058d2db)
  • GCC 4.4.1
  • Python 2.6

In the middle of my compilation. I first encountered this error:

cc1: warnings being treated as errors

…/mod_wsgi/src/ngx_http_wsgi_handler.c: In function
‘ngx_http_wsgi_handler’:
…/mod_wsgi/src/ngx_http_wsgi_handler.c:74: error: implicit declaration of
function ‘ngx_http_discard_body’
make[1]: *** [objs/addon/src/ngx_http_wsgi_handler.o] Error 1
make[1]: Leaving directory `/usr/local/src/nginx-0.6.38’
make: *** [build] Error 2

After some Googling, I solved it by changing the line 74 into this:

rc = ngx_http_discard_request_body®; // rc =
ngx_http_discard_body®;

And this is solved.

However, I encountered a secound error:

cc1: warnings being treated as errors

…/mod_wsgi/src/ngx_wsgi.c:1250: error: (near initialization for
‘Queue_Type.tp_version_tag’)
…/mod_wsgi/src/ngx_wsgi.c:1407: error: missing initializer
…/mod_wsgi/src/ngx_wsgi.c:1407: error: (near initialization for
‘Connection_Type.tp_version_tag’)
make[1]: *** [objs/addon/src/ngx_wsgi.o] Error 1
make[1]: Leaving directory `/usr/src/nginx-0.6.38’
make: *** [build] Error 2

Which, I found no solution with Google.
Any suggestion? Please help.

Koala Yeung

They introduced tp_version_tag in Python 2.6 so I guess the following
patch
should work

http://n2.nabble.com/file/n4600653/patch_mod_wsgi_python2.6
patch_mod_wsgi_python2.6

View this message in context:
http://n2.nabble.com/Error-compiling-Nginx-with-mod-wsgi-ngx-wsgi-missing-initializer-tp3669793p4600653.html
Sent from the nginx mailing list archive at Nabble.com.