G
Gergely Kontra
Hi!
I tried to compile ruby under windows with mingw:
mingw 3.1.0
msys 1.0.11-20040430
My iconv.h:
#define _LIBICONV_VERSION 0x0109 /* version number: (major<<8) +
minor */
The error message:
make[1]: Entering directory `/f/tmp/ruby-1.9/ext/iconv'
gcc -shared -s -Wl,--enable-auto-import,--export-all -L'../..'
-L'c:/programs/ruby19/lib' -o ../../.ext/i386-mingw32/iconv.so iconv.o
-lmsvcrt-ruby19 -lwsock32
iconv.o(.text+0xf7):iconv.c: undefined reference to
`_imp__libiconv_open'
iconv.o(.text+0x133):iconv.c: undefined reference to
`_imp__libiconv_open'
iconv.o(.text+0x1e9):iconv.c: undefined reference to
`_imp__libiconv_close'
iconv.o(.text+0x21e):iconv.c: undefined reference to
`_imp__libiconv_close'
iconv.o(.text+0x30d):iconv.c: undefined reference to `_imp__libiconv'
make[1]: *** [../../.ext/i386-mingw32/iconv.so] Error 1
make[1]: Leaving directory `/f/tmp/ruby-1.9/ext/iconv'
make: *** [all] Error 1
After deleting the iconv library
C:\programs\ruby19\bin>ruby -v
ruby 1.9.0 (2004-06-04) [i386-mingw32]
The same with ruby 1.8.2
make[1]: Entering directory `/f/tmp/ruby-1.8/ext/iconv'
gcc -O2 -I. -If:/tmp/ruby-1.8 -If:/tmp/ruby-1.8
-If:/tmp/ruby-1.8/ext/iconv -DHAVE_ICONV_H -DICONV_INPTR_CAST="" -c
iconv.c
gcc -shared -s -Wl,--enable-auto-import,--export-all
-L'f:/tmp/ruby-1.8' -L'/programs/ruby181/lib' -o iconv.so iconv.o
-lmsvcrt-ruby18 -lwsock32
iconv.o(.text+0xe7):iconv.c: undefined reference to
`_imp__libiconv_open'
iconv.o(.text+0x123):iconv.c: undefined reference to
`_imp__libiconv_open'
iconv.o(.text+0x1a9):iconv.c: undefined reference to
`_imp__libiconv_close'
iconv.o(.text+0x1de):iconv.c: undefined reference to
`_imp__libiconv_close'
iconv.o(.text+0x2bd):iconv.c: undefined reference to `_imp__libiconv'
make[1]: *** [iconv.so] Error 1
make[1]: Leaving directory `/f/tmp/ruby-1.8/ext/iconv'
make: *** [all] Error 1
And, libraries go to msys
Compilation starts with:
/configure --prefix=c:/programs/ruby18 && make && make install
I end up with some libs in
c:/programs/msys1.0.11-20040430/programs/ruby18/lib
kgergely@LIGHTSPEED
/c/programs/msys/1.0.11-20040430/programs/ruby18/lib/ruby/1.8
$ ls
bigdecimal remote-tk.rb tkcanvas.rb tkmacpkg.rb tkvirtevent.rb
dl sha1.rb tkclass.rb tkmenubar.rb tkwinpkg.rb
i386-mingw32 tk tkconsole.rb tkmngfocus.rb
kconv.rb tk.rb tkdialog.rb tkpalette.rb
md5.rb tkafter.rb tkentry.rb tkscrollbox.rb
multi-tk.rb tkbgerror.rb tkfont.rb tktext.rb
------------------
gtk2 stuff:
kgergely@LIGHTSPEED /c/tmp/ruby-gtk2-0.9.1
$ ruby extconf.rb
extconf.rb: Entering directory `glib'
extconf.rb:50:in `system': No such file or directory -
c:\programs\ruby19\bin\ruby (Errno::ENOENT)
from extconf.rb:50
from extconf.rb:42:in `each'
from extconf.rb:42
when compiling parts manually:
kgergely@LIGHTSPEED /c/tmp/ruby-gtk2-0.9.1/atk
$ make
make[1]: Entering directory `/c/tmp/ruby-gtk2-0.9.1/atk/src'
make[1]: *** No rule to make target `ruby.h', needed by `rbatk.o'.
Stop.
make[1]: Leaving directory `/c/tmp/ruby-gtk2-0.9.1/atk/src'
make: *** [all] Error 2
kgergely@LIGHTSPEED /c/tmp/ruby-gtk2-0.9.1/atk
$ make
make[1]: Entering directory `/c/tmp/ruby-gtk2-0.9.1/atk/src'
make[1]: *** No rule to make target `defines.h', needed by `rbatk.o'.
Stop.
make[1]: Leaving directory `/c/tmp/ruby-gtk2-0.9.1/atk/src'
make: *** [all] Error 2
kgergely@LIGHTSPEED /f/tmp/ruby-gtk2-0.9.1/gdkpixbuf
$ ruby extconf.rb
checking for GCC... yes
checking for rb_define_alloc_func()... no
checking for rb_block_proc()... no
checking for new allocation framework... yes
checking for attribute assignment... yes
checking for gdk-pixbuf-2.0... yes
checking for G_PLATFORM_WIN32... yes
checking for G_OS_WIN32... yes
checking for g_print()... no
Gergõ
I tried to compile ruby under windows with mingw:
mingw 3.1.0
msys 1.0.11-20040430
My iconv.h:
#define _LIBICONV_VERSION 0x0109 /* version number: (major<<8) +
minor */
The error message:
make[1]: Entering directory `/f/tmp/ruby-1.9/ext/iconv'
gcc -shared -s -Wl,--enable-auto-import,--export-all -L'../..'
-L'c:/programs/ruby19/lib' -o ../../.ext/i386-mingw32/iconv.so iconv.o
-lmsvcrt-ruby19 -lwsock32
iconv.o(.text+0xf7):iconv.c: undefined reference to
`_imp__libiconv_open'
iconv.o(.text+0x133):iconv.c: undefined reference to
`_imp__libiconv_open'
iconv.o(.text+0x1e9):iconv.c: undefined reference to
`_imp__libiconv_close'
iconv.o(.text+0x21e):iconv.c: undefined reference to
`_imp__libiconv_close'
iconv.o(.text+0x30d):iconv.c: undefined reference to `_imp__libiconv'
make[1]: *** [../../.ext/i386-mingw32/iconv.so] Error 1
make[1]: Leaving directory `/f/tmp/ruby-1.9/ext/iconv'
make: *** [all] Error 1
After deleting the iconv library
C:\programs\ruby19\bin>ruby -v
ruby 1.9.0 (2004-06-04) [i386-mingw32]
The same with ruby 1.8.2
make[1]: Entering directory `/f/tmp/ruby-1.8/ext/iconv'
gcc -O2 -I. -If:/tmp/ruby-1.8 -If:/tmp/ruby-1.8
-If:/tmp/ruby-1.8/ext/iconv -DHAVE_ICONV_H -DICONV_INPTR_CAST="" -c
iconv.c
gcc -shared -s -Wl,--enable-auto-import,--export-all
-L'f:/tmp/ruby-1.8' -L'/programs/ruby181/lib' -o iconv.so iconv.o
-lmsvcrt-ruby18 -lwsock32
iconv.o(.text+0xe7):iconv.c: undefined reference to
`_imp__libiconv_open'
iconv.o(.text+0x123):iconv.c: undefined reference to
`_imp__libiconv_open'
iconv.o(.text+0x1a9):iconv.c: undefined reference to
`_imp__libiconv_close'
iconv.o(.text+0x1de):iconv.c: undefined reference to
`_imp__libiconv_close'
iconv.o(.text+0x2bd):iconv.c: undefined reference to `_imp__libiconv'
make[1]: *** [iconv.so] Error 1
make[1]: Leaving directory `/f/tmp/ruby-1.8/ext/iconv'
make: *** [all] Error 1
And, libraries go to msys
Compilation starts with:
/configure --prefix=c:/programs/ruby18 && make && make install
I end up with some libs in
c:/programs/msys1.0.11-20040430/programs/ruby18/lib
kgergely@LIGHTSPEED
/c/programs/msys/1.0.11-20040430/programs/ruby18/lib/ruby/1.8
$ ls
bigdecimal remote-tk.rb tkcanvas.rb tkmacpkg.rb tkvirtevent.rb
dl sha1.rb tkclass.rb tkmenubar.rb tkwinpkg.rb
i386-mingw32 tk tkconsole.rb tkmngfocus.rb
kconv.rb tk.rb tkdialog.rb tkpalette.rb
md5.rb tkafter.rb tkentry.rb tkscrollbox.rb
multi-tk.rb tkbgerror.rb tkfont.rb tktext.rb
------------------
gtk2 stuff:
kgergely@LIGHTSPEED /c/tmp/ruby-gtk2-0.9.1
$ ruby extconf.rb
extconf.rb: Entering directory `glib'
extconf.rb:50:in `system': No such file or directory -
c:\programs\ruby19\bin\ruby (Errno::ENOENT)
from extconf.rb:50
from extconf.rb:42:in `each'
from extconf.rb:42
when compiling parts manually:
kgergely@LIGHTSPEED /c/tmp/ruby-gtk2-0.9.1/atk
$ make
make[1]: Entering directory `/c/tmp/ruby-gtk2-0.9.1/atk/src'
make[1]: *** No rule to make target `ruby.h', needed by `rbatk.o'.
Stop.
make[1]: Leaving directory `/c/tmp/ruby-gtk2-0.9.1/atk/src'
make: *** [all] Error 2
kgergely@LIGHTSPEED /c/tmp/ruby-gtk2-0.9.1/atk
$ make
make[1]: Entering directory `/c/tmp/ruby-gtk2-0.9.1/atk/src'
make[1]: *** No rule to make target `defines.h', needed by `rbatk.o'.
Stop.
make[1]: Leaving directory `/c/tmp/ruby-gtk2-0.9.1/atk/src'
make: *** [all] Error 2
kgergely@LIGHTSPEED /f/tmp/ruby-gtk2-0.9.1/gdkpixbuf
$ ruby extconf.rb
checking for GCC... yes
checking for rb_define_alloc_func()... no
checking for rb_block_proc()... no
checking for new allocation framework... yes
checking for attribute assignment... yes
checking for gdk-pixbuf-2.0... yes
checking for G_PLATFORM_WIN32... yes
checking for G_OS_WIN32... yes
checking for g_print()... no
Gergõ