Question about using MinGW GCC on Cygwin

Corinna Vinschen
Tue Dec 9 10:58:00 GMT 2014

On Dec  9 10:48, 陳韋任 (Wei-Ren Chen) wrote:
> Hi All,
>   I am trying to build gdbserver [1] on cygwin with mingw-gcc, since
> I want to build native windows executable and cygwin-gcc doesn't
> support "-mno-cygwin" any more. Here is how I do the config,
> $ cd gdb-7.8.1/gdb/gdbserver
> $ CC=i686-pc-mingw32-gcc ./configure
> After `make`, I get the error message below,
> --------
> i686-pc-mingw32-gcc -g -O2    -I. -I. -I./../common -I./../regformats -I./.. -I./../../include -I./../gnulib/import
> -Ibuild-gnulib-gdbserver/import -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body
> -DGDBSERVER -c -o remote-utils.o -MT remote-utils.o -MMD -MP -MF .deps/remote-utils.Tpo remote-utils.c
> remote-utils.c: In function 'handle_accept_event':
> remote-utils.c:161:22: error: storage size of 'sockaddr' isn't known
> --------
> It seems that mingw-gcc fails to find struct sockaddr due to the
> incorrect include search path. What am I missing here, or should
> I fall back to use MingGW instead?

You should try to use the mingw64-i686 cross compiler instead.
Mingw32 is a dead duck.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the Cygwin mailing list