vkholodkov/nginx-upload-module — Issue #26: 2.2.0 build problems on ubuntu 11.10
Author: benhoskings
Created: 2011-12-10 05:59:49+00:00
State: open

I just tried building on a fresh ubuntu-11.10 instance (on Rackspace) and got this error. It builds fine on 11.04 (gcc-4.5.2).

I also tried building the current head (5b5d008), but it fails with "ngx_garbage_collector_temp_handler undeclared" at `ngx_http_upload_module.c:1104:31` on both 11.04 and 11.10.

Here's the 2.2.0 output on 11.10:

root@host:~/build# tar -zxvf ~/downloads/nginx-1.0.10.tar.gz
root@host:~/build# tar -zxvf ~/downloads/nginx_upload_module-2.2.0.tar.gz
root@host:~/build# cd nginx-1.0.10/
root@host:~/build/nginx-1.0.10# ./configure --add-module=../nginx_upload_module-2.2.0
checking for OS
+ Linux 3.0.0-12-virtual x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

[...]

adding module in ../nginx_upload_module-2.2.0
+ ngx_http_upload_module was configured
checking for PCRE library ... found
checking for system md library ... not found
checking for system md5 library ... not found
checking for OpenSSL md5 crypto library ... found
checking for sha1 in system md library ... not found
checking for OpenSSL sha1 crypto library ... found
checking for zlib library ... found
creating objs/Makefile

Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1: using system crypto library
+ using system zlib library

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"

root@host:~/build/nginx-1.0.10# make
make -f objs/Makefile
make[1]: Entering directory `/root/build/nginx-1.0.10'
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/nginx.o \
src/core/nginx.c

[...]

gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
src/http/modules/ngx_http_upstream_ip_hash_module.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules -I src/mail \
-o objs/addon/nginx_upload_module-2.2.0/ngx_http_upload_module.o \
../nginx_upload_module-2.2.0/ngx_http_upload_module.c
../nginx_upload_module-2.2.0/ngx_http_upload_module.c: In function ‘ngx_http_upload_merge_ranges’:
../nginx_upload_module-2.2.0/ngx_http_upload_module.c:1681:18: error: variable ‘result’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[1]: *** [objs/addon/nginx_upload_module-2.2.0/ngx_http_upload_module.o] Error 1
make[1]: Leaving directory `/root/build/nginx-1.0.10'
make: *** [build] Error 2