Problems installing FX/Ruby 
Author Message
 Problems installing FX/Ruby

I'm having problems getting FX/Ruby installed on Redhat 7.3 with Ruby 1.6.7.

First, I downloaded a binary RPM, but when I tried to run a simple FX/Ruby
script, I got an error saying the require of "fox" was failing.

So, I downloaded the source code and tried to build FX/Ruby from scratch. For
some reason, the code makes a number of calls to rb_gc_mark(), passing a
parameter, but in intern.h, that function doesn't take any parameters.

In a desperate attempt to progress a little further, I hacked those calls to
remove the parameter that was being passed.  I had to do this in two files.  
After that, I was able to build and install the library.

One strange thing was that it installed things in ...

   /usr/local/lib/site_ruby/1.6/1.6/

I would have expected only one "1.6" in there.

Anyway, when I try to run the small script now, I get

test01.rb:1:in `require': libFOX-1.0.so.0: cannot open shared object file: No
such file or directory - /usr/local/lib/site_ruby/1.6/1.6/i386-linux/fox.so
(LoadError)
        from test01.rb:1

even though /usr/local/lib/site_ruby/1.6/1.6/i386-linux/fox.so exists and is
readable (and executable) by everyone.

Obviously, at this stage, I'm very, very confused!

I noticed that in the source files, where the references to rb_gc_mark()
appeared, it was #ifdef-ed for 1.7.2 versus anything earlier.

Should I try moving to 1.7.2, or is my problem something more fundamental?

Thanks in advance,

Harry O.



Sun, 02 Jan 2005 21:12:44 GMT  
 Problems installing FX/Ruby

H> In a desperate attempt to progress a little further, I hacked those calls to
H> remove the parameter that was being passed.  I had to do this in two files.  
H> After that, I was able to build and install the library.

 It's best to modify intern.h in this case.

 If you remove the parameter to rb_gc_mark(), the GC will not work

H> test01.rb:1:in `require': libFOX-1.0.so.0: cannot open shared object file: No
H> such file or directory - /usr/local/lib/site_ruby/1.6/1.6/i386-linux/fox.so
H> (LoadError)
H>         from test01.rb:1

 It's trying to say that fox.so can't find libFOX-1.0.so.0 (or another
 library)

Guy Decoux



Sun, 02 Jan 2005 21:28:30 GMT  
 Problems installing FX/Ruby

Quote:
>  It's trying to say that fox.so can't find libFOX-1.0.so.0 (or another
>  library)

Strange.  That file is in /usr/local/lib, so I don't know why it can't find
it.  It's a symbolic link to libFOX-1.0.so.0.0.14, which also exists.

Any ideas?



Sun, 02 Jan 2005 21:44:06 GMT  
 Problems installing FX/Ruby

H> Strange.  That file is in /usr/local/lib, so I don't know why it can't find
H> it.  It's a symbolic link to libFOX-1.0.so.0.0.14, which also exists.

 Do you have /usr/local/lib in /etc/ld.so.conf ?

 Try

   /sbin/ldconfig -vNX

 to see the search path

 You can try also try to sue LD_LIBRARY_PATH

Guy Decoux



Sun, 02 Jan 2005 21:54:39 GMT  
 Problems installing FX/Ruby
OK.  I admit it ... I'm a{*filter*}head :-) !!

It turned out that while the library was in /usr/local/lib, that wasn't in my
LD_LIBRARY_PATH.  I'm surprised this hasn't caused me a problem about a
million times before now, but I guess my luck's just been very good.



Sun, 02 Jan 2005 21:59:51 GMT  
 Problems installing FX/Ruby

Quote:

> I'm having problems getting FX/Ruby installed on Redhat 7.3 with Ruby 1.6.7.

<snip>

Quote:
> Anyway, when I try to run the small script now, I get

