FXRuby-1.0.11 install make failed 
Author Message
 FXRuby-1.0.11 install make failed

Hi:

I just installed fox-1.0.11 via ports on FreeBSD and
all worked will. I then downloaded FXRuby-1.0.11 from
sourceforge and installed but it soon failed with
the error listed below:

c++ -fPIC -O -pipe  -fPIC -O0 -Iinclude -I. -I/usr/local/lib/ruby/1.6/i386-freebsd4 -I/usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H   -I/usr/local/include -I/usr/local/include/fox -c -o FXRuby.o FXRuby.cpp
FXRuby.cpp: In function `void FXRbGcMark(void *)':
FXRuby.cpp:186: passing `void *' to argument 1 of `rb_gc_mark(long unsigned int)' lacks a cast
*** Error code 1

Stop in /usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox.
setup failed
'system make' failed
try 'ruby install.rb --help' for usage

Can someone tell me why this failed.

Thanks

Jim
PS The full set of events are listed below.

 -> ruby install.rb config
install.rb: entering config phase...
---> lib
---> lib/fox
<--- lib/fox
<--- lib
---> ext
---> ext/fox
/usr/local/bin/ruby /usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox/extconf.rb
checking for sys/time.h... yes
checking for signal.h... yes
checking for png_create_read_struct() in -lpng... yes
checking for deflate() in -lz... yes
checking for jpeg_mem_init() in -ljpeg... yes
checking for TIFFSetErrorHandler() in -ltiff... yes
checking for XShmQueryVersion() in -lXext... yes
checking for XFindContext() in -lX11... yes
checking for glXCreateContext() in -lGL... no
checking for gluNewQuadric() in -lGLU... no
creating Makefile
---> ext/fox/include
<--- ext/fox/include
<--- ext/fox
<--- ext
install.rb: config done.

install.rb: entering setup phase...
---> lib
---> lib/fox
<--- lib/fox
<--- lib
---> ext
---> ext/fox
make
cc -fPIC -O -pipe  -fPIC -O0 -Iinclude -I. -I/usr/local/lib/ruby/1.6/i386-freebsd4 -I/usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H   -I/usr/local/include -I/usr/local/include/fox -c -o librb.o librb.c
c++ -fPIC -O -pipe  -fPIC -O0 -Iinclude -I. -I/usr/local/lib/ruby/1.6/i386-freebsd4 -I/usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H   -I/usr/local/include -I/usr/local/include/fox -c -o core_wrap.o core_wrap.cpp
c++ -fPIC -O -pipe  -fPIC -O0 -Iinclude -I. -I/usr/local/lib/ruby/1.6/i386-freebsd4 -I/usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H   -I/usr/local/include -I/usr/local/include/fox -c -o dialogs_wrap.o dialogs_wrap.cpp
c++ -fPIC -O -pipe  -fPIC -O0 -Iinclude -I. -I/usr/local/lib/ruby/1.6/i386-freebsd4 -I/usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H   -I/usr/local/include -I/usr/local/include/fox -c -o FXRbApp.o FXRbApp.cpp
c++ -fPIC -O -pipe  -fPIC -O0 -Iinclude -I. -I/usr/local/lib/ruby/1.6/i386-freebsd4 -I/usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H   -I/usr/local/include -I/usr/local/include/fox -c -o FXRbDataTarget.o FXRbDataTarget.cpp
c++ -fPIC -O -pipe  -fPIC -O0 -Iinclude -I. -I/usr/local/lib/ruby/1.6/i386-freebsd4 -I/usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H   -I/usr/local/include -I/usr/local/include/fox -c -o FXRuby.o FXRuby.cpp
FXRuby.cpp: In function `void FXRbGcMark(void *)':
FXRuby.cpp:186: passing `void *' to argument 1 of `rb_gc_mark(long unsigned int)' lacks a cast
*** Error code 1

Stop in /usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox.
setup failed
'system make' failed
try 'ruby install.rb --help' for usage

--
Jim Freeze
If only I had something clever to say for my comment...



Fri, 07 Jan 2005 12:23:47 GMT  
 FXRuby-1.0.11 install make failed

Quote:

> Hi:

> I just installed fox-1.0.11 via ports on FreeBSD and
> all worked will. I then downloaded FXRuby-1.0.11 from
> sourceforge and installed but it soon failed with
> the error listed below:

