Trunk failing to build on Win32

Hello,

I can successfully build Trunk on Linux and OSX but am having a very
tough time building on Win32. I have tried with VS6, VS8 and I am
stuck at the exact same error on both versions. I have installed
Cygwin version of Bison and Sed because GnuWin32 version of Bison
(2.1) fails to generate the proper parse.c that is required to build.

The error I am getting is as follows for Trunk version 14354:

    lib -nologo -machine:x86 -out:msvcrt-ruby19-static.lib

dln.obj prelude.
obj array.obj bignum.obj class.obj compar.obj dir.obj
encoding.obj enum.o
bj enumerator.obj error.obj eval.obj eval_load.obj proc.obj
file.obj gc.o
bj hash.obj inits.obj io.obj marshal.obj math.obj numeric.obj
object.obj
pack.obj parse.obj process.obj prec.obj random.obj range.obj
re.obj regc
omp.obj regenc.obj regerror.obj regexec.obj regparse.obj
regsyntax.obj rub
y.obj signal.obj sprintf.obj st.obj string.obj struct.obj
time.obj transc
ode.obj transcode_data_iso_8859.obj util.obj variable.obj
version.obj block
inlining.obj compile.obj debug.obj iseq.obj vm.obj vm_dump.obj
thread.obj
cont.obj id.obj ascii.obj euc_jp.obj sjis.obj unicode.obj utf8.obj
acosh.obj
crypt.obj erf.obj strlcpy.obj strlcat.obj win32.obj dmyext.obj
.\miniruby.exe ./win32/mkexports.rb -output=msvcrt-
ruby19.def -arch=i3
86 msvcrt-ruby19-static.lib
lib -nologo -machine:x86 -out:msvcrt-ruby19.lib -def:msvcrt-
ruby19.def
Creating library msvcrt-ruby19.lib and object msvcrt-ruby19.exp
.\miniruby.exe ./enc/make_encmake.rb --builtin-
encs=“ascii.obj euc_jp.o
bj sjis.obj unicode.obj utf8.obj” enc.mk
.\miniruby.exe -I./lib -run -e mkdir – -p “.ext/i386-mswin32/
enc”
nmake -f enc.mk -

Microsoft ® Program Maintenance Utility Version 6.00.9782.0
Copyright © Microsoft Corp 1988-1998. All rights reserved.

    cl -nologo -LD -Fe.ext/i386-mswin32/enc/iso8859_1.so

oldnames.lib user3
2.lib advapi32.lib shell32.lib ws2_32.lib -link -incremental:no -
debug -opt:r
ef -opt:icf -dll -def: -implib:iso8859_1-i386-mswin32.lib -
pdb:iso8859_1-i386-m
swin32.pdb
LINK : fatal error LNK1146: no argument specified with option “/def:”
NMAKE : fatal error U1077: ‘cl’ : return code ‘0x2’
Stop.
NMAKE : fatal error U1077: ‘C:\PROGRA~1\MICROS~2\VC98\BIN\NMAKE.EXE’ :
return co
de ‘0x2’
Stop.

Any ideas what it could be? I can see that the -def: line is blank
and is not reading in the proper DEFFILE. Even if I try and hardcode
the -def:msvcrt-ruby19.def it will continue but then the build will
fail further down the line.

Does anyone have a WORKING proper build environment for Win32? It
appears that README.win32 is a bit outdated or shall I say not as
specific as it needs to be to obtain a proper build under Win32.

Thanks for your help!

From: “Robert Hucik” [email protected]

return code ‘0x2’
Stop.

Hmm. I’m usually able to build trunk on win32. I was able to
as recently as last week. (I’m using vs.net 2003.)

As of tonight, though, after updating to SVN revision 14365, I’m
getting an error while building extensions:

compiling ripper

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1073: don’t know how to make ‘ripper.c’
Stop.
NMAKE : fatal error U1077: ‘.\miniruby.exe’ : return code ‘0x1’
Stop.

… Hmm, strange, looks like ripper.c should have been built
using the .y.c rule in the Makefile.

I hacked in an explicit rule for ripper.c, based on the .y.c
rule:

ripper.c: ripper.y
$(BISON) -t -v -oy.tab.c ripper.y
sed -f $(top_srcdir)/tool/ytab.sed -e “/^#/s!y.tab.c!$@!”
y.tab.c > $@
@$(RM) y.tab.c

After that, all of trunk built for me.

Note, I do have cygwin installed, which is providing some of
the tools like bison and sed which are used during some
parts of the build.

Regards,

Bill