Forum: wxRuby Problem running Samples

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.
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-01-24 18:14
Hi. I'm desperately trying to learn Ruby and wxWidgets, on my 64-bit
Linux machine. However when I try to run any of the samples from the
command line I get the following error message:

ruby: symbol lookup error:
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.8-x86_64-linux/lib/wxruby2.so:
undefined symbol: Init_wxMediaCtrl


I'd be very grateful for any help. Many thanks in advance!
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-04 18:25
Still having a problem with this. Anyone out there that can point me in
the right direction?
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-04 18:41
(Received via mailing list)
Hi

Rooby Nooby wrote:
> Still having a problem with this. Anyone out there that can point me in
> the right direction?
>

I'm afraid I don't have a AMD-64 machine I can test on.

We're in the process of putting out a new wxRuby release which will
include an AMD-64 binary gem, and I hope this will resolve the issue.

Mario - please could you have a look at the original issue and verify
it's resolved as you do the AMD-64 build? Thanks:

http://www.ruby-forum.com/topic/176654#new

alex
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-04 18:46
Alex

Many thanks for that quick response. Although I have an Intel Core2duo I
guess the AMD-64 build is essentially the same thing?
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-04 19:36
(Received via mailing list)
Rooby Nooby wrote:
> Many thanks for that quick response. Although I have an Intel Core2duo I
> guess the AMD-64 build is essentially the same thing?

I believe so:
http://www.mail-archive.com/debian-amd64@lists.deb...

a
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2009-02-05 07:48
(Received via mailing list)
Hello Rooby,

If I may inquire, when you installed the 1.9.8 Build of wxRuby, did you
also
install the associated wxWidgets packages needed from your Distro's
repositories?  I just want to make sure what kind of linking problem we
have
here, since it's coming up with an Init_wxMediaCtrl undefined symbol
error.
Also, if you did install from your Distro's repositories, what version
of
the wxWidgets libraries are installed?

Thanks,

Mario
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-05 12:57
> If I may inquire, when you installed the 1.9.8 Build of wxRuby, did you
> also install the associated wxWidgets packages needed from your Distro's
> repositories?
> Also, if you did install from your Distro's repositories, what version
> of the wxWidgets libraries are installed?

Yes I did install the associated wxWidgets packages from my Distro's
repositories (which is the latest Fedora 10). wxWidgets version 2.8.9
(GTK2 port of the wxWidgets GUI library) etc.

I've been trying to fix things at my end by uninstalling and
reinstalling etc and think I may have messed things up a little bit
beyond repair. I may just end up reinstalling Fedora and revert to the
32-bit version for an easy life...

Thanks for your help, R.
6eef10846e2486dd647098ceca0c77ef?d=identicon&s=25 Mark Thurston (mthu)
on 2009-02-05 13:23
I'm having a similar problem:
(Which I think could be similar to
http://www.ruby-forum.com/topic/165803 although I would like to avoid
building from source if necessary)

Error message produced when trying to run some of the example files (eg
minimal.rb)

No debug:
$ ruby -rubygems minimal.rb
ruby: symbol lookup error:
/var/lib/gems/1.8/gems/wxruby-1.9.8-x86_64-linux/lib/wxruby2.so:
undefined symbol: Init_wxMediaCtrl


