わたなべ さん またお世話になります。少しも進歩しないので申し訳ありません。 新しく解凍して、まっさらの ruby-1.8.0 directory として、 > % mkdir mingw.obj > % cd mingw.obj > % ../configure --with-gcc='gcc -mno-cygwin' CFLAGS=-O2 これを行ってみました。ところが、configure で checking build system type... i686-pc-cygwin checking host system type... i686-pc-cygwin checking target system type... i686-pc-cygwin checking for gcc... gcc -mno-cygwin となり、 config.log では $ ../configure --with-gcc=gcc -mno-cygwin CFLAGS=-O2 configure:1921: gcc -mno-cygwin -v </dev/null >&5 Reading specs from /bin/../lib/gcc-lib/i686-pc-mingw32/3.2/specs Configured with: /netrel/src/gcc-3.2-3/configure --enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --without-included-gettext --enable-interpreter --disable-sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin です。なにか target が mingw にならないみたいです。 でももっと困ったことは次のエラーです。 gcc -mno-cygwin -D__NO_ISOCEXT -O2 -I. -I.. -DLIBRUBY_SO=\"msvcrt-ruby18.dll\" -c ../dir.c In file included from /usr/include/unistd.h:6, from ../dir.c:21: /usr/include/sys/unistd.h:23: conflicting types for `chown' ../win32/win32.h:205: previous declaration of `chown' /usr/include/sys/unistd.h:53: conflicting types for `getegid' ../win32/win32.h:296: previous declaration of `getegid' /usr/include/sys/unistd.h:54: conflicting types for `geteuid' ../win32/win32.h:294: previous declaration of `geteuid' /usr/include/sys/unistd.h:55: conflicting types for `getgid' ../win32/win32.h:295: previous declaration of `getgid' /usr/include/sys/unistd.h:70: conflicting types for `getuid' ../win32/win32.h:293: previous declaration of `getuid' /usr/include/sys/unistd.h:78: conflicting types for `link' ../win32/win32.h:206: previous declaration of `link' /usr/include/sys/unistd.h:102: conflicting types for `setgid' ../win32/win32.h:298: previous declaration of `setgid' /usr/include/sys/unistd.h:109: conflicting types for `setuid' ../win32/win32.h:297: previous declaration of `setuid' /usr/include/sys/unistd.h:113: parse error before '(' token ../dir.c: In function `dir_s_mkdir': ../dir.c:543: too few arguments to function `mkdir' make: *** [dir.o] エラー 1 これには途方にくれました。cygwin の構成でも悪いのでしょうか? ご指導のほどよろしくお願いいたします。 -------========-------- mitsu5 mitsu5 / ruby.famille.ne.jp WATANABE Hirofumi <eban / os.rim.or.jp> wrote: > わたなべです。 > > Mitsuo Igarashi <mitsu5 / ruby.famille.ne.jp> writes: > > > ruby-1.8.0 を gcc -mno-cygwin でビルドしようとしましたが > > うまくいきません。 > > > > 環境は > > cygwin version 1.3.15-2 > > Windows XP professional > > > > cygwin で -mno-cygwin にしなければビルドは成功します。 > > たぶんcygwinでmakeしたままでmake distcleanしてないんだと思います。 > > > % CC='gcc -mno-cygwin' CFLAGS='-O2 ' ./configure --enable-shared --target=i386-mingw32 > > にて、configure して、make しますと、 > > > > >compiling dl > > >make[1]: 入ります ディレクトリ `/ruby18/ext/dl' > > >gcc -mno-cygwin -DIMPORT -g -O2 -fno-defer-pop -fno-omit-frame-pointer -I. ->IF:/cygwin/ruby18 -IF:/cygwin/ruby18 -IF:/cygwin/ruby18/ext/dl -DHAVE_DLFCN_H ->I. -c dl.c > > CFLAGS='-O2 'と指定してるわりには-gがついていて矛盾しますが、 > 何度かconfigureし直してますか? > > > configure 中に、 > > cygwin gcc では、 > > checking for dlopen in -ldl... yes > > checking for dlopen... yes > > となっていますが、 > > > > cygwin gcc -mno-cygwin では > > checking for dlopen in -ldl... no > > checking for dlopen... no > > と変わっています。 > > > > 原因はこれかなと思うのですが、処理方法が分かりません。 > > make distclean-extしてからmakeしなおしてみましょう。 > > 最初から別の作業ディレクトリでconfigureする方法もあります。 > > % mkdir mingw.obj > % cd mingw.obj > % ../configure --with-gcc='gcc -mno-cygwin' CFLAGS=-O2 > > 1.8では、CCがgcc -mno-cygwinなら勝手にtargetはi386-mingw32 > になり、targetがcygwin/mignw32のときはdefaultで--enable-shared > になります。 > > -- > わたなべひろふみ