# Compilation error on CentOS-5.7

**URL:** <https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300>\
**Category:** NGINX\
**Created:** [February 27, 2012, 3:49pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300 "2012-02-27T15:49:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 27, 2012, 3:49pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/1 "2012-02-27T15:49:08Z")

</div>

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.

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

_gcc -v_  
Using built-in specs.  
Target: x86\_64-redhat-linux  
Configured with: …/configure --prefix=/usr --mandir=/usr/share/man  
–infodir=/usr/share/info --enable-shared --enable-threads=posix  
–enable-checking=release --with-system-zlib --enable-\_\_cxa\_atexit  
–disable-libunwind-exceptions --enable-libgcj-multifile  
–enable-languages=c,c++,objc,obj-c++,java,fortran,ada  
–enable-java-awt=gtk --disable-dssi --disable-plugin  
–with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre  
–with-cpu=generic  
–host=x86\_64-redhat-linux  
Thread model: posix  
gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)

_Configure options:_  
./configure --user=nginx --group=nginx --prefix=/usr/share/nginx  
–sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf  
–error-log-path=/var/log/nginx/error.log  
–http-log-path=/var/log/nginx/access.log  
–http-client-body-temp-path=/var/lib/nginx/tmp/client\_body  
–http-proxy-temp-path=/var/lib/nginx/tmp/proxy  
–http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi  
–http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi  
–http-scgi-temp-path=/var/lib/nginx/tmp/scgi  
–pid-path=/var/run/nginx.pid  
–lock-path=/var/lock/subsys/nginx --with-http\_ssl\_module  
–with-http\_realip\_module --with-http\_addition\_module  
–with-http\_xslt\_module --with-http\_image\_filter\_module  
–with-http\_geoip\_module --with-http\_sub\_module --with-http\_dav\_module  
–with-http\_flv\_module --with-http\_gzip\_static\_module  
–with-http\_random\_index\_module --with-http\_secure\_link\_module  
–with-http\_degradation\_module --with-http\_stub\_status\_module  
–with-http\_perl\_module --with-mail --with-file-aio  
–with-mail\_ssl\_module  
–with-ipv6 --with-cc-opt=’-O2 -g -pipe -Wall -Wp,-D\_FORTIFY\_SOURCE=2  
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64  
-mtune=generic’ --with-cc-opt=’-O2 -g -pipe -Wall  
-Wp,-D\_FORTIFY\_SOURCE=2  
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64  
-mtune=generic’ --add-module=/root/nginx\_udplog\_module-1.0.0

_Output:_  
checking for OS

- 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

Configuration summary

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

nginx path prefix: “/usr/share/nginx”  
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/tmp/client\_body”  
nginx http proxy temporary files: “/var/lib/nginx/tmp/proxy”  
nginx http fastcgi temporary files: “/var/lib/nginx/tmp/fastcgi”  
nginx http uwsgi temporary files: “/var/lib/nginx/tmp/uwsgi”  
nginx http scgi temporary files: “/var/lib/nginx/tmp/scgi”

_Make:_  
make -f objs/Makefile  
make[1]: Entering directory `/root/nginx-1.0.0' gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -O2 -g -pipe -Wall -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 \ -o objs/src/core/nginx.o \ src/core/nginx.c cc1: warnings being treated as errors src/core/nginx.c: In function ngx_set_user: src/core/nginx.c:1105: warning: unused parameter cmd src/core/nginx.c: In function ngx_set_env: src/core/nginx.c:1168: warning: unused parameter cmd src/core/nginx.c: In function ngx_set_priority: src/core/nginx.c:1198: warning: unused parameter cmd src/core/nginx.c: In function ngx_set_cpu_affinity: src/core/nginx.c:1238: warning: unused parameter cmd make[1]: *** [objs/src/core/nginx.o] Error 1 make[1]: Leaving directory`/root/nginx-1.0.0’  
make: \*\*\* [build] Error 2

