compiling mingw with ruby 1.8.6

download mingw + msys +msysdtk

gcc -g -O2 -DRUBY_EXPORT -I. -I. -c parse.c
parse.y: In function `ruby_yylex’:
parse.y:4445: warning: assignment makes pointer from integer without a cast
parse.y:4448: error: dereferencing pointer to incomplete type
parse.y:4450: error: dereferencing pointer to incomplete type
parse.y:4451: error: dereferencing pointer to incomplete type
parse.y:4453: error: dereferencing pointer to incomplete type
parse.y:4462: error: dereferencing pointer to incomplete type
parse.y:4464: error: dereferencing pointer to incomplete type
parse.y:4464: error: dereferencing pointer to incomplete type
parse.y:4466: error: dereferencing pointer to incomplete type
make: *** [parse.o] Error 1
might mean ‘you are compiling it from the source given by the one-click–you need the raw stuff–svn’

or ‘lex.c is broken’ (apparently)

gcc -g -O2 -DRUBY_EXPORT -I. -I. -c eval.c
eval.c: In function `rb_thread_start_timer’:
eval.c:11883: error: storage size of ‘tval’ isn’t known
eval.c:11889: error: `ITIMER_VIRTUAL’ undeclared (first use in this function)
eval.c:11889: error: (Each undeclared identifier is reported only once
eval.c:11889: error: for each function it appears in.)
eval.c: In function `rb_thread_stop_timer’:
eval.c:11895: error: storage size of ‘tval’ isn’t known
eval.c:11901: error: `ITIMER_VIRTUAL’ undeclared (first use in this function)
make: *** [eval.o] Error 1

might mean ‘setup mingw again from scratch using all lowercase for the path–really from scratch possibly reboot.’

If your path is all messed up and doesn’t load gcc–you need to uninstall msys (possibly deleting /etc/fstab), and start over.

http://www.mingw.org/MinGWiki/index.php/SmartQuickStart is good for that.

then run start->program files->msys->msys, navigate to /c/ruby_src or whatever,

./configure && make && make install.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>