Forum: wxRuby wxRuby 1.9.9 apps don't work (gNewSense 2.1)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9b56041d94dbe2aa2205ba1d735aba73?d=identicon&s=25 Luis felipe López acevedo (sirgazil)
on 2008-12-16 05:36
(Received via mailing list)
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:in
`gem_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,
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2008-12-16 15:12
(Received via mailing list)
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: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

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
9b56041d94dbe2aa2205ba1d735aba73?d=identicon&s=25 Luis felipe López acevedo (sirgazil)
on 2008-12-16 16:33
(Received via mailing list)
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 :(

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

Thanks for your help, Alex.

2008/12/16 Alex Fenton <alex@pressure.to>
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2008-12-16 16:51
(Received via mailing list)
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 :(

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
808859d21eaeec75c485756b6bc7d0b9?d=identicon&s=25 Eric Will (Guest)
on 2008-12-16 21:33
(Received via mailing list)
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 Will
808859d21eaeec75c485756b6bc7d0b9?d=identicon&s=25 Eric Will (Guest)
on 2008-12-16 22:06
(Received via mailing list)
On Dec 16, 2008, at 3:31 PM, Eric Will 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.
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2008-12-17 01:19
(Received via mailing list)
Hi Eric

Eric Will 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
808859d21eaeec75c485756b6bc7d0b9?d=identicon&s=25 Eric Will (Guest)
on 2008-12-17 13:42
(Received via mailing list)
On Dec 16, 2008, at 7:17 PM, Alex Fenton wrote:

> Hi Eric
>
> Eric Will 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.
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2008-12-17 17:18
(Received via mailing list)
Eric Will 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
9b56041d94dbe2aa2205ba1d735aba73?d=identicon&s=25 Luis felipe López acevedo (sirgazil)
on 2008-12-17 18:34
(Received via mailing list)
2008/12/16 Alex Fenton <alex@pressure.to>

> 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 :)
808859d21eaeec75c485756b6bc7d0b9?d=identicon&s=25 Eric Will (Guest)
on 2008-12-17 20:01
(Received via mailing list)
On Dec 17, 2008, at 11:15 AM, Alex Fenton 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
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-01-05 20:45
(Received via mailing list)
Hi Eric

Alex Fenton wrote:
> Eric Will 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-ruby...

To install, download it first then do 'gem install <filename>' on the
local file.

Let me know if any installation problems occur.

a
808859d21eaeec75c485756b6bc7d0b9?d=identicon&s=25 Eric Will (Guest)
on 2009-01-12 18:30
(Received via mailing list)
On Mon, Jan 5, 2009 at 2:30 PM, Alex Fenton <alex@pressure.to> wrote:
> To install, download it first then do 'gem install <filename>' 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 Will // rakaur @ malkier
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-01-12 18:49
(Received via mailing list)
Eric Will 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/...

alex
808859d21eaeec75c485756b6bc7d0b9?d=identicon&s=25 Eric Will (Guest)
on 2009-01-12 19:21
(Received via mailing list)
On Mon, Jan 12, 2009 at 12:35 PM, Alex Fenton <alex@pressure.to> 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 Will // rakaur @ malkier
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-01-12 20:12
(Received via mailing list)
Eric Will 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
760e5c90000057a6860986b69b77c400?d=identicon&s=25 John Griffiths (indiehead)
on 2009-01-15 14:48
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
760e5c90000057a6860986b69b77c400?d=identicon&s=25 John Griffiths (indiehead)
on 2009-01-15 14:48
John Griffiths 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
This topic is locked and can not be replied to.