[uWSGI] Warning in compiling uwsgi- with '-O2'

Roberto De Ioris roberto at unbit.it
Tue Jul 6 09:53:56 CEST 2010

Il giorno 30/giu/2010, alle ore 19.44, Leo Borisenko ha scritto:

> Hello.
> Recent version of uwsgi introduces '-Werror' in CFLAGS. In combination with additional '-O2' flag it breaks building with warning 'dereferencing type-punned pointer will break strict-aliasing rules' in protocol.c. Building log is attached.

I have investigated on this issue.

This is a python 2.x problem (fixed in python 3.x).

If you want to activate gcc optimization (-O3 -Os included) you have to add -fno-strict-aliasing.

I will add a note on the wiki about this

Roberto De Ioris
JID: roberto at jabber.unbit.it

More information about the uWSGI mailing list