With debug enabled:
/var/lib/gems/1.8/gems/wxruby-1.9.8-x86_64-linux/samples/minimal$ ruby
-rubygems -debug minimal.rb
Exception `LoadError' at /usr/lib/ruby/1.8/rubygems.rb:772 - no such
file to load -- rubygems/defaults/operating_system
Exception `NameError' at -e:1 - undefined local variable or method `bug'
for main:Object
-e:1: undefined local variable or method `bug' for main:Object
(NameError)


Any help will be greatly appreciated, thanks,

Mark

Debugging info:

$ lsb_release -a
LSB Version:
core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:cxx-3.0-amd64:cxx-3.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:desktop-3.1-amd64:desktop-3.1-noarch:desktop-3.2-amd64:desktop-3.2-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.0-amd64:graphics-3.0-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:languages-3.2-amd64:languages-3.2-noarch:multimedia-3.2-amd64:multimedia-3.2-noarch:printing-3.2-amd64:printing-3.2-noarch:qt4-3.1-amd64:qt4-3.1-noarch
Distributor ID:  Ubuntu
Description:  Ubuntu 8.10
Release:  8.10
Codename:  intrepid

dpkg -l | egrep 'wx|ruby|swig'
ii  libart2-ruby1.8                            0.17.0~rc1-6ubuntu1
Libart 2 bindings for the Ruby language
ii  libatk1-ruby1.8                            0.17.0~rc1-6ubuntu1
ATK bindings for the Ruby language
ii  libcairo-ruby1.8                           1.5.1-1+lenny1
Cairo bindings for the Ruby language
ii  libdrb-ruby                                4.2
transitional dummy package
ii  liberb-ruby                                4.2
transitional dummy package
ii  libgdk-pixbuf2-ruby1.8                     0.17.0~rc1-6ubuntu1
Gdk-Pixbuf 2 bindings for the Ruby language
ii  libgemplugin-ruby1.8                       0.2.3-1ubuntu1
Gem Based Plugin System
ii  libglib2-ruby1.8                           0.17.0~rc1-6ubuntu1
Glib 2 bindings for the Ruby language
ii  libgnome2-ruby                             0.17.0~rc1-6ubuntu1
GNOME 2 bindings for the Ruby language
ii  libgnome2-ruby1.8                          0.17.0~rc1-6ubuntu1
GNOME 2 bindings for the Ruby language
ii  libgnomecanvas2-ruby1.8                    0.17.0~rc1-6ubuntu1
GNOME Canvas 2 bindings for the Ruby languag
ii  libgtk2-ruby1.8                            0.17.0~rc1-6ubuntu1
GTK+ bindings for the Ruby language
ii  libpango1-ruby1.8                          0.17.0~rc1-6ubuntu1
Pango bindings for the Ruby language
ii  libreadline-ruby1.8                        1.8.7.72-1ubuntu0.1
Readline interface for Ruby 1.8
ii  libruby                                    4.2
Libraries necessary to run Ruby 1.8.x
ii  libruby1.8                                 1.8.7.72-1ubuntu0.1
Libraries necessary to run Ruby 1.8
ii  libwxbase2.4-1                             2.4.5.1.1ubuntu1
wxBase library (runtime) - non-GUI support c
ii  libwxbase2.4-dev                           2.4.5.1.1ubuntu1
wxBase library (development) - non-GUI suppo
ii  libwxbase2.6-0                             2.6.3.2.2-2ubuntu5
wxBase library (runtime) - non-GUI support c
ii  libwxbase2.8-0                             2.8.8.0-0ubuntu2
wxBase library (runtime) - non-GUI support c
ii  libwxgtk2.4-1                              2.4.5.1.1ubuntu1
wxWindows Cross-platform C++ GUI toolkit (GT
ii  libwxgtk2.4-dev                            2.4.5.1.1ubuntu1
wxWindows Cross-platform C++ GUI toolkit (GT
ii  libwxgtk2.6-0                              2.6.3.2.2-2ubuntu5
wxWidgets Cross-platform C++ GUI toolkit (GT
ii  libwxgtk2.8-0                              2.8.8.0-0ubuntu2
wxWidgets Cross-platform C++ GUI toolkit (GT
ii  libyaml-ruby                               4.2
transitional dummy package
ii  libzlib-ruby                               4.2
transitional dummy package
ii  python-pythoncard                          0.8.1-8.1ubuntu1
wxPython-based GUI construction framework (u
ii  python-wxgtk2.4                            2.4.5.1.1ubuntu1
wxWindows Cross-platform C++ GUI toolkit (wx
ii  python-wxgtk2.6                            2.6.3.2.2-2ubuntu5
wxWidgets Cross-platform C++ GUI toolkit (wx
ii  python-wxgtk2.8                            2.8.8.0-0ubuntu2
wxWidgets Cross-platform C++ GUI toolkit (wx
ii  python-wxversion                           2.8.8.0-0ubuntu2
wxWidgets Cross-platform C++ GUI toolkit (wx
ii  rdoc                                       4.2
Generate documentation from ruby source file
ii  ruby                                       4.2
An interpreter of object-oriented scripting
ii  ruby-dev                                   4.2
Header files for compiling extension modules
ii  ruby1.8                                    1.8.7.72-1ubuntu0.1
Interpreter of object-oriented scripting lan
ii  ruby1.8-dev                                1.8.7.72-1ubuntu0.1
Header files for compiling extension modules
ii  rubygems
1.3.0~RC1really1.2.0-2ubuntu3           package management framework for
Ruby librar
ii  rubygems1.8
1.3.0~RC1really1.2.0-2ubuntu3           package management framework for
Ruby librar
ii  swig                                       1.3.35-4ubuntu1
Generate scripting interfaces to C/C++ code
ii  wx2.4-examples                             2.4.5.1.1ubuntu1
wxWindows Cross-platform C++ GUI toolkit (ex
ii  wx2.4-headers                              2.4.5.1.1ubuntu1
wxWindows Cross-platform C++ GUI toolkit (he
ii  wx2.4-i18n                                 2.4.5.1.1ubuntu1
wxWindows Cross-platform C++ GUI toolkit (i1
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-05 13:37
(Received via mailing list)
Rooby Nooby wrote:
> Yes I did install the associated wxWidgets packages from my Distro's
> repositories (which is the latest Fedora 10). wxWidgets version 2.8.9
> (GTK2 port of the wxWidgets GUI library) etc.
>

That sounds fine.

> I've been trying to fix things at my end by uninstalling and
> reinstalling etc and think I may have messed things up a little bit
> beyond repair. I may just end up reinstalling Fedora and revert to the
> 32-bit version for an easy life...

I hope not! A rubygem for wxRuby 1.9.10 on AMD-64 is now available, you
might give that a try before giving up hope...

a
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2009-02-05 13:39
(Received via mailing list)
Well, before you go and do that, I have just posted the 2.0 RC1 64bit
gem
for wxRuby, and if you would like, I can send you the gem, for you to
try,
and see if it will work or not.  It should work, as I didn't have any
problems.  However, I'm running on Ubuntu, and I make my builds on
Ubuntu as
well.
6eef10846e2486dd647098ceca0c77ef?d=identicon&s=25 Mark Thurston (mthu)
on 2009-02-05 14:21
Alex Fenton wrote:
...
> I hope not! A rubygem for wxRuby 1.9.10 on AMD-64 is now available, you
> might give that a try before giving up hope...

I'm running wxruby 1.9.8.  Is there an easy way to update to 1.9.10 -
I've tried gem update wxruby but there's nothing to update apparently.

Thanks, Mark
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2009-02-05 14:49
(Received via mailing list)
On Thu, Feb 5, 2009 at 6:23 AM, Mark Thurston <lists@ruby-forum.com>
wrote:

> ruby: symbol lookup error:
> /var/lib/gems/1.8/gems/wxruby-1.9.8-x86_64-linux/lib/wxruby2.so:
> undefined symbol: Init_wxMediaCtrl


The problem isn't with wxRuby 1.9.8 in that area, it's with the fact,
that
wxruby2.so, cannot find the Symbol Init_wxMediaCtrl, which is a C/C++
Side
problem.


> With debug enabled:
> /var/lib/gems/1.8/gems/wxruby-1.9.8-x86_64-linux/samples/minimal$ ruby
> -rubygems -debug minimal.rb
> Exception `LoadError' at /usr/lib/ruby/1.8/rubygems.rb:772 - no such
> file to load -- rubygems/defaults/operating_system
> Exception `NameError' at -e:1 - undefined local variable or method `bug'
> for main:Object
> -e:1: undefined local variable or method `bug' for main:Object
> (NameError)
>

The Problem with this, is you used -debug, which is only partly right.
What
you actually need, is ruby -d, cause you threw in there, an eval, which
is
done with the switch -e, but since -d doesn't require any arguments, it
automatically processed the e as another command switch, which tried to
eval
'bug'.  Hence why there's an NameError in that. ;-)


> Any help will be greatly appreciated, thanks,
>
> Mark
>
> Debugging info:
> <snipped for length>

It looks as though you have 2.8.8 installed for wxWidgets for the 2.8
series, as well as the 2.4, and the 2.6 series of wxWidgets.  It may
mean
nothing, but I would try removing the 2.4 and 2.6 series libraries for
both
wxbase, and wxgtk, and then force a re-install of the 2.8 series, to see
if
that helps any.

Just a few suggestions.
6eef10846e2486dd647098ceca0c77ef?d=identicon&s=25 Mark Thurston (mthu)
on 2009-02-05 15:15
Mario,

Thanks for the suggestions.


Mario Steele wrote:

> The Problem with this, is you used -debug, which is only partly right.
> What
> you actually need, is ruby -d, cause you threw in there, an eval, which
> is
> done with the switch -e, but since -d doesn't require any arguments, it
> automatically processed the e as another command switch, which tried to
> eval
> 'bug'.  Hence why there's an NameError in that. ;-)

Here's the correct output from ruby -d minimal.rb (I now only have the
2.8 packages on my machine)

$ ruby -d minimal.rb
Exception `LoadError' at /usr/lib/ruby/1.8/rubygems.rb:772 - no such
file to load -- rubygems/defaults/operating_system
Exception `LoadError' at /usr/lib/ruby/1.8/rubygems/custom_require.rb:27
- no such file to load -- wx
ruby: symbol lookup error:
/var/lib/gems/1.8/gems/wxruby-1.9.8-x86_64-linux/lib/wxruby2.so:
undefined symbol: Init_wxMediaCtrl
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2009-02-05 16:10
(Received via mailing list)
The RubyGems server is still updating the different mirrors that
RubyGems
runs through.  You can find it here:
http://www.trilake.net/wxruby/wxruby-1.9.10-x86_64-linux.gem
To easily install it, just run the following commands in a console /
terminal:

wget http://www.trilake.net/wxruby/wxruby-1.9.10-x86_64-linux.gem
sudo gem install wxruby-1.9.10-x86_64-linux.gem
6eef10846e2486dd647098ceca0c77ef?d=identicon&s=25 Mark Thurston (mthu)
on 2009-02-05 16:21
Mario Steele wrote:
> The RubyGems server is still updating the different mirrors that
> RubyGems
> runs through.  You can find it here:
> http://www.trilake.net/wxruby/wxruby-1.9.10-x86_64-linux.gem
> To easily install it, just run the following commands in a console /
> terminal:
>
> wget http://www.trilake.net/wxruby/wxruby-1.9.10-x86_64-linux.gem
> sudo gem install wxruby-1.9.10-x86_64-linux.gem

No joy with 1.9.10 - and I removed 1.9.8 with sudo gem uninstall, just
to make sure there was no conflict.

What is your $PATH - do I need to add anything to it?  It seems I have
Wx installed, but ruby can't load it:

$ ruby -d helloworld_wx.rb
Exception `LoadError' at helloworld_wx.rb:5 - no such file to load -- wx
helloworld_wx.rb:5:in `require': no such file to load -- wx (LoadError)
  from helloworld_wx.rb:5

helloworld_wx.rb was taken from
http://wxruby.rubyforge.org/wiki/wiki.pl?Hello_World

Thanks, Mark
6eef10846e2486dd647098ceca0c77ef?d=identicon&s=25 Mark Thurston (mthu)
on 2009-02-05 16:21
> What is your $PATH - do I need to add anything to it?  It seems I have
> Wx installed, but ruby can't load it:

Sorry, I forgot to paste mine:

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2009-02-05 17:08
(Received via mailing list)
Try doing: ruby -rubygems -d helloworld_wx.rb
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-05 17:12
(Received via mailing list)
Mark Thurston wrote:
> What is your $PATH - do I need to add anything to it?  It seems I have
> Wx installed, but ruby can't load it:
>
> $ ruby -d helloworld_wx.rb
>
> Exception `LoadError' at helloworld_wx.rb:5 - no such file to load -- wx
> helloworld_wx.rb:5:in `require': no such file to load -- wx (LoadError)
>   from helloworld_wx.rb:5
>

With ruby 1.8, you need to ensure you load rubygems before you can use
any library installed as a gem. Try:

ruby -rubygems helloworld_wx.rb


alex
6eef10846e2486dd647098ceca0c77ef?d=identicon&s=25 Mark Thurston (mthu)
on 2009-02-05 17:17
Mario and Alex,

Thanks a lot.  I'd already tried that multiple times, but looking back
on it, I think I'd tried it in conjunction with -dubug rather that -d

Anyway, it works fine now - thanks for your help.

Regards,

Mark
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-06 19:06
Mario Steele wrote:
> Well, before you go and do that, I have just posted the 2.0 RC1 64bit
> gem for wxRuby, and if you would like, I can send you the gem, for you to
> try and see if it will work or not.  It should work, as I didn't have any
> problems.  However, I'm running on Ubuntu, and I make my builds on
> Ubuntu as well.


Thanks for that.

OK - I have now re-installed my 64-bit Fedora from scratch. To the best
of my knowledge I've correctly installed Ruby, Rubygems, wxWidgets
2.8.9, and wxRuby 1.9.10.

I crossed my fingers and then... a different error message greeted me!
What joy:

ruby -rubygems minimal.rb
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wxruby2.so:
libwx_gtk2u_gl-2.8.so.0: cannot open shared object file: No such file or
directory -
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wxruby2.so
(LoadError)
  from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wx.rb:12
  from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
  from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
  from minimal.rb:8

Arrrrgh!  Any help would be appreciated. Thanks in advance.
6eef10846e2486dd647098ceca0c77ef?d=identicon&s=25 Mark Thurston (mthu)
on 2009-02-06 19:34
Rooby Nooby wrote:

> Arrrrgh!  Any help would be appreciated. Thanks in advance.

My problem was solved, I think, by carefully reviewing all the packages
to do with wx and ruby that I had install and not installed.  I
installed the -dev packages that I thought may be remotely relevant.  I
also updated my wxruby gem to the latest amd64 release using the wget
code suggested above, and removed the old gem.

My install now works even without the -rubygems option (as long as the
code includes:

begin
require 'rubygems'
rescue LoadError
end

)

Hope that helps.  Unfortunately, mine just started working after doing a
number of things, so I'm not sure exactly what it was that fixed it.  If
I had to guess it would probably be the update of wxruby.
6eef10846e2486dd647098ceca0c77ef?d=identicon&s=25 Mark Thurston (mthu)
on 2009-02-06 19:35
Mark Thurston wrote:
> Rooby Nooby wrote:
>
>> Arrrrgh!  Any help would be appreciated. Thanks in advance.
>
> My problem was solved, I think, by carefully reviewing all the packages
> to do with wx and ruby

I mean with my distribution package manager (for you, this would be yum)
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-06 21:57
> My problem was solved, I think, by carefully reviewing all the packages
> to do with wx and ruby that I had install and not installed.  I
> installed the -dev packages that I thought may be remotely relevant.

Thanks for the suggestion, Mark. Using Fedora's Package Manager I've
installed wxGTK-devel-2.8.9-1 as suggested and hey presto - another
error message:

$ ruby minimal.rb
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wx/classes/app.rb:16:
[BUG] Segmentation fault
ruby 1.8.6 (2008-08-11) [x86_64-linux]

$ ruby bigdemo.rb
bigdemo.rb:823: [BUG] Segmentation fault
ruby 1.8.6 (2008-08-11) [x86_64-linux]

At least it's less gobbledegook than last time so I guess I'm heading in
the right direction?!!! Frankly I haven't a clue what any of these error
messages mean....
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-06 22:09
Just a thought, but the only two gems I have installed at the moment are
wx_sugar (0.1.21) and wxruby (1.9.10) - should I have any others
installed which might help me out of this pickle?
6eef10846e2486dd647098ceca0c77ef?d=identicon&s=25 Mark Thurston (mthu)
on 2009-02-06 22:27
Rooby Nooby wrote:
> Just a thought, but the only two gems I have installed at the moment are
> wx_sugar (0.1.21) and wxruby (1.9.10) - should I have any others
> installed which might help me out of this pickle?

try installing core and rake as well
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-06 23:36
Mark Thurston wrote:
> Rooby Nooby wrote:
>> Just a thought, but the only two gems I have installed at the moment are
>> wx_sugar (0.1.21) and wxruby (1.9.10) - should I have any others
>> installed which might help me out of this pickle?
>
> try installing core and rake as well

Thanks for the suggestion but after installing core and rake I'm still
getting the same error message. I now have:

core (2.0.0)
rake (0.8.3)
wx_sugar (0.1.21)
wxruby (1.9.10)

The error message is pretty much the same for all samples:

$ ruby listbook.rb
listbook.rb:174: [BUG] Segmentation fault
ruby 1.8.6 (2008-08-11) [x86_64-linux]

Which 64-bit Linux are you using?
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-07 01:11
(Received via mailing list)
Rooby Nooby wrote:
> Thanks for the suggestion, Mark. Using Fedora's Package Manager I've
> installed wxGTK-devel-2.8.9-1 as suggested and hey presto - another
> error message:
>
> $ ruby minimal.rb
> /usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wx/classes/app.rb:16:
> [BUG] Segmentation fault
> ruby 1.8.6 (2008-08-11) [x86_64-linux]

I'm afraid in this situation the only way to get more informative error
messages is to use a debugger. Try something like

gdb ruby --args -rubygems minimal.rb

It should then start, enter 'c' to run the programme. Then when it
crashes, at the gdb prompt, type 'where' and you should get a load of
feedback. Post this back to the list.

Alternatively, it might be easier just to compile your own wxruby. If
you have your own distro's libwx-gtk and libwx-gtk-dev packages
installed, download the .tar.gz file, unpack it, then do

rake gem WXRUBY_VERSION=1.9.10
sudo gem install wxruby

hth
alex
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-07 11:09
Hi Alex

Many thanks for your prompt and excellent guidance, however, I'm afraid
I don't seem to have made a great deal of progress yet.

> I'm afraid in this situation the only way to get more informative error
> messages is to use a debugger. Try something like
>
> gdb ruby --args -rubygems minimal.rb
>
> It should then start, enter 'c' to run the programme. Then when it
> crashes, at the gdb prompt, type 'where' and you should get a load of
> feedback. Post this back to the list.

Here goes nothing...

$ gdb ruby --args -rubygems minimal.rb
GNU gdb Fedora (6.8-29.fc10)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
-rubygems: No such file or directory.
(gdb) c
The program is not being run.
(gdb)

I then tried it a couple of different ways....

$ gdb ruby --args minimal.rb
GNU gdb Fedora (6.8-29.fc10)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
"/home/russell/wxsamples/minimal/minimal.rb": not in executable format:
File format not recognized
(gdb) c
The program is not being run.
(gdb)

(sigh!) how about ...

$ gdb ruby minimal.rb
GNU gdb Fedora (6.8-29.fc10)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(no debugging symbols found)
"/home/russell/wxsamples/minimal/minimal.rb" is not a core dump: File
format not recognized
Missing separate debuginfos, use: debuginfo-install
ruby-1.8.6.287-2.fc10.x86_64
(gdb) c
The program is not being run.
(gdb)


> Alternatively, it might be easier just to compile your own wxruby. If
> you have your own distro's libwx-gtk and libwx-gtk-dev packages
> installed, download the .tar.gz file, unpack it, then do
>
> rake gem WXRUBY_VERSION=1.9.10
> sudo gem install wxruby

OK. I uninstalled the gem using
$ sudo gem uninstall wxruby

I checked my distro's package manager and the following are shown to be
installed:
wxGTK-2.8.9-1.fc10 (x86_64)
wxGTK-devel-2.8.9-1.fc10 (x86_64)

I then downloaded and unpacked the relevant .tar.gz file, navigated to
the wxruby-1.9.10 folder and took a deep breath.

$ rake gem --trace WXRUBY_VERSION=1.9.10
(in /home/russell/Download/wxruby-1.9.10)
Enabling DYNAMIC build
Enabling RELEASE build
Enabling UNICODE build
The following wxWidgets features are not available and will be skipped:
  PrinterDC
** Invoke gem (first_time)
** Invoke default (first_time)
** Invoke lib/wxruby2.so (first_time)
** Invoke obj/AboutDialogInfo.o (first_time)
** Invoke src/AboutDialogInfo.cpp (first_time, not_needed)
** Invoke swig/classes/AboutDialogInfo.i (first_time, not_needed)
** Invoke /home/russell/Download/wxruby-1.9.10/swig/common.i
(first_time, not_needed)
** Invoke
/home/russell/Download/wxruby-1.9.10/swig/classes/include/wxAboutDialogInfo.h
(first_time, not_needed)
** Execute obj/AboutDialogInfo.o
g++  -c  -I/usr/lib64/wx/include/gtk2-unicode-release-2.8
-I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__
-DwxABI_VERSION=20808 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic -Wall  -fPIC -Wno-unused-function   -I. -I
/usr/lib64/ruby/1.8/x86_64-linux -o obj/AboutDialogInfo.o
src/AboutDialogInfo.cpp
rake aborted!
Command failed with status (127): [g++  -c
-I/usr/lib64/wx/include/gtk2-unic...]
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:970:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:983:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:983:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1071:in `sh'
./rake/rakewx.rb:152
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:614:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:614:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:611:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:611:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:570:in
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:587:in
`invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:584:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:584:in
`invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:576:in
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:570:in
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:587:in
`invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:584:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:584:in
`invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:576:in
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:570:in
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:587:in
`invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:584:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:584:in
`invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:576:in
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:570:in
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:563:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2018:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1996:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1996:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1996:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2035:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1990:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1969:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2035:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1966:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19


