Can you please help me overcome this problem. I’m trying to compile
Nginx + nginx_udplog_module
from source but I get this error: cc1: warnings being treated as
errors
I tried with nginx-1.0.0 the version in our production servers and *
nginx-1.0.12* the latest stable version.
Best Regards
Compilation env:
CentOS release 5.7 (Final) uname -a
Linux 2.6.18-274.18.1.el5 #1 SMP Thu Feb 9 12:45:44 EST 2012 x86_64
x86_64
x86_64 GNU/Linux
Linux 2.6.18-274.18.1.el5 x86_64
checking for C compiler … found
using GNU C compiler
gcc version: 4.1.2 20080704 (Red Hat 4.1.2-51)
checking for gcc -pipe switch … found
checking for gcc builtin atomic operations … found
checking for C99 variadic macros … found
checking for gcc 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 SO_SETFIB … not found
checking for accept4() … not found
checking for kqueue AIO support … not found
checking for Linux AIO support … found
configuring additional modules
adding module in /root/nginx_udplog_module-1.0.0
ngx_http_udplog_module was configured
checking for PCRE library … found
checking for OpenSSL library … found
checking for zlib library … found
checking for libxslt … found
checking for libexslt … found
checking for GD library … found
checking for perl
perl version: v5.8.8 built for x86_64-linux-thread-multi
perl interpreter multiplicity found
checking for GeoIP library … found
creating objs/Makefile
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 AF_INET6 … found
checking for setproctitle() … not found
checking for pread() … found
checking for pwrite() … found
checking for sys_nerr … 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
On Mon, Feb 27, 2012 at 02:48:06PM +0000, Iqbal A. wrote:
Hi,
Can you please help me overcome this problem. I’m trying to compile
Nginx + nginx_udplog_module
from source but I get this error: cc1: warnings being treated as errors
I tried with nginx-1.0.0 the version in our production servers and *
nginx-1.0.12* the latest stable version.
I.e. warning options set by nginx (notably “-Wall …
-Wno-unused-parameter”) are overriden by your “-Wall” which comes
later, and this results in compilation failure due to “-Werror”
also set by nginx.
Not passing “-Wall” by hand will fix this while still ensure that
warnings unexpected in the nginx source code will be fatal.
I was able to compile nginx alone without problems. however it doesn’t
compile when I add nginx_udplog_module-1.0.0 support “*
–add-module=/root/nginx_udplog_module-1.0.0*”
any hints ?
Best Regards
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -O2 -g
-pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
–param=ssp-buffer-size=4 -m64 -mtune=generic -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 -I src/http/modules/perl -I src/mail
-o objs/addon/nginx_udplog_module-1.0.0/ngx_http_udplog_module.o
/root/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c
/root/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c: In function
ngx_udplog_init_endpoint:
/root/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c:284: error:
incompatible types in assignment
/root/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c: In function
ngx_http_udplogger_send:
/root/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c:338: error:
invalid type argument of ->
/root/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c:338: error:
incompatible type for argument 2 of ngx_log_error_core
make[1]: ***
[objs/addon/nginx_udplog_module-1.0.0/ngx_http_udplog_module.o] Error 1
make[1]: Leaving directory `/root/nginx-1.0.12’
make: *** [build] Error 2
Thanks for your reply.
Actually as I was asked to ad support for the nginx_udplog_module
module
I copied the configuration options from nginx -V output.
I really appreciate your advise and I’ll give it a try right away.
Im getting following error while add new module
nginx_udplog_module-1.0.0
after nginx installation. Please
Note : nginx version nginx-1.0.4.tar.gz
.
/root/SETUP-PACKAGE-BCK/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c:
In function ‘ngx_udplog_init_endpoint’:
/root/SETUP-PACKAGE-BCK/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c:284:
error: incompatible types in assignment
/root/SETUP-PACKAGE-BCK/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c:
In function ‘ngx_http_udplogger_send’:
/root/SETUP-PACKAGE-BCK/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c:338:
error: invalid type argument of ‘->’
/root/SETUP-PACKAGE-BCK/nginx_udplog_module-1.0.0/ngx_http_udplog_module.c:338:
error: incompatible type for argument 2 of ‘ngx_log_error_core’
make[1]: ***
[objs/addon/nginx_udplog_module-1.0.0/ngx_http_udplog_module.o]
Error 1
make[1]: Leaving directory `/root/nginx-1.0.4’
make: *** [build] Error 2