# Error compiling Nginx with mod\_wsgi - ngx\_wsgi missing initializer

**URL:** <https://www.ruby-forum.com/t/error-compiling-nginx-with-mod-wsgi-ngx-wsgi-missing-initializer/175728>\
**Category:** NGINX\
**Created:** [September 18, 2009, 2:38pm UTC](https://www.ruby-forum.com/t/error-compiling-nginx-with-mod-wsgi-ngx-wsgi-missing-initializer/175728 "2009-09-18T14:38:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shu\_Hung\_SKoala](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e8c25b/32.png) [@Shu\_Hung\_SKoala](https://www.ruby-forum.com/u/Shu_Hung_SKoala)\
**Post date:** [September 18, 2009, 2:38pm UTC](https://www.ruby-forum.com/t/error-compiling-nginx-with-mod-wsgi-ngx-wsgi-missing-initializer/175728/1 "2009-09-18T14:38:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Shu\_Hung\_SKoala](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e8c25b/32.png) [@Shu\_Hung\_SKoala](https://www.ruby-forum.com/u/Shu_Hung_SKoala)\
**Post date:** [February 20, 2010, 5:19pm UTC](https://www.ruby-forum.com/t/error-compiling-nginx-with-mod-wsgi-ngx-wsgi-missing-initializer/175728/2 "2010-02-20T17:19:50Z")

</div>

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](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](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](http://Nabble.com).
