In auto/cc/gcc, you have:
CFLAGS="$CFLAGS -Werror"
and
CFLAGS="$CFLAGS -Wunused-variable"
so when building 1.0.2+ you receive this error:
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -O2 -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/event/ngx_event_openssl.o
src/event/ngx_event_openssl.c
src/event/ngx_event_openssl.c: In function ‘ngx_ssl_get_cached_session’:
src/event/ngx_event_openssl.c:1690:31: error: variable ‘c’ set but not
used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [objs/src/event/ngx_event_openssl.o] Error 1
OQOQOQ
June 30, 2011, 1:23pm
2
On Thu, Jun 30, 2011 at 4:42 AM, OQ [email protected] wrote:
In auto/cc/gcc, you have:
CFLAGS=“$CFLAGS -Werror”
Try 1.0.4?
Cheers,
-agentzh
OQOQOQ
June 30, 2011, 2:07pm
3
Hello!
On Thu, Jun 30, 2011 at 07:22:43PM +0800, agentzh wrote:
On Thu, Jun 30, 2011 at 4:42 AM, OQ [email protected] wrote:
In auto/cc/gcc, you have:
CFLAGS=“$CFLAGS -Werror”
Try 1.0.4?
Won’t help.
Maxim D.
OQOQOQ
June 30, 2011, 2:08pm
4
Hello!
On Thu, Jun 30, 2011 at 04:06:37PM +0400, Maxim D. wrote:
[…]
Yes, thank you for report (though it’s about gcc 4.6+, not about
nginx 1.0.2+). Try the attached patch.
Oops, forgot to actually attach patch. Let me try again.
Maxim D.
OQOQOQ
June 30, 2011, 2:07pm
5
Hello!
On Wed, Jun 29, 2011 at 03:42:26PM -0500, OQ wrote:
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -O2 -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/event/ngx_event_openssl.o
src/event/ngx_event_openssl.c
src/event/ngx_event_openssl.c: In function ‘ngx_ssl_get_cached_session’:
src/event/ngx_event_openssl.c:1690:31: error: variable ‘c’ set but not
used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [objs/src/event/ngx_event_openssl.o] Error 1
Yes, thank you for report (though it’s about gcc 4.6+, not about
nginx 1.0.2+). Try the attached patch.
Obvious workaround is to use
./configure --with-cc-opt="-Wno-unused-but-set-variable"
Maxim D.
OQOQOQ
June 30, 2011, 6:04pm
6
Hello!
On Thu, Jun 30, 2011 at 09:43:18AM -0500, OQ wrote:
Just throwing that data point out there.
1.0.1 will fail with gcc 4.6 as well, when built without
–with-debug option and with ssl.
Maxim D.
OQOQOQ
June 30, 2011, 4:44pm
7
On Thu, Jun 30, 2011 at 7:06 AM, Maxim D. [email protected]
wrote:
Hello!
Yes, thank you for report (though it’s about gcc 4.6+, not about
nginx 1.0.2+). Try the attached patch.
Yea I realized that after I sent it, but forgot to send the followup.
I’m currently running 1.0.1 built with gcc 4.6.0 and it builds fine,
but 1.0.1 also fails to build in 4.6.1.
Just throwing that data point out there.