Can't compile since 0.8.33 on CentOS

Now that I examine this, it’s treating warnings as errors. Ideally
this wouldn’t be a warning either, but what could be going on to make
this force fail?

0.8.33 = no problem
0.8.34 = problem
0.8.35 = problem

OS info:

Linux foo 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010
x86_64 x86_64 x86_64 GNU/Linux
CentOS 5.4 x86_64 all up to date

Where it breaks during “make”

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
/usr/include/libxml2 -I objs -I src/http -I src/http/modules
-o objs/src/http/modules/ngx_http_fastcgi_module.o
src/http/modules/ngx_http_fastcgi_module.c
cc1: warnings being treated as errors
src/http/modules/ngx_http_fastcgi_module.c: In function
‘ngx_http_fastcgi_process_header’:
src/http/modules/ngx_http_fastcgi_module.c:1104: warning: unused
variable ‘fh’
make[1]: *** [objs/src/http/modules/ngx_http_fastcgi_module.o] Error 1
make[1]: Leaving directory `/usr/src/build/nginx-0.8.35’

configure and output:

./configure --conf-path=/etc/nginx/nginx.conf --prefix=/usr
–user=www-data --group=www-data
–error-log-path=/var/log/nginx/error.log
–pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock
–http-log-path=/var/log/nginx/access.log
–http-client-body-temp-path=/var/lib/nginx/body
–http-proxy-temp-path=/var/lib/nginx/proxy
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi
–with-http_stub_status_module --with-openssl= --with-md5=
–with-http_gzip_static_module --without-mail_pop3_module
–without-mail_smtp_module --without-mail_imap_module
–without-http-cache --with-http_flv_module --with-http_ssl_module
–with-http_dav_module --with-http_realip_module
–with-http_xslt_module --with-debug
checking for OS

  • Linux 2.6.18-164.11.1.el5 x86_64
    checking for C compiler … found
  • using GNU C compiler
  • gcc version: 4.1.2 20080704 (Red Hat 4.1.2-46)
    checking for gcc -pipe switch … found
    checking for gcc builtin atomic operations … found
    checking for gcc variadic macros … found
    checking for C99 variadic macros … found
    checking for unistd.h … found
    checking for inttypes.h … found
    checking for limits.h … found
    checking for sys/filio.h … not found
    checking for sys/param.h … found
    checking for sys/mount.h … found
    checking for sys/statvfs.h … found
    checking for crypt.h … found
    checking for Linux specific features
    checking for epoll … found
    checking for sendfile() … found
    checking for sendfile64() … found
    checking for sys/prctl.h … found
    checking for prctl(PR_SET_DUMPABLE) … found
    checking for sched_setaffinity() … found
    checking for crypt_r() … found
    checking for sys/vfs.h … found
    checking for poll() … found
    checking for /dev/poll … not found
    checking for kqueue … not found
    checking for crypt() … not found
    checking for crypt() in libcrypt … found
    checking for F_READAHEAD … not found
    checking for posix_fadvise() … found
    checking for O_DIRECT … found
    checking for F_NOCACHE … not found
    checking for directio() … not found
    checking for statfs() … found
    checking for statvfs() … found
    checking for dlopen() … not found
    checking for dlopen() in libdl … found
    checking for sched_yield() … found
    checking for PCRE library … found
    auto/lib/openssl/conf: line 5: [: !=: unary operator expected
    checking for OpenSSL library … found
    checking for zlib library … found
    checking for libxslt … found
    checking for libexslt … found
    creating objs/Makefile
    auto/lib/make: line 9: [: too many arguments
    checking for int size … 4 bytes
    checking for long size … 8 bytes
    checking for long long size … 8 bytes
    checking for void * size … 8 bytes
    checking for uint64_t … found
    checking for sig_atomic_t … found
    checking for sig_atomic_t size … 4 bytes
    checking for socklen_t … found
    checking for in_addr_t … found
    checking for in_port_t … found
    checking for rlim_t … found
    checking for uintptr_t … uintptr_t found
    checking for system endianess … little endianess
    checking for size_t size … 8 bytes
    checking for off_t size … 8 bytes
    checking for time_t size … 8 bytes
    checking for setproctitle() … not found
    checking for pread() … found
    checking for pwrite() … found
    checking for strerror_r() … found but is not working
    checking for gnu style strerror_r() … found
    checking for sys_errlist[] … found
    checking for localtime_r() … found
    checking for posix_memalign() … found
    checking for memalign() … found
    checking for mmap(MAP_ANON|MAP_SHARED) … found
    checking for mmap("/dev/zero", MAP_SHARED) … found
    checking for System V shared memory … found
    checking for struct msghdr.msg_control … found
    checking for ioctl(FIONBIO) … found
    checking for struct tm.tm_gmtoff … found
    checking for struct dirent.d_namlen … not found
    checking for struct dirent.d_type … found

Configuration summary

  • using system PCRE library
  • using system OpenSSL library
  • using md5 library:
  • sha1 library is not used
  • using system zlib library

nginx path prefix: “/usr”
nginx binary file: “/usr/sbin/nginx”
nginx configuration prefix: “/etc/nginx”
nginx configuration file: “/etc/nginx/nginx.conf”
nginx pid file: “/var/run/nginx.pid”
nginx error log file: “/var/log/nginx/error.log”
nginx http access log file: “/var/log/nginx/access.log”
nginx http client request body temporary files: “/var/lib/nginx/body”
nginx http proxy temporary files: “/var/lib/nginx/proxy”
nginx http fastcgi temporary files: “/var/lib/nginx/fastcgi”

Please help. Thanks :slight_smile:

Hello!

On Thu, Apr 15, 2010 at 01:42:31PM -0700, Michael S. wrote:

Now that I examine this, it’s treating warnings as errors. Ideally
this wouldn’t be a warning either, but what could be going on to make
this force fail?

nginx uses -Werror by default

[…]

src/http/modules/ngx_http_fastcgi_module.c: In function
‘ngx_http_fastcgi_process_header’:
src/http/modules/ngx_http_fastcgi_module.c:1104: warning: unused variable ‘fh’
make[1]: *** [objs/src/http/modules/ngx_http_fastcgi_module.o] Error 1
make[1]: Leaving directory `/usr/src/build/nginx-0.8.35’

Known issue, --without-http-cache breaks this way. You may either
patch it (patch is trivial and was already posted here[1]) or just
compile it with cache.

[1] 0.8.35 compile error

Maxim D.

Michael S. ha scritto:

Linux foo 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010
src/http/modules/ngx_http_fastcgi_module.c
cc1: warnings being treated as errors
src/http/modules/ngx_http_fastcgi_module.c: In function
‘ngx_http_fastcgi_process_header’:
src/http/modules/ngx_http_fastcgi_module.c:1104: warning: unused variable ‘fh’
make[1]: *** [objs/src/http/modules/ngx_http_fastcgi_module.o] Error 1
make[1]: Leaving directory `/usr/src/build/nginx-0.8.35’

It’s an easy to fix buf.
You get the warning only when caching is disabled.

Regards Manlio

Ouch. Please fix this in 0.8.36 :slight_smile: heh

On Thu, Apr 15, 2010 at 2:18 PM, Manlio P.