Help - Ruby 1.8.0, Mac OS X, AEOSA = bus error - one more time

Dear List Folks,

Please excuse my repeating this post, but I wanted to try one more
time. No one answer this when I sent it out a week ago.

Thanks again for all the helpful Ruby info!

Cheers,
Bill Bug

···

This is my first post to this list, so I’d like to start by offering
many thanks to all who have contributed so much valuable information
here to the Ruby community!

I’ve been making very productive use of Fujimoto Hisakuni’s RubyAEOSA
AppleEvent Ruby extension, using it to automate use of several Mac apps
that speak AE.

For various reasons, I needed to move to Ruby v1.8.0 from the Mac OS X
(10.2.5) pre-installed Ruby v1.6.7. I was able to build & install Ruby
v1.8.0 and make it my default Ruby interpreter. It works fine, based
on the the standard tests included with the build package and the few
other scripts I’ve tried. I was also able to re-compile and install
several Ruby extensions I’m using such as ruby-postgres-0.7.1, pl-ruby,
etc…

I was also able to simply move Fujimoto Hisakuni’s RubyCocoa extension
from it’s default install location in the Mac OS X 10.2.x Ruby 1.6.7
extension directory to the appropriate lib/site_ruby/1.8/osx directory
for my newly compiled Ruby v1.8.0. That package seems to work fine as
is, at least as far as I can tell from the few examples I’ve tested.

When I try to do the same for RubyAEOSA - just mv it from the old to
the new lib location - I get the following when I try to ‘require’ the
package:

irb(main):001:0> require ‘osx/aeosa’
/usr/local/ruby-xtra/ruby-alt/lib/ruby/site_ruby/1.8/osx/aeosa/
aedesc.rb:303: [BUG] Bus Error
ruby 1.8.0 (2003-03-03) [powerpc-darwin6.5]
Abort

This same package worked just fine under Ruby v1.6.7.

I then tried to re-build the extension from source using my new Ruby
v1.8 as the base directory, as I’ve done successfully with other Ruby
extensions. The install.rb config --> install.rb setup --> install.rb
build/install process appeared to proceed without error. When I tried
to use it, however, I got the same error as is listed above.

I’ve scoured this list both for info on RubyAEOSA and on dealing with
’bus error’ reports when trying to load a Ruby extension. I picked up
from posts on ‘bus error’ that problems like this can occur when an
extension is not built so that it can be dynamically loaded correctly
by Ruby. That doesn’t seem to be the case for the RubyAEOSA package.
The Makefile created includes the following line:

LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace

I did find one post (for getting around the ‘bus error’ problem with
the FXRuby extension -
http://www.fifthplanet.net/cgi-bin/wiki.pl?Mac_OS_X) recommending
changing this to:

LDSHARED = cc++ -dynamic -bundle -undefined suppress -flat_namespace
-read_only_relocs supress

I tried this, but I still got the same result - a ‘bus error’ when
’requiring’ RubyAEOSA.

I’d really appreciate any thoughts or suggestions you have that might
help me get this great extension running on Mac OS X 10.2 under Ruby
v1.8.0.

Many thanks.

Cheers,
Bill Bug

Bill Bug
Senior Analyst/Ontological Engineer

Computer Vision Laboratory for Vertebrate Brain Mapping
Department of Neurobiology & Anatomy
Drexel University College of Medicine
2900 Queen Lane
Philadelphia, PA 19129
215 991 8430 (ph)

irb(main):001:0> require 'osx/aeosa'
/usr/local/ruby-xtra/ruby-alt/lib/ruby/site_ruby/1.8/osx/aeosa/
aedesc.rb:303: [BUG] Bus Error
ruby 1.8.0 (2003-03-03) [powerpc-darwin6.5]
Abort

Well, the problem seems to be specific with 'aeosa' perhaps it's best to
see with the author of the package.

Try to give a stack dump, to know exactly where ruby crash

Guy Decoux