wxRuby 1.9.9 apps don't work (gNewSense 2.1)


#1

Hello,

I installed wxRuby through rubygems but I can’t use it. When I try the
sample apps I get the following error:

fla@nutabe:~/biblioteca/programación/ruby/wxruby_doc/samples/minimal$
ruby
minimal.rb
/var/lib/gems/1.8/gems/wxruby-1.9.9-x86-linux/lib/wxruby2.so:
libGL.so.1:
cannot open shared object file: No such file or directory -
/var/lib/gems/1.8/gems/wxruby-1.9.9-x86-linux/lib/wxruby2.so (LoadError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in require' from /var/lib/gems/1.8/gems/wxruby-1.9.9-x86-linux/lib/wx.rb:12 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:ingem_original_require’
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `require’
from minimal.rb:8

This is the software I’m using:

gNewSense 2.1
wxRuby 1.9.9-x86
Ruby 1.8.6

Thanks in advance,


#2

Hi

Luis Felipe Lopez Acevedo wrote:

from /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in 

gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:inrequire’
from minimal.rb:8

This is the software I’m using:

gNewSense 2.1
wxRuby 1.9.9-x86
Ruby 1.8.6

It looks like you need some additional libraries that wRuby depends on.
Since Linux systems vary so widely, it’s sometimes necessary to install
some additional dependencies to get wxRuby to work.

The missing library is libGL.so and I think on Debian-type systems you
need to install a package called something like “libgl1-mesa” to get
this. Searching for “mesa” should turn it up.

hth
alex


#3

Excuse my ignorance but does that mean that wxRuby depends on OpenGL?
Because if it does, I won’t be able to use it since my libre system has
no
support for OpenGL due to licensing issues (
http://www.fsf.org/news/thank-you-sgi).

I was hopping to run wxRuby apps like I do with wxPython :frowning:

But I’ll check if I’m able to install libgl1-mesa.

Thanks for your help, Alex.

2008/12/16 Alex F. removed_email_address@domain.invalid


#4

On a similar note, I get “undefined symbol: rb_intern2” when I try to
use the ‘wxruby-ruby19’ gem. Using the regular ‘wxruby’ gem causes it
to core as soon as I load it.

Any ideas?

– Eric W.


#5

On Dec 16, 2008, at 3:31 PM, Eric W. wrote:

On a similar note, I get “undefined symbol: rb_intern2” when I try
to use the ‘wxruby-ruby19’ gem. Using the regular ‘wxruby’ gem
causes it to core as soon as I load it.

Sometimes it says “undefined symbol: rb_str_new_cstr” also. No idea.


#6

Luis Felipe Lopez Acevedo wrote:

Excuse my ignorance but does that mean that wxRuby depends on OpenGL?
Because if it does, I won’t be able to use it since my libre system
has no support for OpenGL due to licensing issues
(http://www.fsf.org/news/thank-you-sgi).

wxRuby doesn’t depend overall on OpenGL. It does include a GLCanvas
widget, and this specific widget depends on the system’s GL library. In
the case of Ubuntu this is libmesa (http://www.mesa3d.org/), and from
the link you posted it looks like after re-licensing, this is acceptable
under a strict definition of ‘free’/‘libre’.

I was hopping to run wxRuby apps like I do with wxPython :frowning:

No reason you can’t :). But if there isn’t a system GL library available
to you because of licensing, you will have to compile your own wxRuby
without GL support. On Linux with a wxWidgets library installed, this is
pretty simple - the only extra needed is SWIG. It should pick up that GL
is not supported and not attempt to compile that - if not, you can force
it to skip that widget by doing:

rake WXRUBY_EXCLUDED=GLCanvas

But I’ll check if I’m able to install libgl1-mesa.

I would definitely try this first. The precompiled gems for all
platforms are built with a maximum set of features, and so in some cases
(mostly on Linux) some additional libraries are needed. On Linux in
particular, the binary builds are more of a convenience, rather than
something we expect to be right for all users on every possible distro.

hth
alex


#7

On Dec 16, 2008, at 7:17 PM, Alex F. wrote:

Hi Eric

Eric W. wrote:

On a similar note, I get “undefined symbol: rb_intern2” when I try
to use the ‘wxruby-ruby19’ gem. Using the regular ‘wxruby’ gem
causes it to core as soon as I load it.

Which platform & ruby version are you using please?

1.9.0 on Linux-2.6.27.


#8

Eric W. wrote:

On a similar note, I get “undefined symbol: rb_intern2” when I try
to use the ‘wxruby-ruby19’ gem. Using the regular ‘wxruby’ gem
causes it to core as soon as I load it.

Which platform & ruby version are you using please?

1.9.0 on Linux-2.6.27.

Thanks. I didn’t know we even had a ruby19-linux gem available? Anyway,
I’ll try compiling one for 1.9.9 and releasing as I’d be interested to
get this working for 2.0

cheers
a


#9

2008/12/16 Alex F. removed_email_address@domain.invalid

Luis Felipe Lopez Acevedo wrote:

But I’ll check if I’m able to install libgl1-mesa.

I would definitely try this first. The precompiled gems for all platforms
are built with a maximum set of features, and so in some cases (mostly on
Linux) some additional libraries are needed. On Linux in particular, the
binary builds are more of a convenience, rather than something we expect to
be right for all users on every possible distro.

Just to let other people know, the package that contains libGL.so.1 in
gNewSense 2.1 is libgl1-mesa-swx11. But currently, this package won’t
install libGL.so.1 because it got removed from the distribution when the
GLX
licensing issues appeared.

I’ll use wxRuby later, when OpenGL functionality returns to gNewSense.

Alex, thanks again for your help :slight_smile:


#10

Hi Eric

Eric W. wrote:

On a similar note, I get “undefined symbol: rb_intern2” when I try to
use the ‘wxruby-ruby19’ gem. Using the regular ‘wxruby’ gem causes it
to core as soon as I load it.

Which platform & ruby version are you using please?

a


#11

On Dec 17, 2008, at 11:15 AM, Alex F. wrote:

Thanks. I didn’t know we even had a ruby19-linux gem available?
Anyway, I’ll try compiling one for 1.9.9 and releasing as I’d be
interested to get this working for 2.0

It doesn’t tell me what platform it’s for. I just see it in gem list
and install it. Seems to mostly work in OS X 10.5.5, just has lots of
warnings.

cheers
a

– Eric


#12

Hi Eric

Alex F. wrote:

Eric W. wrote:

On a similar note, I get “undefined symbol: rb_intern2” when I try
to use the ‘wxruby-ruby19’ gem. Using the regular ‘wxruby’ gem
causes it to core as soon as I load it.

Which platform & ruby version are you using please?

1.9.0 on Linux-2.6.27.

I’ve created a test gem for Ruby-1.9 on Linux. Because Ruby-1.9 and SWIG
have both moved on since wxRuby 1.9.9 was released, I’ve have to build
it against HEAD, and called it ‘1.9.10’. However it’s a development
snapshot so usual cautions apply.

I don’t propose to do a 1.9.10 release through Rubyforge, so it’s
available for download only via the website:

http://wxruby.rubyforge.org/prerelease/wxruby-ruby19-1.9.10-x86-linux.gem

To install, download it first then do 'gem install ’ on the
local file.

Let me know if any installation problems occur.

a


#13

On Mon, Jan 5, 2009 at 2:30 PM, Alex F. removed_email_address@domain.invalid wrote:

To install, download it first then do 'gem install ’ on the local
file.

Let me know if any installation problems occur.

I’ve installed this, and I still get the same problems as the “official”
gem:

/var/lib/gems/1.9.0/gems/wxruby-ruby19-1.9.10-x86-linux/lib/wx.rb:12:in
`require’:
/var/lib/gems/1.9.0/gems/wxruby-ruby19-1.9.10-x86-linux/lib/wxruby2.so:
undefined symbol: rb_str_new_cstr -
/var/lib/gems/1.9.0/gems/wxruby-ruby19-1.9.10-x86-linux/lib/wxruby2.so
(LoadError)

– Eric W. // rakaur @ malkier


#14

Eric W. wrote:

I’ve installed this, and I still get the same problems as the “official” gem:

/var/lib/gems/1.9.0/gems/wxruby-ruby19-1.9.10-x86-linux/lib/wx.rb:12:in
`require’: /var/lib/gems/1.9.0/gems/wxruby-ruby19-1.9.10-x86-linux/lib/wxruby2.so:
undefined symbol: rb_str_new_cstr -
/var/lib/gems/1.9.0/gems/wxruby-ruby19-1.9.10-x86-linux/lib/wxruby2.so
(LoadError)

Are you using an old version of ruby-1.9; what does ruby -v return?

rb_str_new_cstr was added to ruby 1.9 in July last year; this gem is
built against the release candidate so will refer to this function:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/35615

alex


#15

On Mon, Jan 12, 2009 at 12:35 PM, Alex F. removed_email_address@domain.invalid wrote:

Are you using an old version of ruby-1.9; what does ruby -v return?

1.9.0. It’s, unfortunately, the latest version available in Ubuntu
repositories.

alex

– Eric W. // rakaur @ malkier


#16

Eric W. wrote:

1.9.0. It’s, unfortunately, the latest version available in Ubuntu repositories.

OK, it’s not going to work. Too much has changed in ruby-1.9 since then.

You’ll either need to build your own ruby-1.9, or wait for the repo to
update.

cheers
alex


#17

John G. wrote:

I needed these to make my WxRuby apps work, put them in your scripts
local dir so it can find them

MSVCP71.DLL
msvcr71.dll

should be able to find them from your Windows/System32 dir

forget this if you’re not doing it on Windows btw


#18

I needed these to make my WxRuby apps work, put them in your scripts
local dir so it can find them

MSVCP71.DLL
msvcr71.dll

should be able to find them from your Windows/System32 dir