# Error building nginx 1.5.3 on Cygwin

**URL:** <https://www.ruby-forum.com/t/error-building-nginx-1-5-3-on-cygwin/245973>\
**Category:** NGINX\
**Created:** [August 3, 2013, 3:17am UTC](https://www.ruby-forum.com/t/error-building-nginx-1-5-3-on-cygwin/245973 "2013-08-03T03:17:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [August 3, 2013, 3:17am UTC](https://www.ruby-forum.com/t/error-building-nginx-1-5-3-on-cygwin/245973/1 "2013-08-03T03:17:52Z")

</div>

Hello,

I’m trying to build nginx 1.5.3 on Cygwin using Windows 7. I see the  
following output during “make”:

cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror  
-g  
-D FD\_  
SETSIZE=2048 -I src/core -I src/event -I src/event/modules -I  
src/os/unix  
-I ~/o  
penssl-0.9.8l/.openssl/include -I objs   
-o objs/src/core/ngx\_output\_chain.o   
src/core/ngx\_output\_chain.c  
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror  
-g  
-D FD\_  
SETSIZE=2048 -I src/core -I src/event -I src/event/modules -I  
src/os/unix  
-I ~/o  
penssl-0.9.8l/.openssl/include -I objs   
-o objs/src/core/ngx\_string.o   
src/core/ngx\_string.c  
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror  
-g  
-D FD\_  
SETSIZE=2048 -I src/core -I src/event -I src/event/modules -I  
src/os/unix  
-I ~/o  
penssl-0.9.8l/.openssl/include -I objs   
-o objs/src/core/ngx\_parse.o   
src/core/ngx\_parse.c  
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror  
-g  
-D FD\_  
SETSIZE=2048 -I src/core -I src/event -I src/event/modules -I  
src/os/unix  
-I ~/o  
penssl-0.9.8l/.openssl/include -I objs   
-o objs/src/core/ngx\_inet.o   
src/core/ngx\_inet.c  
cc1: warnings being treated as errors  
src/core/ngx\_inet.c: In function `ngx_sock_ntop': src/core/ngx_inet.c:236: error: comparison between signed and unsigned make[1]: *** [objs/src/core/ngx_inet.o] Error 1 make[1]: Leaving directory`/home/kworthington/nginx-1.5.3’  
make: \*\*\* [build] Error 2

I would appreciate any help to fix this. Thank you!

Best regards,  
Kevin

---

<div class="post-metadata">

**Author:** ![inspire22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a4c791/32.png) [@inspire22](https://www.ruby-forum.com/u/inspire22)\
**Post date:** [August 3, 2013, 12:47pm UTC](https://www.ruby-forum.com/t/error-building-nginx-1-5-3-on-cygwin/245973/2 "2013-08-03T12:47:59Z")

</div>

Hello!

On Fri, Aug 02, 2013 at 09:17:03PM -0400, Kevin W. wrote:

> I’m trying to build nginx 1.5.3 on Cygwin using Windows 7. I see the  
> following output during “make”:

[…]

> cc1: warnings being treated as errors  
> src/core/ngx\_inet.c: In function `ngx_sock_ntop': src/core/ngx_inet.c:236: error: comparison between signed and unsigned make[1]: *** [objs/src/core/ngx_inet.o] Error 1 make[1]: Leaving directory `/home/kworthington/nginx-1.5.3’  
> make: \*\*\* [build] Error 2
> 
> I would appreciate any help to fix this. Thank you!

Looks like socklen\_t is signed in your environment, which results  
in a warning. Try the following patch:

— a/src/core/ngx\_inet.c  
+++ b/src/core/ngx\_inet.c  
@@ -233,7 +233,7 @@ ngx\_sock\_ntop(struct sockaddr \*sa,

```
     /* on Linux sockaddr might not include sun_path at all */

```

- 

```
   if (socklen <= offsetof(struct sockaddr_un, sun_path)) {

```

- 

```
   if (socklen <= (socklen_t) offsetof(struct sockaddr_un, 

```

sun\_path)) {  
p = ngx\_snprintf(text, len, “unix:%Z”);

```
     } else {

```

Alternatively, you may just ignore the warning, it’s harmless.

–  
Maxim D.

> **[nginx: donation](http://nginx.org/en/donation.html)**

---

<div class="post-metadata">

**Author:** ![inspire22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a4c791/32.png) [@inspire22](https://www.ruby-forum.com/u/inspire22)\
**Post date:** [August 5, 2013, 9:42am UTC](https://www.ruby-forum.com/t/error-building-nginx-1-5-3-on-cygwin/245973/3 "2013-08-05T09:42:59Z")

</div>

Hello!

On Sat, Aug 03, 2013 at 12:31:54PM -0400, Kevin W. wrote:

> Hi Maxim,
> 
> Thanks so much. Your patch worked great.
> 
> The build was failing without that change.
> 
> Is there any way that patch can be incorporated into the main source, so  
> that it doesn’t happen again in 1.5.4?

Sure, committed. Thanks for testing.

–  
Maxim D.

> **[nginx: donation](http://nginx.org/en/donation.html)**

---

<div class="post-metadata">

**Author:** ![inspire22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a4c791/32.png) [@inspire22](https://www.ruby-forum.com/u/inspire22)\
**Post date:** [August 3, 2013, 6:32pm UTC](https://www.ruby-forum.com/t/error-building-nginx-1-5-3-on-cygwin/245973/4 "2013-08-03T18:32:39Z")

</div>

Hi Maxim,

Thanks so much. Your patch worked great.

The build was failing without that change.

Is there any way that patch can be incorporated into the main source, so  
that it doesn’t happen again in 1.5.4?

Thanks again, I really appreciate it.

## Best regards, Kevin

Kevin W.

> **[Kevin Worthington](https://kevinworthington.com/)**
>
> Practical Tech Guides, Troubleshooting, and Insights on the Modern Internet

[http://twitter.com/kworthington](http://twitter.com/kworthington)

---

<div class="post-metadata">

**Author:** ![inspire22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a4c791/32.png) [@inspire22](https://www.ruby-forum.com/u/inspire22)\
**Post date:** [August 5, 2013, 2:32pm UTC](https://www.ruby-forum.com/t/error-building-nginx-1-5-3-on-cygwin/245973/5 "2013-08-05T14:32:09Z")

</div>

Hi Maxim,

Thanks for committing that. And again for your help.

## Cheers, Kevin

Kevin W.

> **[Kevin Worthington](https://kevinworthington.com/)**
>
> Practical Tech Guides, Troubleshooting, and Insights on the Modern Internet

[http://twitter.com/kworthington](http://twitter.com/kworthington)