Whaaaaaat!?!? As usual, any assistance would be gratefully appreciated.
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2009-02-07 13:41
(Received via mailing list)
Hello Rooby,

On Sat, Feb 7, 2009 at 4:09 AM, Rooby Nooby <lists@ruby-forum.com>
wrote:

> > It should then start, enter 'c' to run the programme. Then when it
> > crashes, at the gdb prompt, type 'where' and you should get a load of
> > feedback. Post this back to the list.
>
> Here goes nothing...

<snip>
Alright, Alex mis-typed the line to run the GDB Debugger, you actually
need
to do this:
gdb --args ruby -rubygems minimal.rb

The problems, is that with the first two instances of the command you
ran,
GDB thinks your actually trying to execute the plain text file, thinking
it's a compiled program, which it isn't, and hence why your getting the
incorrect format.

The last instance, is another problem of mistaken identity, cause when
you
run the GDB with gdb ruby minimal.rb, it thinks minimal.rb is actually a
core dump, which sometimes happens, and sometimes doesn't.  The core
file,
allows Programmers to use in conjunction with gdb, to trace through a
program that crashed, without having to go through the trial and error
to
get to the point where the program crashed.  Often useful for users to
send
to programmers.  However, in this case, again, not something we want.
Try
the first command, if you want to re-install the gem (Which should now
be
publicly available through the normal sudo gem install wxruby.


> I checked my distro's package manager and the following are shown to be
> installed:
> wxGTK-2.8.9-1.fc10 (x86_64)
> wxGTK-devel-2.8.9-1.fc10 (x86_64)
>
> I then downloaded and unpacked the relevant .tar.gz file, navigated to
> the wxruby-1.9.10 folder and took a deep breath.
>
 <snip>

I believe this error comes from the fact that the GNU C++ Compiler is
not
installed.  Also, it may be different on Fedora, but on Ubuntu, you also
need to ensure that you have wxbase, and wxbase-dev installed alongside
the
wxgtk libraries.  Each distro has their own way of distributing
packages, as
well as how to split packages up. ;-)

