わたなべです。 あ、やっとわかった気がする。 "Mitsuo Igarashi" <mitsu5 / ruby.famille.ne.jp> writes: :Cygwin は cygwinversion: 1.3.2-1 : :minngw32 について。(gcc-2.95.3 を使っております) ということはこの場合のgccはcygwin版ではなくてmingw32版という意味ですか? : ./configure --enable-shared (snip) :dir.c: In function `dir_s_mkdir': :dir.c:475: too many arguments to function `mkdir' :make: *** [dir.o] Error 1 だとすればこうなるのは当然です。 :./configure --enable-shared i586-mingw32 とした時、これはビルドに成功。 unameはcygwin版なのでこのように明示的にmingw32と指定する必要 があります。だからこっちならうまくいきます。 :cygwin gcc under Cygwin :./configure --enable-shared :この時の make 時のエラー : :gcc -g -O2 -I. -I. -I/usr/local/include -DLIBRUBY_SO=\"cygwin-ruby16.dll\" :-c io.c :In file included from /usr/include/time.h:32, : from /usr/include/sys/reent.h:14, : from /usr/include/stdlib.h:19, : from ruby.h:25, : from io.c:15: :/usr/include/sys/types.h:133: warning: empty declaration :/usr/include/sys/types.h:134: warning: empty declaration :io.c: In function `rb_read_pending': :io.c:179: structure has no member named `_cnt' こちらはconfig.cacheを消さずに、同じディレクトリで ./configureしたからでしょう。 :cygwin gcc under Cygwin :./configure --enable-shared i386-mingw32 :この時の make 時のエラー こっちは--with-gcc='gcc -mno-cygwin'してないから。 :cc -DNT -D__MSVCRT__ -g -O2 -I. -I. -I/usr/local/include -DLIBRUBY_SO=\"min :gw32-ruby16.dll\" -c array.c なんでccになるのか、ちと疑問ではあるけど。 いまのところmingw32版rubyを作るにはcygwinの環境も必須、 よってわざわざmingw32版gccを別にインストールして使うという人 はいなかったというのが実状です。 #いや初期の助田さんがいたか。 たしかにmingw32版のインストールガイドもないけど、 わざわざソースからmakeする人もいなかったので、 書くのが面倒になってしまったというか。 cygwin版gccでmingw32版rubyを作る方法は % ./configure --enable-shared --with-gcc='gcc -mno-cygwin' i386-mingw32 が正解です。autoconf 2.5xだと configure: WARNING: you should use --build, --host, --target と文句言われるし、program-prefixもつくので、いずれは % ./configure --enable-shared --with-gcc='gcc -mno-cygwin' \ --target=i386-mingw32 --program-prefix='' のほうがよりいいのかもしれない。 -- わたなべひろふみ