> test01.rb:1:in `require': libFOX-1.0.so.0: cannot open shared object file: No
> such file or directory - /usr/local/lib/site_ruby/1.6/1.6/i386-linux/fox.so
> (LoadError)
>         from test01.rb:1

> even though /usr/local/lib/site_ruby/1.6/1.6/i386-linux/fox.so exists and is
> readable (and executable) by everyone.

> Obviously, at this stage, I'm very, very confused!

RTFM :-) The solution to this issue is detailed in doc/build.html under
the section titled "Things That Can Go Wrong".

<snip>

Regards,
Doug



Sun, 02 Jan 2005 22:05:03 GMT  
 Problems installing FX/Ruby

Quote:

> OK.  I admit it ... I'm a{*filter*}head :-) !!

> It turned out that while the library was in /usr/local/lib, that wasn't in my
> LD_LIBRARY_PATH.  I'm surprised this hasn't caused me a problem about a
> million times before now, but I guess my luck's just been very good.

Sorry I posted a lengthy response to your original question before
checking to see if anyone had already responded; I've been out of town a
few days and am trying to catch on e-mails and such. Glad to hear that
this is working a little better now.


Sun, 02 Jan 2005 23:06:47 GMT  
 Problems installing FX/Ruby

Quote:

> First, I downloaded a binary RPM, but when I tried to run a simple FX/Ruby
> script, I got an error saying the require of "fox" was failing.

Had you previously installed the FOX RPMs for your system? FXRuby
depends on being able to find the FOX shared library (libFOX.so).

Quote:
> So, I downloaded the source code and tried to build FX/Ruby from scratch. For
> some reason, the code makes a number of calls to rb_gc_mark(), passing a
> parameter, but in intern.h, that function doesn't take any parameters.

This is discussed in the build instructions
(http://www.fxruby.org/doc/build.html) under the heading "Things That
Can Go Wrong".

Quote:
> In a desperate attempt to progress a little further, I hacked those calls to
> remove the parameter that was being passed.  I had to do this in two files.

Ummm, no, that's very very bad. The calls were correct, Ruby's header
files were wrong. You need to back out those changes (probably made to
markfuncs.cpp and FXRuby.cpp).

Quote:
> After that, I was able to build and install the library.

> One strange thing was that it installed things in ...

>    /usr/local/lib/site_ruby/1.6/1.6/

> I would have expected only one "1.6" in there.

I've never seen this nor has it ever been reported. Could be a bug in
setup.rb? But you're correct that we want it to install the shared
library part of FXRuby (i.e. the fox.so file) in your
site_ruby/1.6/$PLATFORM directory and the platform-independent files in
the site_ruby/1.6/fox directory.

Quote:
> Anyway, when I try to run the small script now, I get

> test01.rb:1:in `require': libFOX-1.0.so.0: cannot open shared object file: No
> such file or directory - /usr/local/lib/site_ruby/1.6/1.6/i386-linux/fox.so
> (LoadError)
>         from test01.rb:1

> even though /usr/local/lib/site_ruby/1.6/1.6/i386-linux/fox.so exists and is
> readable (and executable) by everyone.

This may indicate that the dynamic loader can't find one of the shared
libraries that fox.so depends on. One way to diagnose this problem is to
use the "ldd" command, e.g.

     ldd /usr/local/lib/site_ruby/1.6/1.6/i386-linux/fox.so

The output of ldd should list all of the shared libraries that fox.so
depends on. If any are missing you need to get those installed first.
For more information, see the "Things That Can Go Wrong" section of the
build instructions, mentioned earlier.

Quote:
> I noticed that in the source files, where the references to rb_gc_mark()
> appeared, it was #ifdef-ed for 1.7.2 versus anything earlier.

Correct. The prototype for rb_gc_mark() has been fixed in the Ruby 1.7
header files but won't be fixed (I guess?) for Ruby 1.6.

Quote:
> Should I try moving to 1.7.2, or is my problem something more fundamental?

No need to move to 1.7.2 (unless you just want to). FXRuby works OK with
any Ruby version 1.6.x or later.


Sun, 02 Jan 2005 23:04:42 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. FX RUBY Dialog print

2. Drag and Drop example for FX/Ruby?

3. Yet another FX/Ruby question

4. FX/Ruby status line

5. Does FX/Ruby have some standard icons?

6. Core dumps with FX/Ruby tables

7. Fun with FX ruby....

8. Novice needs help with FX Ruby

9. Problems installing cvs ruby to user dir

10. Ruby Newbie: installing RUDL problem

11. Ruby/Qt2 install problem

12. Problem: Installing Ruby for Windows !

 

 
Powered by phpBB® Forum Software