From: borg@...3.net Date: 2007-01-16T03:49:14+09:00 Subject: Compiling ruby on cygwin-1.3.2 Hello.. This is my first port so.. Thanks for Ruby! Its amazying.. So I want to have it on every platform im working on ;) Now, back to the subject. I have problem w/ compiling (actualy using..) Ruby on Cygwin-1.3.2. I know that problem is cygwin + WinXP specifing since on Win2000 everything works.. (Except bunch of Compilation warnings and one error). Now, this happens when im compiling Ruby on cygwin-1.3.2: # ./miniruby.exe u:\DEVEL\SRC.OTHER\ruby-1.8.5-p12\miniruby.exe: *** Couldn't reserve space for cygwin's heap (0x2890000) in child, cygheap, Win32 error 487 miniruby is needed to prepare some stuff to build main ruby.exe But.. I just copied ruby.exe from my Win2000 box (exacly same cygwin) and it doesnt work too. I dont really know what the hell is going on.. This is my first error like that.. Im working on cygwin from years.. and compiled dozens of apps. So after a while of googling I decided to use different aproach: Makefile: ------------------------------------------------------------------ CC=gcc # Cygwin CFLAGS = -w -O LFLAGS = LIBS = -lcrypt APPN = miniruby OBJS = main.o \ array.o bignum.o class.o compar.o dir.o dmydln.o enum.o \ error.o eval.o file.o gc.o hash.o inits.o io.o dmyext.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 \ flock.o .c.o: $(CC) $(CFLAGS) -c $? all: $(OBJS) $(CC) $(LFLAGS) -o $(APPN) $(OBJS) $(LIBS) clean: rm *.o ------------------------------------------------------------------ As you can see.. there is nothing cygwin specific.. I copied all *.c and *.h files from Ruby root dir and 1 files from missing/ (./configure reported that 2 files needs to be used.. wrong.) (So BIIIG + For developers.. seems *.c sources are clear as diamond.. no warnings during compilation of that) After make I get one weird thing.. I never saw sth like that too.. gcc -o miniruby main.o array.o bignum.o class.o compar.o dir.o dmydln.o enum.o error.o eval.o file.o gc.o hash.o inits.o io.o dmyext.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 flock.o -lcrypt Warning: resolving _GetLastError by linking to _GetLastError@0 Use --enable-stdcall-fixup to disable these warnings Use --disable-stdcall-fixup to disable these fixups Really odd warning.. but okey.. its just a warning afterall :) And now.. suprise.. miniruby.exe works fine.. I tested it on one of my script and vioala.. no problems. Now qustions. 1) What is the difference between miniruby and ruby itself? Maybe I just waste your time guys and miniruby will be enough for me ;) 2) If not.. anyone interested in fixing that issue. The esiest way I think is to add Makefile.cyg and bypass configure. It looks b0rked to me.. adding a lot of crap. All stuff I build on cygwin are staticaly linked.. Just to avoid problems.. Or maybe you see different way to fix that? Best regards, Borg