Hi,
I have binaries for gcc-4.4.4 20100208 and gcc-4.6.0 20100414
(cross-compilers).
The former builds libssh2-1.2.6 fine (in msys shell), but the latter
doesn't.
The errors produced by 4.6.0 (during the 'make' stage) are attached in
m.txt.
Any ideas on how this change of behaviour from one compiler to the other has
come about ?
The first error is:
libssh2_priv.h: In function 'writev':
libssh2_priv.h:121:24: error: 'LPWSABUF' undeclared (first use in this
function)
libssh2_priv.h:121:24: note: each undeclared identifier is reported only
once for each function it appears in
I can get rid of that error by #include'ing winsock2.h near the beginning of
libssh2_priv.h (immediately after windows.h has been #include'd) ... but
that doesn't help with the subsequent "redefinition" and "conflicting types"
errors.
Cheers,
Rob
Making all in src
make[1]: Entering directory `/c/_32/comp/libssh2-1.2.6/src'
make all-am
make[2]: Entering directory `/c/_32/comp/libssh2-1.2.6/src'
if /bin/sh ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H
-I../include -I../src -I/usr/local/include -I/usr/local/ssl/include
-DWINSOCK_VERSION=0x0200 -MT channel.lo -MD -MP -MF ".deps/channel.Tpo" -c -o
channel.lo channel.c; \
then mv -f ".deps/channel.Tpo" ".deps/channel.Plo"; else rm -f
".deps/channel.Tpo"; exit 1; fi
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I../include -I../src
-I/usr/local/include -I/usr/local/ssl/include -DWINSOCK_VERSION=0x0200 -MT
channel.lo -MD -MP -MF .deps/channel.Tpo -c channel.c -o channel.o
In file included from channel.c:41:0:
libssh2_priv.h: In function 'writev':
libssh2_priv.h:121:24: error: 'LPWSABUF' undeclared (first use in this function)
libssh2_priv.h:121:24: note: each undeclared identifier is reported only once
for each function it appears in
libssh2_priv.h:121:33: error: expected ')' before 'iov'
In file included from libssh2_priv.h:138:0,
from channel.c:41:
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h: At top
level:
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:50:18:
error: redefinition of 'struct fd_set'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:24:16: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:53:5: error:
conflicting types for 'fd_set'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:27:3: note:
previous declaration of 'fd_set' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:55:21:
error: conflicting types for '__WSAFDIsSet'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:33:21: note:
previous declaration of '__WSAFDIsSet' was here
In file included from libssh2_priv.h:138:0,
from channel.c:41:
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:96:10:
error: redefinition of 'struct hostent'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:78:8: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:104:10:
error: redefinition of 'struct netent'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:86:8: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:111:10:
error: redefinition of 'struct servent'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:93:8: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:123:10:
error: redefinition of 'struct protoent'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:105:8: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:236:10:
error: redefinition of 'struct sockaddr_in'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:199:8: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:246:18:
error: redefinition of 'struct WSAData'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:209:16: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:262:5:
error: conflicting types for 'WSADATA'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:225:3: note:
previous declaration of 'WSADATA' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:262:14:
error: conflicting types for 'LPWSADATA'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:227:18: note:
previous declaration of 'LPWSADATA' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:349:10:
error: redefinition of 'struct sockaddr'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:327:8: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:369:10:
error: redefinition of 'struct sockproto'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:332:8: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:402:10:
error: redefinition of 'struct linger'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:363:8: note:
originally defined here
In file included from libssh2_priv.h:138:0,
from channel.c:41:
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:870:27:
error: conflicting types for 'SOCKADDR'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:570:25: note:
previous declaration of 'SOCKADDR' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:871:28:
error: conflicting types for 'PSOCKADDR'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:571:26: note:
previous declaration of 'PSOCKADDR' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:872:28:
error: conflicting types for 'LPSOCKADDR'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:572:26: note:
previous declaration of 'LPSOCKADDR' was here
In file included from libssh2_priv.h:138:0,
from channel.c:41:
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1292:37:
error: conflicting types for 'accept'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:503:17: note:
previous declaration of 'accept' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1293:34:
error: conflicting types for 'bind'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:504:14: note:
previous declaration of 'bind' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1295:34:
error: conflicting types for 'connect'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:506:14: note:
previous declaration of 'connect' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1297:34:
error: conflicting types for 'getpeername'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:508:14: note:
previous declaration of 'getpeername' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1298:34:
error: conflicting types for 'getsockname'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:509:14: note:
previous declaration of 'getsockname' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1308:34:
error: conflicting types for 'recvfrom'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:519:14: note:
previous declaration of 'recvfrom' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1309:34:
error: conflicting types for 'select'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:520:14: note:
previous declaration of 'select' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1311:34:
error: conflicting types for 'sendto'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:522:14: note:
previous declaration of 'sendto' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1315:46:
error: conflicting types for 'gethostbyaddr'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:526:26: note:
previous declaration of 'gethostbyaddr' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1316:46:
error: conflicting types for 'gethostbyname'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:527:26: note:
previous declaration of 'gethostbyname' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1318:46:
error: conflicting types for 'getservbyport'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:529:26: note:
previous declaration of 'getservbyport' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1319:46:
error: conflicting types for 'getservbyname'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:530:26: note:
previous declaration of 'getservbyname' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1320:47:
error: conflicting types for 'getprotobynumber'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:531:27: note:
previous declaration of 'getprotobynumber' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1321:47:
error: conflicting types for 'getprotobyname'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:532:27: note:
previous declaration of 'getprotobyname' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1322:34:
error: conflicting types for 'WSAStartup'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:533:14: note:
previous declaration of 'WSAStartup' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1390:30:
error: conflicting types for 'SOCKADDR_IN'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:573:28: note:
previous declaration of 'SOCKADDR_IN' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1391:31:
error: conflicting types for 'PSOCKADDR_IN'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:574:29: note:
previous declaration of 'PSOCKADDR_IN' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1392:31:
error: conflicting types for 'LPSOCKADDR_IN'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:575:29: note:
previous declaration of 'LPSOCKADDR_IN' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1394:25:
error: conflicting types for 'LINGER'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:576:23: note:
previous declaration of 'LINGER' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1395:26:
error: conflicting types for 'PLINGER'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:577:24: note:
previous declaration of 'PLINGER' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1396:26:
error: conflicting types for 'LPLINGER'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:578:24: note:
previous declaration of 'LPLINGER' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1402:25:
error: conflicting types for 'FD_SET'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:582:23: note:
previous declaration of 'FD_SET' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1403:26:
error: conflicting types for 'PFD_SET'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:583:24: note:
previous declaration of 'PFD_SET' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1404:26:
error: conflicting types for 'LPFD_SET'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:584:24: note:
previous declaration of 'LPFD_SET' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1406:26:
error: conflicting types for 'HOSTENT'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:585:24: note:
previous declaration of 'HOSTENT' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1407:27:
error: conflicting types for 'PHOSTENT'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:586:25: note:
previous declaration of 'PHOSTENT' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1408:27:
error: conflicting types for 'LPHOSTENT'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:587:25: note:
previous declaration of 'LPHOSTENT' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1410:26:
error: conflicting types for 'SERVENT'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:588:24: note:
previous declaration of 'SERVENT' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1411:27:
error: conflicting types for 'PSERVENT'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:589:25: note:
previous declaration of 'PSERVENT' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1412:27:
error: conflicting types for 'LPSERVENT'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:590:25: note:
previous declaration of 'LPSERVENT' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1414:27:
error: conflicting types for 'PROTOENT'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:591:25: note:
previous declaration of 'PROTOENT' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1415:28:
error: conflicting types for 'PPROTOENT'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:592:26: note:
previous declaration of 'PPROTOENT' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1416:28:
error: conflicting types for 'LPPROTOENT'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:593:26: note:
previous declaration of 'LPPROTOENT' was here
In file included from libssh2_priv.h:139:0,
from channel.c:41:
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/mswsock.h:41:18: error:
redefinition of 'struct _TRANSMIT_FILE_BUFFERS'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:551:18: note:
originally defined here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/mswsock.h:46:5: error:
conflicting types for 'TRANSMIT_FILE_BUFFERS'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:556:5: note:
previous declaration of 'TRANSMIT_FILE_BUFFERS' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/mswsock.h:46:28: error:
conflicting types for 'PTRANSMIT_FILE_BUFFERS'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:556:28: note:
previous declaration of 'PTRANSMIT_FILE_BUFFERS' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/mswsock.h:46:52: error:
conflicting types for 'LPTRANSMIT_FILE_BUFFERS'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:556:52: note:
previous declaration of 'LPTRANSMIT_FILE_BUFFERS' was here
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/mswsock.h:55:18: error:
conflicting types for 'TransmitFile'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:562:18: note:
previous declaration of 'TransmitFile' was here
In file included from libssh2_priv.h:139:0,
from channel.c:41:
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/mswsock.h:57:15: error:
conflicting types for 'GetAcceptExSockaddrs'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:564:15: note:
previous declaration of 'GetAcceptExSockaddrs' was here
In file included from libssh2_priv.h:140:0,
from channel.c:41:
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/ws2tcpip.h:13:8: error:
redefinition of 'struct ip_mreq'
c:/_64/mingw64/lib/gcc/../../x86_64-w64-mingw32/include/winsock.h:243:8: note:
originally defined here
make[2]: *** [channel.lo] Error 1
make[2]: Leaving directory `/c/_32/comp/libssh2-1.2.6/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/_32/comp/libssh2-1.2.6/src'
make: *** [all-recursive] Error 1
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public