[ruby-core:32625] [Ruby 1.8.6-Backport#3887][Open] extension socket fails to compile with "two or more data types in declaration specifiers" under MinGW
From:
Luis Lavena <redmine@...>
Date:
2010-09-29 12:01:54 UTC
List:
ruby-core #32625
Backport #3887: extension socket fails to compile with "two or more data =
types in declaration specifiers" under MinGW
http://redmine.ruby-lang.org/issues/show/3887
Author: Luis Lavena
Status: Open, Priority: Normal
Hello,
This seems to be the same issue as the closed report #1292
make[1]: Entering directory `/c/Users/Luis/Projects/oss/oci/rubyinstaller=
/sandbox/ruby18_build/ext/socket'
gcc -I. -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/soc=
ket -DHAVE_SOCKADDR_STORAGE -DHAVE_INET_NTOA -DHAVE_GETSERVBYPORT -Dsockl=
en_t=3Dint -DHAVE_WSACLEANUP -DHAVE_GETHOSTNAME -I. -g -O2 -DFD_SETSIZE=
=3D256 -c ../../../../../../ruby/ext/socket/socket.c
In file included from ../../../../../../ruby/win32/win32.h:30:0,
from ../../../../../../ruby/defines.h:183,
from ../../../../../../ruby/ruby.h:37,
from ../../../../../../ruby/ext/socket/socket.c:13:
c:\users\luis\projects\oss\oci\rubyinstaller\sandbox\devkit\mingw\bin\../=
lib/gcc/mingw32/4.5.1/../../../../include/ws2tcpip.h:272:13: error: two o=
r more data types in declaration specifiers
make[1]: *** [socket.o] Error 1
make[1]: Leaving directory `/c/Users/Luis/Projects/oss/oci/rubyinstaller/=
sandbox/ruby18_build/ext/socket'
make: *** [all] Error 1
This is ruby_1_8_6 r29162 with #3883 patch applied.
Ruby configuration options were:
sh ../configure --enable-shared --with-winsock2 --disable-install-doc CFL=
AGS=3D'-g -O2 -DFD_SETSIZE=3D256'
mkmf check for socklen_t:
--------------------
have_type: checking for socklen_t... -------------------- no
"gcc -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket=
-I. -g -O2 -DFD_SETSIZE=3D256 -c conftest.c"
conftest.c:5:19: error: expected '=3D', ',', ';', 'asm' or '__attribute__=
' before 'conftest_type'
conftest.c:6:22: error: expected '=3D', ',', ';', 'asm' or '__attribute__=
' before 'conftestval'
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3: =
4: /*top*/
5: typedef socklen_t conftest_type;
6: static conftest_type conftestval[sizeof(conftest_type)?1:-1];
/* end */
--------------------
Checking rbconfig.rb COMMON_HEADERS:
CONFIG["COMMON_HEADERS"] =3D "windows.h winsock.h"
Which could indicate even --with-winsock2 has been defined, winsock.h is =
been forced.
Find attached the full file and generated Makefile, also config.log gener=
ated by the configure process.
GCC been used:
gcc (tdm-1) 4.5.1
Package provided by tdragon: http://tdm-gcc.tdragon.net/
----------------------------------------
http://redmine.ruby-lang.org
Attachments (3)
mkmf.log
(25.9 KB, text/x-log)
have_library: checking for WSACleanup() in -lws2_32... -------------------- yes
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))WSACleanup; return 0; }
/* end */
--------------------
have_header: checking for arpa/inet.h... -------------------- no
"gcc -E -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -o conftest.i"
conftest.c:1:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <arpa/inet.h>
/* end */
--------------------
checking for ipv6... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lshell32 -lws2_32 "
conftest.c:2:24: fatal error: sys/socket.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <sys/types.h>
2: #include <sys/socket.h>
3: int
4: main()
5: {
6: socket(AF_INET6, SOCK_STREAM, 0);
7: }
/* end */
--------------------
have_struct_member: checking for struct sockaddr_in.sin_len... -------------------- no
"gcc -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 -c conftest.c"
conftest.c:6:42: error: 'struct sockaddr_in' has no member named 'sin_len'
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int s = (char *)&((struct sockaddr_in*)0)->sin_len - (char *)0;
/* end */
--------------------
have_struct_member: checking for struct sockaddr_storage.ss_family... -------------------- yes
"gcc -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 -c conftest.c"
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int s = (char *)&((struct sockaddr_storage*)0)->ss_family - (char *)0;
/* end */
--------------------
have_struct_member: checking for struct sockaddr.sa_len... -------------------- no
"gcc -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 -c conftest.c"
conftest.c:6:39: error: 'struct sockaddr' has no member named 'sa_len'
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int s = (char *)&((struct sockaddr*)0)->sa_len - (char *)0;
/* end */
--------------------
have_header: checking for netinet/tcp.h... -------------------- no
"gcc -E -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -o conftest.i"
conftest.c:1:25: fatal error: netinet/tcp.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <netinet/tcp.h>
/* end */
--------------------
have_header: checking for netinet/udp.h... -------------------- no
"gcc -E -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -o conftest.i"
conftest.c:1:25: fatal error: netinet/udp.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <netinet/udp.h>
/* end */
--------------------
have_func: checking for sendmsg()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'sendmsg' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))sendmsg; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\ccMsBKIp.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `sendmsg'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { sendmsg(); return 0; }
/* end */
--------------------
have_func: checking for recvmsg()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'recvmsg' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))recvmsg; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\ccGR3Zgo.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `recvmsg'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { recvmsg(); return 0; }
/* end */
--------------------
checking for wide getaddrinfo... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lshell32 -lws2_32 "
conftest.c: In function 'main':
conftest.c:18:19: error: storage size of 'hints' isn't known
conftest.c:19:16: error: 'INET6_ADDRSTRLEN' undeclared (first use in this function)
conftest.c:19:16: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:22:5: warning: incompatible implicit declaration of built-in function 'memset'
conftest.c:23:23: error: 'AF_UNSPEC' undeclared (first use in this function)
conftest.c:24:25: error: 'IPPROTO_TCP' undeclared (first use in this function)
conftest.c:25:32: error: 'AI_PASSIVE' undeclared (first use in this function)
conftest.c:26:25: error: 'SOCK_STREAM' undeclared (first use in this function)
conftest.c:31:33: error: dereferencing pointer to incomplete type
conftest.c:32:13: error: dereferencing pointer to incomplete type
conftest.c:32:28: error: 'AF_UNIX' undeclared (first use in this function)
conftest.c:33:13: error: dereferencing pointer to incomplete type
conftest.c:43:13: error: dereferencing pointer to incomplete type
conftest.c:44:25: error: dereferencing pointer to incomplete type
conftest.c:44:38: error: dereferencing pointer to incomplete type
conftest.c:46:23: error: 'NI_NUMERICHOST' undeclared (first use in this function)
conftest.c:46:38: error: 'NI_NUMERICSERV' undeclared (first use in this function)
conftest.c:52:17: error: dereferencing pointer to incomplete type
conftest.c:53:12: error: 'AF_INET' undeclared (first use in this function)
conftest.c:65:12: error: 'AF_INET6' undeclared (first use in this function)
checked program was:
/* begin */
1: #include <stdlib.h>
2:
3: #ifndef EXIT_SUCCESS
4: #define EXIT_SUCCESS 0
5: #endif
6: #ifndef EXIT_FAILURE
7: #define EXIT_FAILURE 1
8: #endif
9:
10: #ifndef AF_LOCAL
11: #define AF_LOCAL AF_UNIX
12: #endif
13:
14: int
15: main()
16: {
17: int passive, gaierr, inet4 = 0, inet6 = 0;
18: struct addrinfo hints, *ai, *aitop;
19: char straddr[INET6_ADDRSTRLEN], strport[16];
20:
21: for (passive = 0; passive <= 1; passive++) {
22: memset(&hints, 0, sizeof(hints));
23: hints.ai_family = AF_UNSPEC;
24: hints.ai_protocol = IPPROTO_TCP;
25: hints.ai_flags = passive ? AI_PASSIVE : 0;
26: hints.ai_socktype = SOCK_STREAM;
27: if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
28: (void)gai_strerror(gaierr);
29: goto bad;
30: }
31: for (ai = aitop; ai; ai = ai->ai_next) {
32: if (ai->ai_family == AF_LOCAL) continue;
33: if (ai->ai_addr == NULL)
34: goto bad;
35: #if defined(_AIX)
36: if (ai->ai_family == AF_INET6 && passive) {
37: inet6++;
38: continue;
39: }
40: ai->ai_addr->sa_len = ai->ai_addrlen;
41: ai->ai_addr->sa_family = ai->ai_family;
42: #endif
43: if (ai->ai_addrlen == 0 ||
44: getnameinfo(ai->ai_addr, ai->ai_addrlen,
45: straddr, sizeof(straddr), strport, sizeof(strport),
46: NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
47: goto bad;
48: }
49: if (strcmp(strport, "54321") != 0) {
50: goto bad;
51: }
52: switch (ai->ai_family) {
53: case AF_INET:
54: if (passive) {
55: if (strcmp(straddr, "0.0.0.0") != 0) {
56: goto bad;
57: }
58: } else {
59: if (strcmp(straddr, "127.0.0.1") != 0) {
60: goto bad;
61: }
62: }
63: inet4++;
64: break;
65: case AF_INET6:
66: if (passive) {
67: if (strcmp(straddr, "::") != 0) {
68: goto bad;
69: }
70: } else {
71: if (strcmp(straddr, "::1") != 0) {
72: goto bad;
73: }
74: }
75: inet6++;
76: break;
77: case AF_UNSPEC:
78: goto bad;
79: break;
80: default:
81: /* another family support? */
82: break;
83: }
84: }
85: }
86:
87: if (!(inet4 == 0 || inet4 == 2))
88: goto bad;
89: if (!(inet6 == 0 || inet6 == 2))
90: goto bad;
91:
92: if (aitop)
93: freeaddrinfo(aitop);
94: exit(EXIT_SUCCESS);
95:
96: bad:
97: if (aitop)
98: freeaddrinfo(aitop);
99: exit(EXIT_FAILURE);
100: }
/* end */
--------------------
have_struct_member: checking for struct in6_addr.s6_addr8... -------------------- no
"gcc -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -g -O2 -DFD_SETSIZE=256 -c conftest.c"
conftest.c:6:39: error: dereferencing pointer to incomplete type
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int s = (char *)&((struct in6_addr*)0)->s6_addr8 - (char *)0;
/* end */
--------------------
have_func: checking for inet_ntop()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'inet_ntop' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))inet_ntop; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\ccA5IpmD.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `inet_ntop'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { inet_ntop(); return 0; }
/* end */
--------------------
have_func: checking for inet_ntoa()... -------------------- yes
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))inet_ntoa; return 0; }
/* end */
--------------------
have_func: checking for inet_pton()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'inet_pton' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))inet_pton; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\ccqFIfLY.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `inet_pton'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { inet_pton(); return 0; }
/* end */
--------------------
have_func: checking for inet_aton()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'inet_aton' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))inet_aton; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\ccUIOHMS.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `inet_aton'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { inet_aton(); return 0; }
/* end */
--------------------
have_func: checking for getservbyport()... -------------------- yes
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))getservbyport; return 0; }
/* end */
--------------------
have_func: checking for gai_strerror()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'gai_strerror' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))gai_strerror; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\cc8mW7tE.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `gai_strerror'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { gai_strerror(); return 0; }
/* end */
--------------------
have_header: checking for arpa/nameser.h... -------------------- no
"gcc -E -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -o conftest.i"
conftest.c:1:26: fatal error: arpa/nameser.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <arpa/nameser.h>
/* end */
--------------------
have_header: checking for resolv.h... -------------------- no
"gcc -E -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -o conftest.i"
conftest.c:1:20: fatal error: resolv.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <resolv.h>
/* end */
--------------------
have_type: checking for socklen_t... -------------------- no
"gcc -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 -c conftest.c"
conftest.c:5:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'conftest_type'
conftest.c:6:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'conftestval'
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: typedef socklen_t conftest_type;
6: static conftest_type conftestval[sizeof(conftest_type)?1:-1];
/* end */
--------------------
have_header: checking for sys/un.h... -------------------- no
"gcc -E -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -o conftest.i"
conftest.c:1:20: fatal error: sys/un.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <sys/un.h>
/* end */
--------------------
have_header: checking for sys/uio.h... -------------------- no
"gcc -E -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -o conftest.i"
conftest.c:1:21: fatal error: sys/uio.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <sys/uio.h>
/* end */
--------------------
have_func: checking for WSACleanup()... -------------------- yes
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))WSACleanup; return 0; }
/* end */
--------------------
have_func: checking for hsterror()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'hsterror' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))hsterror; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\ccCzXMiX.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `hsterror'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { hsterror(); return 0; }
/* end */
--------------------
have_func: checking for getipnodebyname()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'getipnodebyname' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))getipnodebyname; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\ccwdwoPA.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `getipnodebyname'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { getipnodebyname(); return 0; }
/* end */
--------------------
have_func: checking for gethostbyname2()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'gethostbyname2' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))gethostbyname2; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\ccaOsYgw.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `gethostbyname2'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { gethostbyname2(); return 0; }
/* end */
--------------------
have_func: checking for socketpair()... -------------------- no
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
conftest.c: In function 't':
conftest.c:6:53: error: 'socketpair' undeclared (first use in this function)
conftest.c:6:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))socketpair; return 0; }
/* end */
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
C:\Users\Luis\AppData\Local\Temp\ccpRyEwi.o: In function `t':
C:\Users\Luis\Projects\oss\oci\rubyinstaller\sandbox\ruby18_build\ext\socket/conftest.c:3: undefined reference to `socketpair'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { socketpair(); return 0; }
/* end */
--------------------
have_func: checking for gethostname()... -------------------- yes
"gcc -o conftest -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket -I. -g -O2 -DFD_SETSIZE=256 conftest.c -L. -L../.. -L. -lws2_32 -lmsvcrt-ruby18-static -lws2_32 -lshell32 -lws2_32 "
checked program was:
/* begin */
1: #include <windows.h>
2: #include <winsock.h>
3:
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))gethostname; return 0; }
/* end */
--------------------
Makefile
(4.38 KB, text/plain)
SHELL = /bin/sh #### Start of system configuration section. #### srcdir = $(top_srcdir)/ext/socket topdir = ../.. hdrdir = $(top_srcdir) VPATH = $(srcdir):$(topdir):$(hdrdir) RUBYLIB = - RUBYOPT = -rpurelib.rb DESTDIR = C: prefix = $(DESTDIR)/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby18_mingw exec_prefix = $(DESTDIR)/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby18_mingw sitedir = $(DESTDIR)/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby18_mingw/lib/ruby/site_ruby rubylibdir = $(libdir)/ruby/$(ruby_version) docdir = $(datarootdir)/doc/$(PACKAGE) dvidir = $(docdir) datarootdir = $(prefix)/share top_srcdir = $(topdir)/../../../../ruby archdir = $(rubylibdir)/$(arch) sbindir = $(exec_prefix)/sbin psdir = $(docdir) localedir = $(datarootdir)/locale htmldir = $(docdir) datadir = $(datarootdir) includedir = $(prefix)/include infodir = $(datarootdir)/info sysconfdir = $(prefix)/etc mandir = $(datarootdir)/man libdir = $(exec_prefix)/lib sharedstatedir = $(prefix)/com oldincludedir = $(DESTDIR)/usr/include pdfdir = $(docdir) sitearchdir = $(sitelibdir)/$(sitearch) bindir = $(exec_prefix)/bin localstatedir = $(prefix)/var sitelibdir = $(sitedir)/$(ruby_version) libexecdir = $(exec_prefix)/libexec CC = gcc LIBRUBY = lib$(LIBRUBY_SO).a LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME) LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static RUBY_EXTCONF_H = CFLAGS = -g -O2 -DFD_SETSIZE=256 INCFLAGS = -I. -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket DEFS = CPPFLAGS = -DHAVE_SOCKADDR_STORAGE -DHAVE_INET_NTOA -DHAVE_GETSERVBYPORT -Dsocklen_t=int -DHAVE_WSACLEANUP -DHAVE_GETHOSTNAME -I. CXXFLAGS = $(CFLAGS) DLDFLAGS = -L. -Wl,--enable-auto-image-base,--enable-auto-import,--export-all LDSHARED = gcc -shared -s AR = ar EXEEXT = .exe RUBY_INSTALL_NAME = ruby RUBY_SO_NAME = msvcrt-ruby18 arch = i386-mingw32 sitearch = i386-msvcrt ruby_version = 1.8 ruby = $(topdir)/miniruby.exe -I'$(topdir)' -I'$(top_srcdir)/lib' -I'$(extout)/$(arch)' -I'$(extout)/common' -I'$(hdrdir)/ext' -rpurelib.rb RUBY = $(ruby) RM = rm -f MAKEDIRS = install -d INSTALL = /usr/bin/install -c INSTALL_PROG = $(INSTALL) -m 0755 INSTALL_DATA = $(INSTALL) -m 644 COPY = cp #### End of system configuration section. #### preload = libpath = . $(topdir) LIBPATH = -L. -L$(topdir) DEFFILE = CLEANFILES = mkmf.log DISTCLEANFILES = extout = $(topdir)/.ext extout_prefix = $(extout)$(target_prefix)/ target_prefix = LOCAL_LIBS = LIBS = $(LIBRUBYARG_SHARED) -lws2_32 -lshell32 -lws2_32 SRCS = socket.c getaddrinfo.c getnameinfo.c OBJS = socket.o getaddrinfo.o getnameinfo.o TARGET = socket DLLIB = $(TARGET).so EXTSTATIC = STATIC_LIB = $(TARGET).a RUBYCOMMONDIR = $(extout)/common RUBYLIBDIR = $(RUBYCOMMONDIR)$(target_prefix) RUBYARCHDIR = $(extout)/$(arch)$(target_prefix) TARGET_SO = $(RUBYARCHDIR)/$(DLLIB) CLEANLIBS = $(RUBYARCHDIR)/$(TARGET).so $(RUBYARCHDIR)/$(TARGET).il? $(RUBYARCHDIR)/$(TARGET).tds $(RUBYARCHDIR)/$(TARGET).map CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak all: install static: $(STATIC_LIB) install-rb clean: @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) distclean: clean @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES) realclean: distclean install: install-so install-rb install-so: $(RUBYARCHDIR) install-so: $(RUBYARCHDIR)/$(DLLIB) install-rb: pre-install-rb install-rb-default install-rb-default: pre-install-rb-default pre-install-rb: Makefile pre-install-rb-default: Makefile $(RUBYARCHDIR): $(MAKEDIRS) $@ site-install: site-install-so site-install-rb site-install-so: install-so site-install-rb: install-rb .SUFFIXES: .c .m .cc .cxx .cpp .o .cc.o: $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< .cxx.o: $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< .cpp.o: $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< .c.o: $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $< $(RUBYARCHDIR)/$(DLLIB): $(OBJS) Makefile @-$(RM) $@ @-$(MAKEDIRS) $(@D) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) $(STATIC_LIB): $(OBJS) $(AR) cru $@ $(OBJS) @-ranlib $(DLLIB) 2> /dev/null || true ### socket.o : socket.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/rubyio.h $(hdrdir)/rubysig.h sockport.h getnameinfo.o: getnameinfo.c $(topdir)/config.h addrinfo.h sockport.h getaddrinfo.o: getaddrinfo.c $(topdir)/config.h addrinfo.h sockport.h
config.log.zip
(19.2 KB, Archive)