> c++ -fPIC -O -pipe  -fPIC -O0 -Iinclude -I.
> -I/usr/local/lib/ruby/1.6/i386-freebsd4
> -I/usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox
> -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H   -I/usr/local/include
> -I/usr/local/include/fox -c -o FXRuby.o FXRuby.cpp
> FXRuby.cpp: In function `void FXRbGcMark(void *)':
> FXRuby.cpp:186: passing `void *' to argument 1 of
> `rb_gc_mark(long unsigned int)' lacks a cast
> *** Error code 1

> Stop in /usr/home/jfreeze/installs/bsd/ruby/FXRuby-1.0.11/ext/fox.
> setup failed
> 'system make' failed
> try 'ruby install.rb --help' for usage

> Can someone tell me why this failed.

> Thanks

The problem is in the Ruby header files. The FXRuby build instructions (I
believe that is in chapter 2 of the FXRUby users guide) discuss things that
can go wrong with the FXRuby build and what to do about it. Your problem is
mentioned their, along with the solution.

Regards,
Curt



Fri, 07 Jan 2005 18:31:44 GMT  
 FXRuby-1.0.11 install make failed

Quote:


> The problem is in the Ruby header files. The FXRuby build instructions (I
> believe that is in chapter 2 of the FXRUby users guide) discuss things that
> can go wrong with the FXRuby build and what to do about it. Your problem is
> mentioned their, along with the solution.

Hmmm, maybe you can explain. I did not change the ruby header files
but changed two fxruby files:

FXRuby.h
----From---
id FXRbGcMark(void *obj){
  if(obj){
    VALUE value=FXRbGetRubyObj(obj); // only search FXRuby_ObjMap!
    if(value!=Qnil){
#if RUBY_VERSION_CODE < 172
      rb_gc_mark(reinterpret_cast<void*>(value));
#else
      rb_gc_mark(value);
#endif
      }
    }
  }
----To---
id FXRbGcMark(void *obj){
  if(obj){
    VALUE value=FXRbGetRubyObj(obj); // only search FXRuby_ObjMap!
    if(value!=Qnil){
#if RUBY_VERSION_CODE < 172
      rb_gc_mark(value);
#else
      rb_gc_mark(value);
#endif
      }
    }
  }
-----
I am using 1.6.7. Maybe I should have changed ' < 172' to ' < 167'?

markfuncs.cpp
----From---
#if RUBY_VERSION_CODE < 172
#define MARK(p) rb_gc_mark(reinterpret_cast<void *>((p)))
#else
#define MARK(p) rb_gc_mark(reinterpret_cast<VALUE>((p)))
#endif
----To-----
#if RUBY_VERSION_CODE < 172
#define MARK(p) rb_gc_mark(reinterpret_cast<VALUE>((p)))
#else
#define MARK(p) rb_gc_mark(reinterpret_cast<VALUE>((p)))
#endif
-----------

Again, I could have changed the  test from 172 to 167.

My question is, why are these tests for 172 and not against
167?

Thanks
--
Jim Freeze
If only I had something clever to say for my comment...
~



Fri, 07 Jan 2005 19:23:14 GMT  
 FXRuby-1.0.11 install make failed


Quote:
> Hmmm, maybe you can explain. I did not change the ruby header files
> but changed two fxruby files:

<snip>

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 m{*filter*}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.



Sat, 08 Jan 2005 04:31:38 GMT  
 FXRuby-1.0.11 install make failed
Hi,

At Tue, 23 Jul 2002 05:25:16 +0900,

Quote:

> 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:

intern.h in recent 1.6 branch also has those prototypes.

--
Nobu Nakada



Sat, 08 Jan 2005 10:36:48 GMT  
 FXRuby-1.0.11 install make failed

Quote:

> Hi,

> At Tue, 23 Jul 2002 05:25:16 +0900,

>> 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:

> intern.h in recent 1.6 branch also has those prototypes.

OK, this is good to hear. I was just considering the (released) Ruby
1.6.7 sources.


Sat, 08 Jan 2005 21:49:11 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. ANNOUNCE: FXRuby-1.0.11 Now Available

2. sybasemodule fails on NT against Sybase 11.1.1

3. : Why TclApp fails with 8.4.11.1?

4. Tcl8.4.11 build failed on solaris8

5. pydoc Tkinter fails under HPUX 11

6. ST/V 2.0.9 Crashes under WARP Full Pack (Update 2.0.11 installed)

7. scotty-2.1.11 install problem

8. FXRuby install problem revisited

9. Installing Fox, FXRuby and fxscintilla

10. ld errors attempting to install FXRuby on Solaris 8

11. Installing FXRuby on Mandrake 8.1

12. RTP NC 11/11, 12/6 - CINCOM VISUALWORKS

 

 
Powered by phpBB® Forum Software