FXRuby on OS X Tiger

H

Hans Fugal

I'm new to the OS X scene, and while I used Panther for a week or two
before getting Tiger, I never tried to get FXRuby working on Panther.

Darwin ports has rb-fxruby, which compiles and installs fine but dies
in the apparently famous way:

irb(main):002:0> require 'fox12'
dyld: NSLinkModule() error
dyld: Symbol not found: __ZTIN2FX5FXAppE
Referenced from:
/opt/local/lib/ruby/vendor_ruby/1.8/powerpc-darwin7.9.0/fox12.bundle
Expected in: flat namespace

Trace/BPT trap

Tiger comes with ruby 1.8.2:

$ /usr/bin/ruby --version
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]

It does not come with Fox, so I installed it with darwin ports. Fox
works great (e.g. the calculator). I built FXRuby 1.2.6 from scratch,
which required the following:

# Could this be added to the default search path? or maybe use the
output of fox-config?
ruby install.rb config -- \
--with-fox-include=/opt/local/include/fox-1.2\
--with-fox-lib=/opt/local/lib
# what's up with "-arch i386" in the generated Makefile?
sed -i 's/-arch i386//g' ext/fox12/Makefile
ruby install.rb setup
sudo ruby install.rb install

I get almost exactly the same error:

$ ruby -r fox12 -e 0
dyld: NSLinkModule() error
dyld: Symbol not found: __ZTIN2FX12FXObjectListE
Referenced from:
/usr/lib/ruby/site_ruby/1.8/powerpc-darwin8.0/fox12.bundle
Expected in: flat namespace

Trace/BPT trap


I'm willing to test, give ssh, whatever.

For the record, it looks like tk aqua works out of the box on Tiger.
Very nice. Unfortunately Tk is too slow for my little app (very large
drop-down menu). Now, I did install Tcl/Tk Aqua Batteries Included
before upgrading to Tiger, but I hadn't gotten ruby tk to work in
Panther, and it worked immediately upon upgrading to Tiger. So at worst
it would seem Tk is a matter of installing Tcl/Tk Aqua BI.
 
R

Richard Kilmer

Have you patched the rbconfig.rb file that comes with Tiger? It is
incorrectly configured to build native extensions out of the box for
OS X. See:

http://richkilmer.blogs.com/ether/2005/04/ruby_182_in_tig.html

and specifically the [UPDATE] section at the bottom. Note that the
script that was written removes the readline.dylib that is in /usr/
lib/ so you may want to run the script minus that line.

Best,

Rich
 
J

Jaypee

Hans Fugal a écrit :
I'm new to the OS X scene, and while I used Panther for a week or two
before getting Tiger, I never tried to get FXRuby working on Panther.

Darwin ports has rb-fxruby, which compiles and installs fine but dies
in the apparently famous way:
As far as I know, there is no Cocoa/Aqua version of Fox on Mac OS X.
But Fox works perfectly as a X11 client app and I can run the
scribble.rb example, or the bundled calculator or shutterbug apps.
Regards,
Jean-Pierre
 
H

Hans Fugal

Thanks for that, I hadn't done it. That makes my sed step unnecessary,
but the end result is still the same.
 
H

Hans Fugal

As far as I know, there is no Cocoa/Aqua version of Fox on Mac OS X.
But Fox works perfectly as a X11 client app and I can run the
scribble.rb example, or the bundled calculator or shutterbug apps.
Regards,
Jean-Pierre

Yeah, I'm expecting just X11, and I'd be happy with it. Thanks
 
H

Hans Fugal

As far as I know, there is no Cocoa/Aqua version of Fox on Mac OS X.
But Fox works perfectly as a X11 client app and I can run the
scribble.rb example, or the bundled calculator or shutterbug apps.
Regards,
Jean-Pierre

Yeah, I'm expecting just X11, and I'd be happy with it. Thanks
 
H

Hans Fugal

http://fox-toolkit.net/cgi-bin /wiki.pl?Mac_OS_X

The only thing new there was the idea to compile fox with
--disable-shared. I did that, and it changed the error to this:

irb(main):001:0> require 'fox12'
dyld: NSLinkModule() error
dyld: Symbol not found: _XcursorImageLoadCursor
Referenced from:
/usr/lib/ruby/site_ruby/1.8/powerpc-darwin8.0/fox12.bundle
Expected in: flat namespace

Trace/BPT trap

Which looks like the same thing with a different library. This is
beginning to feel like managing RPMs. ;-)

wxRuby also suggests on its wiki that you compile wxWidgets with
--disable-shared, so it seems like some pervasive problem with
extensions on OS X. Does anyone have OS X library/bundle know-how?
 
L

Lothar Scholz

Hello Jaypee,

J> As far as I know, there is no Cocoa/Aqua version of Fox on Mac OS X.
J> But Fox works perfectly as a X11 client app and I can run the
J> scribble.rb example, or the bundled calculator or shutterbug apps.
J> Regards,
J> Jean-Pierre

Sorry but this is not true. Of course if you only look at something
like "scribble.rb" then it might be true. Key handling is completely
wrong (Alt, Cmd aka Meta) wrong and Apples X11 server has huge
problems with generating the correct Z-order of windows and delivery
of mouse events (leave/enter). The latter may be a problem with FOX i
couldn't track down the source of this problem until now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top