Duh... I installed Fox 1.2.11 and then the 1.2.2 gem -- and all seemed OK. Then when my code did a require "rubygems" require_gem "fox" this is what I got: [hal@dhcppc2 tycho]$ ruby tycho.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:116:in `activate'': (Gem::LoadError) Could not find RubyGem fox (> 0.0.0) from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:34:in `require_gem'' from tycho.rb:3 So I thought: I guess the gem name is fxruby? But then I got: [hal@dhcppc2 tycho]$ ruby tycho.rb /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.2/ext/fox12/fox12.so: libFOX-1.2.so.0: cannot open shared object file: No such file or directory - /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.2/ext/fox12/fox12.so (LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require'' from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:148:in `activate'' from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:34:in `require_gem'' from tycho.rb:3 So... how am I being stupid here? Thanks, Hal
On Nov 18, 2004, at 12:54 AM, Hal Fulton wrote:> But then I got: > > [hal@dhcppc2 tycho]$ ruby tycho.rb > /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.2/ext/fox12/fox12.so: > libFOX-1.2.so.0: > cannot open shared object file: No such file or directory - > /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.2/ext/fox12/fox12.so > (LoadError) > from > /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in > `require'' > from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:148:in > `activate'' > from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:34:in > `require_gem'' > from tycho.rb:3 > > So... how am I being stupid here?I think the problem is that the extension module (fox12.so) can''t find the FOX library (libFOX-1.2.so); but to check this theory, can you tell me the output of this: ldd /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.2/ext/fox12/fox12.so Thanks, Lyle
On Nov 18, 2004, at 11:41 PM, Hal Fulton wrote:> I did an ldconfig and it helped. > > But now I see this: > > [hal@dhcppc2 tycho]$ ruby tycho.rb > /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.2/ext/fox12/fox12.so: > /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.2/ext/fox12/fox12.so: > undefined symbol: _ZN8FXStringC1EPKc - > /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.2/ext/fox12/fox12.so > (LoadError) > from > /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in > `require'' > from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:148:in > `activate'' > from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:34:in > `require_gem'' > from tycho.rb:3 > > > Darn that pesky old _ZN8FXStringC1EPKc symbol...Do you perhaps have an old FXScintilla, compiled against FOX 1.0, installed? Check to see if you have a file like: /usr/local/lib/libfxscintilla.so (that may not be the exact name). If that installation of FXScintilla was built in the past, against FOX 1.0, that might be the conflict. In that case I think you''d need to rebuild FXScintilla against FOX 1.2. Seems like someone else has run into that problem recently.
On Nov 22, 2004, at 12:34 PM, Hal Fulton wrote:> I installed a new FXScintilla and then did a gem install of fxruby > 1.2.2 > again. > > Same thing.I suspect what is happening is that when you build FXScintilla, it''s seeing the FOX 1.0 installation (i.e. /usr/local/lib/libFOX.so) and linking against that instead of your FOX 1.2 installation (i.e. /usr/local/lib/libFOX-1.2.so). Can you send me a copy of the config.log file that should be sitting in your FXScintilla build directory? It''s the file that shows what kinds of decisions the "configure" script while it was configuring the FXScintilla build, and it should resolve the question of which FOX library your FXScintilla is linked to.> Apparently the Fox 1.0 is still installed... I expected the 1.2 to > overwrite > it... but "require ''fox''" still works fine for me and gives me old > values > for fxversion and fxrubyversion.Yes; this was done intentionally to distinguish between applications written for FXRuby 1.0 and applications written for FXRuby 1.2. See the change history: http://www.fxruby.org/1.2/doc/changes.html and technically those instructions are not quite right; for the gem installation, you need to do this: require ''rubygems'' require ''fox12'' A different approach (recommended by the RubyGems folk) is to just add "-rubygems" to your RUBYOPT environment variable so that the "rubygems" module is always automatically loaded when the Ruby interpreter starts up. If you''ve done that then you''d only need to do: require ''fox12''> Do I have to "kill" 1.0 somehow?You don''t have to, no. They should be able to co-exist.> BTW: I *do* have to do this, don''t I? > > require ''rubygems'' > require_gem ''fxruby'' > > since I installed with a gem?As of the the latest version of RubyGems, you should be able to use either of the following forms: require ''rubygems'' require_gem ''fxruby'' or: require ''rubygems'' require ''fox12'' I suppose I''d recommend the latter since that should work whether they''ve installed the code from a Gem or from some other source (like the source tarball, or RPA, or whatever). I apologize for the confusion, but RubyGems has been a bit of a moving target over the last few months. There''s still a pretty significant bug in RubyGems 0.8.1 that affects gem-based installations of FXRuby (or any other compiled extension) on Mac OS X. In retrospect it was probably a mistake to try to shift things over to RubyGems at the time that I did, but hopefully things will settle down as they head into the home stretch towards a RubyGems 1.0 release. Thanks, Lyle
On Nov 23, 2004, at 12:59 AM, Hal Fulton wrote:> Lyle Johnson wrote: >> I suspect what is happening is that when you build FXScintilla, it''s >> seeing the FOX 1.0 installation (i.e. /usr/local/lib/libFOX.so) and >> linking against that instead of your FOX 1.2 installation (i.e. >> /usr/local/lib/libFOX-1.2.so). Can you send me a copy of the >> config.log file that should be sitting in your FXScintilla build >> directory? > > OK... attached.OK, that confirmed my suspicion: If the FXScintilla configure script sees both FOX 1.0 and 1.2 installed, it goes with FOX 1.0 by default. I checked my FXScintilla build directory (also for FXScintilla 1.61) and it looks like his configure script has this option: ./configure --with-fox-1-2 (I got this by doing "configure --help"). So I think what you might have to do at this point is: 1. Re-configure FXScintilla using this switch; rebuild it and re-install it. 2. Re-install the FXRuby gem, so that it links against this build of FXScintilla and not the old one. Hope this helps, Lyle
Lyle Johnson wrote:> 1. Re-configure FXScintilla using this switch; rebuild it and > re-install it. > 2. Re-install the FXRuby gem, so that it links against this build of > FXScintilla and not the old one.That worked like a charm, thanks... Hal