I would go into Yum, or Fedora's Package Manager, and install any
Compilers
you can find that is associated with C/C++, to ensure that there aren't
any
problems.

Whaaaaaat!?!? As usual, any assistance would be gratefully appreciated.
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-07 13:44
(Received via mailing list)
Rooby Nooby wrote:
> Hi Alex
>
> Many thanks for your prompt and excellent guidance, however, I'm afraid
> I don't seem to have made a great deal of progress yet.

>> It should then start, enter 'c' to run the programme. Then when it
>> crashes, at the gdb prompt, type 'where' and you should get a load of
>> feedback. Post this back to the list.
>>
>
>
> (gdb) c
> The program is not being run.

My mistake, that should have been 'r' (for "run") not 'c' (for
"continue"). Try with that command

> g++  -c  -I/usr/lib64/wx/include/gtk2-unicode-release-2.8
> -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__
> -DwxABI_VERSION=20808 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
> -mtune=generic -Wall  -fPIC -Wno-unused-function   -I. -I
> /usr/lib64/ruby/1.8/x86_64-linux -o obj/AboutDialogInfo.o
> src/AboutDialogInfo.cpp
> rake aborted!
> Command failed with status (127): [g++  -c
> -I/usr/lib64/wx/include/gtk2-unic...]

We need to see the compiler error here. Rake seems to manage to provide
every bit of information except the one useful one...

