Compiling Ruby 1.8.0 with MinGW fails

Hi!

I cannot compile Ruby 1.8.0 with MinGW compiler.

In latest CVS version, there were several errors and after fixing a few
(#ifndef, compar.c …), I gave it up.

Compiling 1.8.0prev fails after entering in ext modules. Here is the
excerpt:

gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c signal.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c sprintf.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c st.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c string.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c struct.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c time.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c util.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c variable.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c version.c
gcc -I. -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c
./missing/fileblocks.c
gcc -I. -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c ./missing/crypt.c
gcc -I. -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c ./missing/flock.c
gcc -I. -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c ./missing/isinf.c
gcc -I. -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c ./missing/acosh.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -I./win32 -c
./win32/win32.c
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c dmyext.c
ar rcu libmsvcrt-ruby18-static.a array.o bignum.o class.o compar.o dir.o
dln.o enum.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o
math.o numeric.o object.o pack.o parse.o process.o prec.o random.o
range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o
time.o util.o variable.o version.o fileblocks.o crypt.o flock.o isinf.o
acosh.o win32.o dmyext.o
gcc -g -O2 -mno-cygwin -mms-bitfields -I. -I. -c main.c
gcc -g -O2 -mno-cygwin -mms-bitfields main.o dmyext.o
libmsvcrt-ruby18-static.a -lwsock32 -o miniruby.exe
echo EXPORTS > ruby.def
nm --extern-only --defined-only libmsvcrt-ruby18-static.a | sed -n ‘s/.*
[CDT] _//p’ >> ruby.def
windres --include-dir . --include-dir . --include-dir ./win32
msvcrt-ruby18.rc msvcrt-ruby18.res.o
gcc -shared -s -Wl,–out-implib=libmsvcrt-ruby18.dll.a ruby.def array.o
bignum.o class.o compar.o dir.o dln.o enum.o error.o eval.o file.o gc.o
hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o
process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o
st.o string.o struct.o time.o util.o variable.o version.o fileblocks.o
crypt.o flock.o isinf.o acosh.o win32.o dmyext.o msvcrt-ruby18.res.o
-lwsock32 -o msvcrt-ruby18.dll
Creating library file: libmsvcrt-ruby18.dll.a
compiling dl
make: *** [all] Error 1

I have MinGW 2.0.3 compiler running on Win98 (on Win4Lin package under
SuSE Linux).

Any idea?

Sincerely,
Gour

ps. Ruby 1.6.8 & Ruby-GTK2 bindings were compiled normally in the same
environment, but I’d like to try 1.8.x hoping for better runtime
compatibility between mingw32 & mswin32 libraries.

···


Gour
gour@mail.inet.hr
Registered Linux User #278493