Error compiling Nginx with mod_wsgi - ngx_wsgi missing initializer

Shu Hung (Koala) koalay at gmail.com
Fri Sep 18 16:25:48 MSD 2009


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(r);   // rc = ngx_http_discard_body(r);
>

And this is solved.



However, I encountered a secound error:

cc1: warnings being treated as errors
> ../mod_wsgi/src/ngx_wsgi.c:291: error: missing initializer
> ../mod_wsgi/src/ngx_wsgi.c:291: error: (near initialization for
> ‘Log_Type.tp_version_tag’)
> ../mod_wsgi/src/ngx_wsgi.c:455: error: missing initializer
> ../mod_wsgi/src/ngx_wsgi.c:455: error: (near initialization for
> ‘Stream_Type.tp_version_tag’)
> ../mod_wsgi/src/ngx_wsgi.c:1148: error: missing initializer
> ../mod_wsgi/src/ngx_wsgi.c:1148: error: (near initialization for
> ‘State_Type.tp_version_tag’)
> ../mod_wsgi/src/ngx_wsgi.c:1250: error: missing initializer
> ../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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090918/663b7961/attachment.html>


More information about the nginx mailing list