Try copying and pasting the line that begins "g++ -c -I/usr/lib64..."
and ends "...src/AboutDialogInfo.cpp" onto the command line and see what
error g++ is returning.

thanks for your patience
alex
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-07 15:49
> Alright, Alex mis-typed the line to run the GDB Debugger, you actually
> need to do this:
> gdb --args ruby -rubygems minimal.rb

Hold on tight...

$ gdb --args ruby -rubygems minimal.rb
GNU gdb Fedora (6.8-29.fc10)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(no debugging symbols found)
Missing separate debuginfos, use: debuginfo-install
ruby-1.8.6.287-2.fc10.x86_64
(gdb) r
Starting program: /usr/bin/ruby -rubygems minimal.rb
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
[New Thread 0x7ffff7fe26f0 (LWP 31973)]
(no debugging symbols found)
Program received signal SIGSEGV, Segmentation fault.
0x000000315ba92530 in wxFontMapperBase::Get () from
/usr/lib64/libwx_baseu-2.8.so.0
(gdb) c
Continuing.
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wx/classes/app.rb:16:
[BUG] Segmentation fault
ruby 1.8.6 (2008-08-11) [x86_64-linux]

Program received signal SIGABRT, Aborted.
0x0000003151c32f05 in raise () from /lib64/libc.so.6


