Project

General

Profile

Bug #5675

[mingw] static build fails due to socket extension build failure

Added by jonforums (Jon Forums) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
-
Backport:
[ruby-core:41314]

Description

I get the following failure on my Win7 32bit system while trying to build ruby_1_9_3@33661 The problem likely exists on trunk@33852 but #5674 blocks me from trying to replicate.

Providing --with-out-ext=socket to ./configure is a one (undesirable) workaround. No failure when building on Arch.

C:\Users\Jon\Documents\RubyDev\ruby-git\build>sh -c "../configure --disable-shared --disable-install-doc && make"
...
make[2]: Entering directory /c/Users/Jon/Documents/RubyDev/ruby-git/build/ext/socket'
generating socket-i386-mingw32.def
generating constant definitions
compiling ../../../ext/socket/init.c
compiling ../../../ext/socket/constants.c
compiling ../../../ext/socket/basicsocket.c
compiling ../../../ext/socket/socket.c
../../../ext/socket/socket.c: In function 'rsock_sock_s_socketpair':
../../../ext/socket/socket.c:114:5: warning: implicit declaration of function 'socketpair'
compiling ../../../ext/socket/ipsocket.c
compiling ../../../ext/socket/tcpsocket.c
compiling ../../../ext/socket/tcpserver.c
compiling ../../../ext/socket/sockssocket.c
compiling ../../../ext/socket/udpsocket.c
compiling ../../../ext/socket/unixsocket.c
compiling ../../../ext/socket/unixserver.c
compiling ../../../ext/socket/option.c
compiling ../../../ext/socket/ancdata.c
compiling ../../../ext/socket/raddrinfo.c
linking shared-object socket.so
socket.o: In function
rsock_sock_s_socketpair':
c:\Users\Jon\Documents\RubyDev\ruby-git\build\ext\socket/../../../ext/socket/socket.c:114: undefined reference to socketpair'
c:\Users\Jon\Documents\RubyDev\ruby-git\build\ext\socket/../../../ext/socket/socket.c:117: undefined reference to
socketpair'
collect2: ld returned 1 exit status
make[2]: *** [../../.ext/i386-mingw32/socket.so] Error 1
make[2]: Leaving directory /c/Users/Jon/Documents/RubyDev/ruby-git/build/ext/socket'
make[1]: *** [ext/socket/all] Error 2
make[1]: Leaving directory
/c/Users/Jon/Documents/RubyDev/ruby-git/build'
make: *** [build-ext] Error 2

Also available in: Atom PDF