Project

General

Profile

Bug #1776

make fails when compiling socket

Added by duerst (Martin Dürst) almost 11 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
1.8.7
Backport:
[ruby-core:24323]

Description

=begin
This is on cygwin on Windows XP, with a pristine trunk HEAD. After a successful
$ ./configure --enable-shared
make fails when compiling socket. The error message is as follows:
compiling socket
make: *** [mkmain.sh] Error 1

The mkmf.log file found in ext/socket is attached.

Regards, Martin.
=end

#1

Updated by duerst (Martin Dürst) almost 11 years ago

=begin
Attaching a file apparently failed (see Bug #1779).
I'm including the last few lines of the abovementioned mkmf.log file here:


have_type: checking for socklen_t in sys/types.h,netdb.h,string.h,sys/socket.h,netinet/in.h,arpa/inet.h... -------------------- yes

"gcc -I../../.ext/include/i386-cygwin -I../.././include -I../.././ext/socket -I. -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -c conftest.c"
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: #include
4: #include
5: #include
6: #include
7: #include
8: #include
9:
10: /*top
/
11: typedef socklen_t conftest_type;
12: int conftestval[sizeof(conftest_type)?1:-1];
/* end */


/cygdrive/c/ruby/ruby/lib/mkmf.rb:277:in ensure in block in postpone': undefined methodclose' for nil:NilClass (NoMethodError)
from /cygdrive/c/ruby/ruby/lib/mkmf.rb:281:in block in postpone'
from /cygdrive/c/ruby/ruby/lib/mkmf.rb:249:in
open'
from /cygdrive/c/ruby/ruby/lib/mkmf.rb:271:in postpone'
from /cygdrive/c/ruby/ruby/lib/mkmf.rb:685:in
checking_for'
from /cygdrive/c/ruby/ruby/lib/mkmf.rb:826:in have_header'
from /cygdrive/c/ruby/ruby/ext/socket/extconf.rb:303:in
'
from ./ext/extmk.rb:154:in load'
from ./ext/extmk.rb:154:in
extmake'
from ./ext/extmk.rb:445:in block in <main>'
from ./ext/extmk.rb:441:in
each'
from ./ext/extmk.rb:441:in `'

=end

#2

Updated by neomjp (neomjp neomjp) almost 11 years ago

=begin
Worked for me here with cygwin-1.7.0-51 on XP, gcc4-core-4.3.2-2, ruby-1.8.7-p72-2, and compiling ruby-1.9.2-r24017 .

Looks like you have ruby 1.9.x installed in /cygdrive/c/ruby or c:\ruby, and that is the ruby that comes first in PATH. I suspect that it is a non-cygwin native win32 ruby, which failed to handle a cygwin-style path.

from ./ext/extmk.rb:154:in `load'
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
......
if conf
load $0 = conf
else
......

I suspect $srcdir had some cygwin-style path in it.

By the way, --enable-shared is the default in cygwin and is probably unnecessary. configure.in says:

case "$target_os" in
when(cygwin*|mingw*)
.....
case "$target_os" in
when(mingw*)
......
esac
: ${enable_shared=yes}
;;
when(aix*)

=end

#3

Updated by yugui (Yuki Sonoda) almost 11 years ago

  • Assignee set to nobu (Nobuyoshi Nakada)

=begin

=end

#4

Updated by duerst (Martin Dürst) over 10 years ago

  • Status changed from Open to Closed

=begin
We haven't observed this problem for a long time anymore, so I think this bug should be closed.
=end

Also available in: Atom PDF