> ensure that you have wxbase, and wxbase-dev installed alongside
> the wxgtk libraries.

I only have wxBase-2.8.9-1.fc10 (x86_64), there's no corresponding 'dev'
in the Package Manager and I had a quick Google around for one but
didn't find anything.


> I believe this error comes from the fact that the GNU C++ Compiler is
> not installed.
> I would go into Yum, or Fedora's Package Manager, and install any
> Compilers you can find that is associated with C/C++, to ensure that there
> aren't any problems.

I installed GCC (and the C++ Support for GCC package) and entered:
rake gem WXRUBY_VERSION=1.9.10
which seemed to work - it produced many many lines of text while
compiling with a few warnings along the way but finished up with:

:0:Warning: Gem::manage_gems is deprecated and will be removed on or
after March 2009.
WARNING:  RDoc will not be generated (has_rdoc == false)
  Successfully built RubyGem
  Name: wxruby
  Version: 1.9.10
  File: wxruby-1.9.10-x86_64-linux.gem

I then entered:

$ sudo gem install wxruby
Successfully installed wxruby-1.9.10-x86_64-linux
1 gem installed

Crunch time... fingers crossed...

$ ruby minimal.rb
ruby: symbol lookup error:
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wxruby2.so:
undefined symbol: Init_wxAboutDialogInfo

Doh!!


> Try copying and pasting the line that begins "g++ -c -I/usr/lib64..."
> and ends "...src/AboutDialogInfo.cpp" onto the command line and see what
> error g++ is returning.

Alex - I did that and it produced nothing at all to report - I guess the
GCC compiler took care of that issue. Is it a coincidence though that
the AboutDialogInfo is also mentioned in the above error message
perhaps?


> thanks for your patience

No, thank YOU (Alex, Mario, Mark) for your help thus far.

I just hope we're getting closer to a solution.
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-07 18:28
Further to my previous message, I've just tried to run it with the debug
option. Perhaps this might offer any clues.

