Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here is the module I am unable to install:

http://www.grid.net.ru/nginx/eval.en.html

Here are the errors I am getting:

/root/src/nginx_eval_module-1.0.1/ngx_http_eval_module.c: In function ‘ngx_http_eval_block’:
/root/src/nginx_eval_module-1.0.1/ngx_http_eval_module.c:531:39: error: variable ‘pclcf’ set but not used [-Werror=unused-but-set-variable]
/root/src/nginx_eval_module-1.0.1/ngx_http_eval_module.c:522:32: error: variable ‘ecf’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/nginx_eval_module-1.0.1/ngx_http_eval_module.o] Error 1
make[1]: Leaving directory `/root/src/nginx-1.2.7'
make: *** [build] Error 2

./configure

./configure --user=nginx --group=nginx --prefix=/usr/local/nginx-1.2.7 --with-http_ssl_module --with-http_addition_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-pcre-jit --add-module=/root/src/nginx-upload-module-2.2m --add-module=/root/src/nginx-upload-progress-module --with-http_stub_status_module --add-module=/root/src/ngx_http_php_session --add-module=/root/src/ngx_http_redis-0.3.6 --add-module=/root/src/echo-nginx-module --add-module=/root/src/nginx_eval_module-1.0.1

My version of NGiNX is 1.2.7.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The warnings looks not critical, so it should be safe to remove "-Werror" from your compiler options and try again.

share|improve this answer
    
How do I remove the -Werror? And what is causing it? –  jnbdz May 15 '13 at 15:17
    
it should be somewhere inside the makefile - usually set in a variable named "CFLAGS". the cause for the warnings is: bad code –  Pascal Schmiel May 15 '13 at 15:26
    
In my nginx 1.4.1 it is located in objs/Makefile and then defined in the 2nd line - just remove -Werror and try again. –  Pascal Schmiel May 15 '13 at 15:31
    
Weird. Every time I remove -Werror from objs/Makefile and then do the make command it comes back... Why? Is there another way? –  jnbdz May 15 '13 at 19:01
    
Solved it. You just need to remove the -Werror but only after ./configure was set. Because that command will re-create the Makefile. And then just do the make && make install command. –  jnbdz May 15 '13 at 20:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.