In regards to Ron’s post, I have reviewed the gem created by the build
process, and attempted to use it, and it is as you said, with Ruby 1.9.2
p0,
when attempting to run most of the examples, it will cause a segfault,
with
a ruby backtrace, and debugging info, suggesting something has gone
wrong.
I’ve also attempted to build against Ruby 1.8.7 p302, and it seems that
it
has issues with rb_intern2 not being found for some reason. I just
joined wxruby on irc.freenode.net, if you are still available, we can research
what is going on, and figure out a solution to this problem.
After doing a complete wipe clean of the code, and re-swigging and
compiling
of the code, it looks as though Ruby 1.8.7 p302 has the same issue as
Ruby
1.9.2 p0. In the fact that aside from a few configuration errors on our
part, with the removal of wxMediaCtrl from the Debian/Ubuntu repository
version, that after getting the errors fixed, there’s an issue with
libpixman, in the function pixman_image_composite32, running through the
GDB
backtrace.
I am therefore going to attempt to custom build wxWidgets myself, in
static
form, and build wxRuby’s so file in static mode, to see if the errors
progress, or fix. It may be solvable by using wxWidget’s internal
graphics
libraries over the system’s libraries, but I won’t know for certain till
I
run the compile. I’m getting things setup now, to see what happens, and
will post on my progress once I get a version built.
In regards to Ron’s post, I have reviewed the gem created by the build
process, and attempted to use it, and it is as you said, with Ruby
1.9.2 p0,
when attempting to run most of the examples, it will cause a segfault
Seems as if you’re refering to me, but I’m not Ron.
Am 28.10.2010 07:45, schrieb Mario S.:
You may laugh, but I already tried that. Even with a self-compiled
wxWidgets in static mode (exact build options I used can be found in the
wxRuby wiki at http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets ) I got the
segfault. I compiled wxWidgets to the /opt/wxWidgets dir and tried to
run files like this:
However, I might have done something wrong as it was the first time I
compiled wxWidgets.
Sadly enough, I’m not a C++ developer and don’t have any knowledge of
SWIG. I’ve done some C programming, but I think I can’t be of much help.
If it’s any help I’ve joined the wxruby IRC channel for now, but I
don’t have much time.
Sorry for the late answer, but normally I’m not at home until 17pm.
Except on weekends, of course. Just for information: My time zone is UTC
2 as I’m living in Germany, next week it will be UTC + 1 when daylight
saving time ends.
Vale,
Marvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
Alright, after running through various self-compilation tests, and
switching
between 1.8.7 p302 and 1.9.2 p0, I’ve ended up with the same results,
pixmap_image_composite32() for some reason is causing a segfault in
wxRuby,
no matter the circumstances. I’ve had it crop up in a good portion of
the
examples, and been trying to backtrace the issues to their problems.
Sadly,
it seems that it doesn’t matter which class is being used, and it
doesn’t
matter which example is being tried out, it will still cause the same
problems. Sometimes it’ll wait till the user does an action, such as
menu
click, or it will crash immediately after the start of the run.
And it always crashes on pixmap_image_composite32(). From what I’ve
found
of the libpixman library, it’s a drawing function that will basically
blit
an image with a composite form from src, to destination. So it is some
kind
of drawing function, but somehow it’s crashing. And I’ve tested with
various C++ Examples provided with wxWidgets, and they all seem to
operate
perfectly fine. I’m currently at a lost as to what is causing this.
perfectly fine. I’m currently at a lost as to what is causing this.
I’m sure it’s not good for your sanity, but I just found out that our
beloved problem isn’t limited to Ubuntu. Yesterday I decided to give
Arch Linux a try and today I wanted to do some developing with wxRuby,
but nope. Here’s what I did:
Compiled Ruby 1.9.2-p0 to /opt/rubies/ruby-1.9.2-p0
Compiled wxRuby on top of Arch’s distro wxWidgets
Installed the wxruby-ruby19 gem I just compiled
And now the expected segfault:
√ quintus@pegasus =>
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/samples/minimal
$ ruby -dw minimal.rb
Exception LoadError' at <internal:lib/rubygems/custom_require>:29 - no such file to load -- rubygems/defaults/operating_system Exception LoadError’ at internal:lib/rubygems/custom_require:37 - no
such file to load – rubygems/defaults/operating_system
Exception LoadError' at <internal:lib/rubygems/custom_require>:29 - no such file to load -- rubygems/defaults/ruby Exception LoadError’ at internal:lib/rubygems/custom_require:37 - no
such file to load – rubygems/defaults/ruby
Exception `LoadError’ at internal:lib/rubygems/custom_require:29 - no
such file to load – wx
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wxruby2.so:
warning: method redefined; discarding old get_alpha_data
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wxruby2.so:
warning: method redefined; discarding old get_rgb_data
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/data_object_simple.rb:3:
warning: method redefined; discarding old get_data_size
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/data_object.rb:3:
warning: method redefined; discarding old get_preferred_format
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/data_object.rb:7:
warning: method redefined; discarding old get_format_count
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/data_object.rb:11:
warning: method redefined; discarding old get_data_size
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/app.rb:30:
warning: method redefined; discarding old on_assert_failure
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/validator.rb:4:
warning: method redefined; discarding old clone
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/clientdc.rb:8:
warning: method redefined; discarding old initialize
/opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/paintdc.rb:7:
warning: method redefined; discarding old initialize
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension
libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
The issue is definitely related to libpixman’s version and not to
Ubuntu’s modifications I conclude. But that means, if the other distros
update their libpixman, wxRuby won’t work ony any of them…
This is the pixman lib Arch uses:
√ quintus@pegasus => ~
$ LANG=en_US.utf8 pacman -Qi pixman
Name : pixman
Version : 0.18.4-1
URL : http://xorg.freedesktop.org
Licenses : custom
Groups : None
Provides : None
Depends On : glibc
Optional Deps : None
Required By : cairo xorg-server
Conflicts With : None
Replaces : None
Installed Size : 480.00 K
Packager : Jan de Groot [email protected]
Architecture : x86_64
Build Date : Tue 17 Aug 2010 08:59:48 AM CEST
Install Date : Sun 14 Nov 2010 11:17:47 AM CET
Install Reason : Installed as a dependency for another package
Install Script : No
Description : Pixman library
ruby -v, just for completeness:
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
uname -a:
Linux pegasus 2.6.35-ARCH #1 SMP PREEMPT Sat Oct 30 21:22:26 CEST 2010
x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
Today I upgraded my Arch Linux, and now wxRuby works just fine!
===================================
√ quintus@pegasus => ~
$ export LANG=en_US.utf8
√ quintus@pegasus => ~
$ pacman -Qi pixman
Name : pixman
Version : 0.20.0-1
URL : http://xorg.freedesktop.org
Licenses : custom
Groups : None
Provides : None
Depends On : glibc
Optional Deps : None
Required By : cairo xorg-server
Conflicts With : None
Replaces : None
Installed Size : 528.00 K
Packager : Jan de Groot [email protected]
Architecture : x86_64
Build Date : Mon 01 Nov 2010 11:25:44 PM CET
Install Date : Sat 20 Nov 2010 01:12:04 PM CET
Install Reason : Installed as a dependency for another package
Install Script : No
Description : Pixman library
√ quintus@pegasus => ~
$ pacman -Qi wxgtk
Name : wxgtk
Version : 2.8.11-2
URL : http://wxwidgets.org
Licenses : custom:wxWindows
Groups : None
Provides : None
Depends On : gtk2 gstreamer0.10-base libgl libxxf86vm
Optional Deps : None
Required By : None
Conflicts With : None
Replaces : None
Installed Size : 20292.00 K
Packager : Eric B. [email protected]
Architecture : x86_64
Build Date : Mon 15 Nov 2010 10:32:17 PM CET
Install Date : Sat 20 Nov 2010 01:12:12 PM CET
Install Reason : Explicitly installed
Install Script : No
Description : GTK+ implementation of wxWidgets API for GUI
√ quintus@pegasus => ~
$ uname -a
Linux pegasus 2.6.35-ARCH #1 SMP PREEMPT Sat Oct 30 21:22:26 CEST 2010
x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
√ quintus@pegasus => ~
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
√ quintus@pegasus => ~
$ gem list wxruby-ruby19
Even the bidgemo runs fine! I’ll kick my Ubuntu Maverick and just leave
a small Ubuntu Lucid installation for security reasons - I’m quite new
to Arch, probably I break something.