WXRuby crashes on Debian SID

Hello,

When I install wxruby using the gem on my Debian Sid, I cannot make it
work :

$ ruby
/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/samples/minimal/minimal.rb
/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so:
/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so:
symbol _ZN9wxListBox13EnsureVisibleEi, version WXU_2.8 not defined in
file libwx_gtk2u_core-2.8.so.0 with link time reference -
/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so
(LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wx.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:ingem_original_require’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require’
from
/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/samples/minimal/minimal.rb:8

I also tried to compile it from sources but it complained that SWIG <=
1.3.38 is supported, whereas 1.3.40-2 is installed.

Are the two element related? Do you think you may use some help solving
that issue (I’m no C/C++ guru however)?

Best regards

hi

Stefano G. wrote:

/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so

Just about every distro uses their own configuration and version of
wxWidgets, so we only support the commonest (Ubuntu) officially. I guess
from your message that the Debian config of wxWidgets isn’t compatible
with the wxRuby gem.

I also tried to compile it from sources but it complained that SWIG <=
1.3.38 is supported, whereas 1.3.40-2 is installed.

Yes, the right way forward should be to compile your own wxRuby - you
should only need g++, wxwidgets-dev package and SWIG. What the message
is telling you is tha tonly swig LESS THAN 1.3.38 is supported - shortly
after wxRuby 2.0 was released, SWIG made some incompatible changes.

SWIG is easy to compile from scratch if you want to build your own
version 1.3.38. You could install it in a custom location like
/usr/local/bin so the system version is untouched. IF you want to
install it somewhere out of PATH, but use it just for the wxRuby build,
you can tell rake to use a special swig when building like this:

rake SWIG_CMD=/path/to/swig1-3-38

cheers
alex