_Sincerely yours_  
_–_  
_Iqbal A._  
_+212 665 025 032_  
_removed\_email\_address@domain.invalid_

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 3:51pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/2 "2012-02-27T15:51:36Z")

</div>

Hello,  
This is because nginx is compiled with the -Werror flag, remove this  
from  
your objs/Makefile file, and you should be fine.

Regards,

Adam  
Adam LANDAS | Operations | ChinaNetCloud | [www.ChinaNetCloud.com](http://www.ChinaNetCloud.com)  
Phone: +86 (21) 6422-1946 | removed\_email\_address@domain.invalid | Skype:  
adamlandas  
X2 Space 1-601, 1238 Xietu Lu, Shanghai 200032, China  
OnDemand 2011 “100 Top Private Company” - We are hiring!  
[www.chinanetcloud.com/jobs](http://www.chinanetcloud.com/jobs)

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 3:53pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/3 "2012-02-27T15:53:28Z")

</div>

Hello,  
This is because nginx is compiled with the -Werror flag, remove this  
from your objs/Makefile file, and you should be fine.

Posted at Nginx Forum:

> **[Re: Compilation error on CentOS-5.7](https://forum.nginx.org/read.php?2,223048,223050#msg-223050)**
>
> 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 \*...

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 4:00pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/4 "2012-02-27T16:00:57Z")

</div>

Hi Adam,

Awesome, Thank you so much. worked great.

Best Regards  
\*

–  
\*  
_Iqbal A._  
_+212 665 025 032_  
_removed\_email\_address@domain.invalid_

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 4:17pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/5 "2012-02-27T16:17:47Z")

</div>

2012/2/27 Maxim D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > –with-ipv6 --with-cc-opt=‘-O2 -g -pipe -Wall -Wp,-D\_FORTIFY\_SOURCE=2  
> > -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64  
> > -mtune=generic’ --with-cc-opt=‘-O2 -g -pipe -Wall -Wp,-D\_FORTIFY\_SOURCE=2  
> > -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64  
> > -mtune=generic’ --add-module=/root/nginx\_udplog\_module-1.0.0
> 
> You shoot yourself in the foot by using --with-cc-opt=“… -Wall  
> …”. This results in:

For few seconds I thought this was error report from gentooland.

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 4:12pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/6 "2012-02-27T16:12:08Z")

</div>

Hello!

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.

[…]

> –with-ipv6 --with-cc-opt=‘-O2 -g -pipe -Wall -Wp,-D\_FORTIFY\_SOURCE=2  
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64  
> -mtune=generic’ --with-cc-opt=‘-O2 -g -pipe -Wall -Wp,-D\_FORTIFY\_SOURCE=2  
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64  
> -mtune=generic’ --add-module=/root/nginx\_udplog\_module-1.0.0

You shoot yourself in the foot by using --with-cc-opt=“… -Wall  
…”. This results in:

> gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter  
> -Wunused-function -Wunused-variable -Wunused-value -Werror -g -O2 -g -pipe  
> -Wall -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   
> -o objs/src/core/nginx.o   
> src/core/nginx.c

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.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 4:42pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/7 "2012-02-27T16:42:02Z")

</div>

Hi Maxim,

Thanks a lot for your expertise. I removed the _-Wall_ option and  
everything worked perfectly, without the need to remove _-Werror_

Best Regards.  
Really appreciate your support.

_–_  
_Iqbal A._  
_+212 665 025 032_  
_removed\_email\_address@domain.invalid_

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 4:51pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/8 "2012-02-27T16:51:58Z")

</div>

Hi,

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

- 

–  
\*  
_Iqbal A._  
_+212 665 025 032_  
_removed\_email\_address@domain.invalid_

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 5:11pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/9 "2012-02-27T17:11:14Z")

</div>

Hi,

