From: Lyle Johnson Date: 2002-07-23T05:25:16+09:00 Subject: Re: FXRuby-1.0.11 install make failed "Jim Freeze" wrote in message news:20020722072231.A45239@freebsdportal.com... > Hmmm, maybe you can explain. I did not change the ruby header files > but changed two fxruby files: Good grief, I thought that this was covered in adequate detail in the build instructions. OK, you asked for it, you got it. In the source code for Ruby 1.6.7, we have two conflicting declarations for the function rb_gc_mark(). If you look at its declaration in the "intern.h" header file, you'll see it declared as: void rb_gc_mark(); which is to say, rb_gc_mark() is a void function that takes no arguments. But if you look at the implementation of rb_gc_mark() in "gc.c", you'll see that it in fact takes one argument of type "void *": void rb_gc_mark(ptr) void *ptr; { ... } Now, for Ruby 1.7.2 Matz decided to correct this inconsistency, and so if you inspect the declaration of rb_gc_mark() in the Ruby 1.7.2 version of "intern.h" you'll instead see: void rb_gc_mark(VALUE); If you're thinking to yourself, "Whoa Nelly, he changed the type of that argument, didn't he?", well, you're right. So it goes. At least it's consistent, because the implementation of rb_gc_mark() changed as well to read: void rb_gc_mark(ptr) VALUE ptr; { ... } So, the moral of the story is that if you're building FXRuby against the Ruby 1.6 sources -- or more specifically, for any Ruby earlier than version 1.7.2 -- you need to fix the declaration of rb_gc_mark() in "intern.h" to read: void rb_gc_mark(void *); You do NOT need to modify the FXRuby sources at all. The bits in the FXRuby source code that are checking the Ruby version (i.e. "#if RUBY_VERSION_CODE < 172") are making sure that we call rb_gc_mark() with the correct argument type: a pointer-to-void for pre-Ruby 1.7.2 and a VALUE for later versions of Ruby.