[#37021] [RAA] RAA/2.3 — "U.Nakamura" <usa@...>

みなさんこんにちは。

20 messages 2003/01/30

[ruby-list:37005] ruby-1.8.0 mingw build 失敗

From: Mitsuo Igarashi <mitsu5@...>
Date: 2003-01-27 14:59:05 UTC
List: ruby-list #37005
ruby-1.8.0 を gcc -mno-cygwin でビルドしようとしましたが
うまくいきません。

環境は
cygwin version 1.3.15-2
Windows XP professional

cygwin で -mno-cygwin にしなければビルドは成功します。

% 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
>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 handle.c
>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 ptr.c
>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 sym.c
>gcc -mno-cygwin -shared -s dl.def  -L"F:/cygwin/ruby18" -o dl.so dl.o handle.o >ptr.o sym.o  -lmsvcrt-ruby18  -lwsock32  
>handle.o(.text+0x5c): In function `rb_dlhandle_close':
>/ruby18/ext/dl/handle.c:25: undefined reference to `dlclose'
>handle.o(.text+0x158): In function `rb_dlhandle_initialize':
>/ruby18/ext/dl/handle.c:66: undefined reference to `dlopen'
>handle.o(.text+0x1e2):/ruby18/ext/dl/handle.c:79: undefined reference to `>dlclose'
>handle.o(.text+0x221):/ruby18/ext/dl/handle.c:73: undefined reference to `>dlerror'
>handle.o(.text+0x3e4): In function `rb_dlhandle_sym':
>/ruby18/ext/dl/handle.c:166: undefined reference to `dlsym'
>handle.o(.text+0x446):/ruby18/ext/dl/handle.c:180: undefined reference to `>dlsym'
>handle.o(.text+0x21): In function `dlhandle_free':
>/ruby18/ext/dl/handle.c:14: undefined reference to `dlclose'
>make[1]: *** [dl.so] エラー 1
>make[1]: 出ます ディレクトリ `/ruby18/ext/dl'
>make: *** [all] エラー 1
ここでストップしてしまいます。

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
と変わっています。

原因はこれかなと思うのですが、処理方法が分かりません。

他に原因があるのか、それともここか、
ご指導のほどよろしくお願いいたします。

-------========--------
mitsu5
mitsu5@ruby.famille.ne.jp

In This Thread

Prev Next