$ ruby -d minimal.rb
Exception `LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems.rb:871 -
no such file to load -- rubygems/defaults/operating_system
Exception `LoadError' at
/usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:35 - no such file to
load -- Win32API
Exception `LoadError' at
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31 - no such file
to load -- wx
ruby: symbol lookup error:
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wxruby2.so:
undefined symbol: Init_wxAboutDialogInfo
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-07 18:50
(Received via mailing list)
Rooby Nooby wrote:
> (no debugging symbols found)
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000315ba92530 in wxFontMapperBase::Get () from
> /usr/lib64/libwx_baseu-2.8.so.0
> (gdb) c
> Continuing.
> /usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wx/classes/app.rb:16:
> [BUG] Segmentation fault
> ruby 1.8.6 (2008-08-11) [x86_64-linux]

This is where you now type 'where' at the (gdb) prompt to get a
backtrace of the fault. However since it says there are "no debugging
symbols found" it may not actually help us.

> :0:Warning: Gem::manage_gems is deprecated and will be removed on or
> after March 2009.
> WARNING:  RDoc will not be generated (has_rdoc == false)
>   Successfully built RubyGem
>   Name: wxruby
>   Version: 1.9.10
>   File: wxruby-1.9.10-x86_64-linux.gem
>

This looks good.

> /usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wxruby2.so:
> undefined symbol: Init_wxAboutDialogInfo
>

Not so good. Since you earlier had problems on this file before you
installed gcc, you could try doing 'rake clean' before building the gem
again.

If this still isn't helping, try deleting lib/wxruby2.so, then running
"rake -v", and post the long line at the end of the output, which will
start something like

g++ -shared -fPIC -o [then a long list of Wx class names, like
obj/AboutDialogInfo.o] and ending in lib/wxruby2.so

a
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2009-02-08 01:45
(Received via mailing list)
On Sat, Feb 7, 2009 at 11:46 AM, Alex Fenton <alex@pressure.to> wrote:

>> ruby 1.8.6 (2008-08-11) [x86_64-linux]
>>  Name: wxruby
>> Successfully installed wxruby-1.9.10-x86_64-linux
>
Actually, this isn't working, cause your still installing the gem from
the
RubyGems repository,  but I would also suggest you do as Alex says, and
run
rake clean, and rake clean_src, then run the previous rake command to
build
the gem, and to ensure that your installing the local built gem, do sudo
gem
install wxruby-1.9.10-x86_64-linux.gem
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-08 13:43
> This is where you now type 'where' at the (gdb) prompt to get a
> backtrace of the fault. However since it says there are "no debugging
> symbols found" it may not actually help us.

I'll try that again, although I don't know how relevant this test is
after all the to-ing and fro-ing, but for what it's worth....

$ gdb --args ruby -rubygems minimal.rb
GNU gdb Fedora (6.8-29.fc10)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(gdb) r
Starting program: /usr/bin/ruby -rubygems minimal.rb
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff7fe26f0 (LWP 3132)]

Program received signal SIGSEGV, Segmentation fault.
0x000000315ba92530 in wxFontMapperBase::Get () from
/usr/lib64/libwx_baseu-2.8.so.0
Missing separate debuginfos, use: debuginfo-install
GConf2-2.24.0-1.fc10.x86_64 ORBit2-2.14.16-1.fc10.x86_64
SDL-1.2.13-6.fc10.x86_64 atk-1.24.0-1.fc10.x86_64
bug-buddy-2.24.2-1.fc10.x86_64 cairo-1.8.0-1.fc10.x86_64
dbus-glib-0.76-3.fc10.x86_64 dbus-libs-1.2.4-2.fc10.x86_64
e2fsprogs-libs-1.41.3-2.fc10.x86_64 elfutils-libelf-0.137-3.fc10.x86_64
expat-2.0.1-5.x86_64 fontconfig-2.6.0-3.fc10.x86_64
freetype-2.3.7-2.fc10.x86_64 glib2-2.18.4-1.fc10.x86_64
gstreamer-0.10.21-2.fc10.x86_64
gstreamer-plugins-base-0.10.21-2.fc10.x86_64
gtk-nodoka-engine-0.7.2-1.fc10.x86_64 gtk2-2.14.7-1.fc10.x86_64
libICE-1.0.4-4.fc10.x86_64 libSM-1.1.0-2.fc10.x86_64
libX11-1.1.4-6.fc10.x86_64 libXau-1.0.4-1.fc10.x86_64
libXcomposite-0.4.0-5.fc10.x86_64 libXcursor-1.1.9-3.fc10.x86_64
libXdamage-1.1.1-4.fc9.x86_64 libXdmcp-1.0.2-6.fc10.x86_64
libXext-1.0.4-1.fc9.x86_64 libXfixes-4.0.3-4.fc10.x86_64
libXft-2.1.13-1.fc10.x86_64 libXi-1.1.3-4.fc9.x86_64
libXinerama-1.0.3-2.fc10.x86_64 libXrandr-1.2.3-1.fc10.x86_64
libXrender-0.9.4-3.fc9.x86_64 libcanberra-0.10-3.fc10.x86_64
libcanberra-gtk2-0.10-3.fc10.x86_64 libcap-2.10-2.fc10.x86_64
libgcc-4.3.2-7.x86_64 libjpeg-6b-43.fc10.x86_64
libogg-1.1.3-9.fc9.x86_64 libpng-1.2.34-1.fc10.x86_64
libselinux-2.0.73-1.fc10.x86_64 libstdc++-4.3.2-7.x86_64
libtdb-1.1.1-26.fc10.x86_64 libtiff-3.8.2-11.fc10.x86_64
libtool-ltdl-1.5.26-4.fc10.x86_64 libvorbis-1.2.0-5.fc10.x86_64
libxcb-1.1.91-5.fc10.x86_64 libxml2-2.7.3-1.fc10.x86_64
mesa-libGLU-7.2-0.15.fc10.x86_64 pango-1.22.3-1.fc10.x86_64
pixman-0.12.0-2.fc10.x86_64 wxBase-2.8.9-1.fc10.x86_64
wxGTK-2.8.9-1.fc10.x86_64 wxGTK-gl-2.8.9-1.fc10.x86_64
zlib-1.2.3-18.fc9.x86_64
(gdb) where
#0  0x000000315ba92530 in wxFontMapperBase::Get () from
/usr/lib64/libwx_baseu-2.8.so.0
#1  0x000000315ba933f9 in wxFontMapperModule::OnInit () from
/usr/lib64/libwx_baseu-2.8.so.0
#2  0x000000315baabcde in wxModule::DoInitializeModule () from
/usr/lib64/libwx_baseu-2.8.so.0
#3  0x000000315baabebc in wxModule::InitializeModules () from
/usr/lib64/libwx_baseu-2.8.so.0
#4  0x000000315ba99a1a in wxEntryStart () from
/usr/lib64/libwx_baseu-2.8.so.0
#5  0x000000315ba99b4b in wxEntry () from
/usr/lib64/libwx_baseu-2.8.so.0
#6  0x00007ffff6b9d5d6 in wxRubyApp::main_loop () from
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wxruby2.so
#7  0x00007ffff6b9aa17 in ?? () from
/usr/lib/ruby/gems/1.8/gems/wxruby-1.9.10-x86_64-linux/lib/wxruby2.so
#8  0x0000003152c3a3e0 in rb_call0 (klass=140737348220440,
recv=140737296067360, id=25337, oid=25337, argc=0, argv=0x0,
    body=0x7ffff7a58738, flags=<value optimized out>) at eval.c:5870
#9  0x0000003152c3a59a in rb_call (klass=140737348220440,
recv=140737296067360, mid=25337, argc=0, argv=0x0, scope=0,
    self=140737348220440) at eval.c:6117
#10 0x0000003152c345f0 in rb_eval (self=140737348220440, n=<value
optimized out>) at eval.c:3490
#11 0x0000003152c3a2e3 in rb_call0 (klass=140737348220360,
recv=140737348220440, id=5129, oid=5129, argc=0, argv=0x0,
    body=0x7ffff490ed58, flags=<value optimized out>) at eval.c:6021
#12 0x0000003152c3a59a in rb_call (klass=140737348220360,
recv=140737348220440, mid=5129, argc=0, argv=0x0, scope=0,
    self=140737354003280) at eval.c:6117
#13 0x0000003152c345f0 in rb_eval (self=140737354003280, n=<value
optimized out>) at eval.c:3490
#14 0x0000003152c37d70 in rb_eval (self=140737354003280, n=<value
optimized out>) at eval.c:3220
#15 0x0000003152c472db in ruby_exec_internal () at eval.c:1642
#16 0x0000003152c47325 in ruby_exec () at eval.c:1662
#17 0x0000003152c47352 in ruby_run () at eval.c:1672
#18 0x0000000000400833 in main (argc=3, argv=0x7fffffffe368, envp=<value
optimized out>) at main.c:48
(gdb)



> (Alex) Not so good. Since you earlier had problems on this file before you
> installed gcc, you could try doing 'rake clean' before building the gem
> again.

> (Mario) run rake clean, and rake clean_src, then run the previous rake
> command to build the gem, and to ensure that your installing the local
> built gem, do sudo gem install wxruby-1.9.10-x86_64-linux.gem

I followed this invaluable advice...

$ ruby minimal.rb

Guess what - IT WORKED!!!  Many thanks for your help throughout all
this. I was starting to feel very much out of my depth and confess to
being close to trying a different 64-bit distro or even reverting to a
32-bit one to get it to work. Great support, you guys, well done.

I hope that, in some way, my experiences may have contributed something
to your own efforts in development. With any luck I'm now on my way to
experimenting and developing in this exciting environment. I hope you
don't mind if I fire the odd question at you in this forum.

I would be interested to know why compiling my own wxruby gem worked
successfully (eventually, with your help) and the downloadable one
didn't?
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-08 18:10
(Received via mailing list)
Rooby Nooby wrote:
>> This is where you now type 'where' at the (gdb) prompt to get a
>> backtrace of the fault. However since it says there are "no debugging
>> symbols found" it may not actually help us.
>>
>
> I'll try that again, although I don't know how relevant this test is
> after all the to-ing and fro-ing, but for what it's worth....

...

> GConf2-2.24.0-1.fc10.x86_64 ORBit2-2.14.16-1.fc10.x86_64
> SDL-1.2.13-6.fc10.x86_64 atk-1.24.0-1.fc10.x86_64
> bug-buddy-2.24.2-1.fc10.x86_64 cairo-1.8.0-1.fc10.x86_64
> dbus-glib-0.76-3.fc10.x86_64 dbus-libs-1.2.4-2.fc10.x86_64
> e2fsprogs-libs-1.41.3-2.fc10.x86_64 elfutils-libelf-0.137-3.fc10.x86_64
> expat-2.0.1-5.x86_64 fontconfig-2.6.0-3.fc10.x86_64
> freetype-2.3.7-2.fc10.x86_64 glib2-2.18.4-1.fc10.x86_64
> gstreamer-0.10.21-2.fc10.x86_64

etc etc ... this list of libraries gives you an idea of the number of
dependencies for wxRuby

> $ ruby minimal.rb
>
> Guess what - IT WORKED!!!
>

That's great news; I hope you enjoy working with wxRuby.

> I would be interested to know why compiling my own wxruby gem worked
> successfully (eventually, with your help) and the downloadable one
> didn't?
>

So would we. The basic problem is that Linux systems (esp for desktops)
are made up of lots of different components, each produced by unrelated
projects. Then different distros - separate teams again - assemble these
in various combinations and versions.

wxWidgets alone has dozens of configuration options. There's no way of
being sure that the configuration where we build the gems is going to be
compatible with where they get installed, so we just plump for the most
common (Ubuntu) and hope for the best. When you compile your own wxRuby,
it reads and adapts to the configuration of wxWidgets etc on your
system.

On OS X and Windows, the native GUI features that wxRuby hooks into are
supplied by a single vendor in a much more controlled way, with a very
limited range of versions (we basically support 2 on each: XP, Vista,
10.4, 10.5). On the other hand, setting up and using Windows compiler
infrastructure with open source products is much less convenient than on
Linux, so it makes sense for almost all Windows users to use the binary
gems.

Not a specific explanation, but hopefully some background

a
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2009-02-08 19:38
(Received via mailing list)
Hello Rooby,

$ ruby minimal.rb
>>
>> Guess what - IT WORKED!!!
>>
>
> That's great news; I hope you enjoy working with wxRuby.
>

Yes, that is great news that you got it to work.


> being sure that the configuration where we build the gems is going to be
> gems.
>
> Not a specific explanation, but hopefully some background


To expand about this a bit more, Linux distros have different sets of
libraries, installed in a different way, per Linux distro.  Ubuntu is
the
most common Linux distro out there, but with the problems that are on
Linux,
it's kinda hard to tailor to every single possible combination.  Some
people
don't have OpenGL Libraries installed, and if we compile the Linux Gem
with
OpenGL Infrastructure being present, then every place that it is
installed
to, needs the OpenGL Libraries.

There's even standard libraries, like the C Standard Library, that
differs
in versions between platforms, and code compiled with newer versions of
C
Standard Library, won't work with an older version.  It is our hope, and
plan, that once we have a full 2.0 stable release, that we are going to
see
about getting some standard linux distro packages out there for the
major
linux distros, such as Fedora, Debian/Ubuntu, Mandrivia, etc, etc.  But
we
need people who are experienced in making packages to help us get this
setup, so we'll hopefully be able to get soemthing done, to where you
won't
have to use gem to install, but your own Package Manager.

Often times, then not, it's just more simple to compile the package
yourself, then to use the gem repositories, when using an Distro other
then
Ubuntu.  Unfortunate as that may be.  Just the way it is.
414d54d2f7ee169e9b3677e0229fd8ba?d=identicon&s=25 Rooby Nooby (rustee)
on 2009-02-09 19:15
Alex and Mario, many many thanks for taking the time to explain the
issues regarding compiling, Linux distro's etc, and also for getting me
up and running.
This topic is locked and can not be replied to.