On Mon, Feb 27, 2012 at 11:51 PM, Iqbal A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> -Wunused-function -Wunused-variable -Wunused-value -Werror -g -O2 -g -pipe  
> /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

If you need the syslog feature, maybe you can give Tengine (  
[http://tengine.taobao.org](http://tengine.taobao.org)) a try? It is a nginx distribution with native  
syslog support: [ngx\_http\_log\_module - The Tengine Web Server](http://tengine.taobao.org/document/http_log.html)

Regards,

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 5:16pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/10 "2012-02-27T17:16:11Z")

</div>

Hello!

On Mon, Feb 27, 2012 at 03:51:09PM +0000, Iqbal A. wrote:

> -Wunused-function -Wunused-variable -Wunused-value -Werror -g -O2 -g -pipe  
> /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

It looks like the udplog module version you are using is way too  
old and doesn’t contain this 2 years old fix for and API change  
in nginx 0.8.32:

> <https://github.com/vkholodkov/nginx-udplog-module/commit/e7b8145b96ae9f5be94f0ab0008a8c59cd13c7b8>

You may want to get more recent one from Valery’s github.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 4:29pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/11 "2012-02-27T16:29:00Z")

</div>

Hi Maxim,

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.

Best Regards

nginx -V  
nginx: nginx version: nginx/1.0.0  
nginx: built by gcc 4.1.2 20080704 (Red Hat 4.1.2-50)  
nginx: TLS SNI support disabled  
nginx: configure arguments: --user=nginx --group=nginx  
–prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx  
–conf-path=/etc/nginx/nginx.conf  
–error-log-path=/var/log/nginx/error.log  
–http-log-path=/var/log/nginx/access.log  
–http-client-body-temp-path=/var/lib/nginx/tmp/client\_body  
–http-proxy-temp-path=/var/lib/nginx/tmp/proxy  
–http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi  
–http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi  
–http-scgi-temp-path=/var/lib/nginx/tmp/scgi  
–pid-path=/var/run/nginx.pid  
–lock-path=/var/lock/subsys/nginx --with-http\_ssl\_module  
–with-http\_realip\_module --with-http\_addition\_module  
–with-http\_xslt\_module --with-http\_image\_filter\_module  
–with-http\_geoip\_module --with-http\_sub\_module --with-http\_dav\_module  
–with-http\_flv\_module --with-http\_gzip\_static\_module  
–with-http\_random\_index\_module --with-http\_secure\_link\_module  
–with-http\_degradation\_module --with-http\_stub\_status\_module  
–with-http\_perl\_module --with-mail --with-file-aio  
–with-mail\_ssl\_module  
–with-ipv6 --with-cc-opt=’-O2 -g -pipe -Wall -Wp,-D\_FORTIFY\_SOURCE=2  
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64  
-mtune=generic’ --with-cc-opt=’-O2 -g -pipe -Wall  
-Wp,-D\_FORTIFY\_SOURCE=2  
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64  
-mtune=generic’  
\*

–  
\*  
_Iqbal A._  
_+212 665 025 032_  
_removed\_email\_address@domain.invalid_

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [September 25, 2013, 9:48am UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/12 "2013-09-25T09:48:10Z")

</div>

Hi,

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

Thanks,  
PradeeMohan

Posted at Nginx Forum:

> **[Re: Compilation error on CentOS-5.7](https://forum.nginx.org/read.php?2,223048,243119#msg-243119)**
>
> 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 \*...

---

<div class="post-metadata">

**Author:** ![Iqbal\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c37758/32.png) [@Iqbal\_A](https://www.ruby-forum.com/u/Iqbal_A)\
**Post date:** [February 27, 2012, 5:26pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300/13 "2012-02-27T17:26:05Z")

</div>

Hi Maxim,

it worked great, you saved my day you’re a great guy.

Bestest Regards  
\*

–  
\*  
_Iqbal A._  
_+212 665 025 032_  
_removed\_email\_address@domain.invalid_
