Compiling wxWidgets/wxRuby on Ubuntu 10.10 Maverick

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

Three days ago I updated my Ubuntu Lucid to a Maverick box and got to
know that this bug:
Bug #632984 “libwx_gtk2u_media-2.8.so.0 missing from libwxgtk2.8...” : Bugs : wxwidgets2.8 package : Ubuntu makes
it impossible to compile wxRuby. I then tried to compile wxWidgets
myself, and it seemed to work, but today I started serious developing -
I got plenty of segmentation faults.
I decided to follow the guidelines at the wxRuby wiki (
http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets )
exactly, but it didn’t work out[1] either, I’m still getting segfaults
when using more complex controls than the StaticText widget. For example
running the minimal.rb sample from the wxRuby gem and clicking the
“File” menu results in this: http://pastie.org/1229483
So, what is the correct way to comile wxWidgets on Ubuntu in order to
make it work with wxRuby?

Vale,
Marvin

[1]Btw. the step “cd contrib/stc” is not possible, that has to be “cd
contrib/src/stc” or just “cd contrib” (which builds all contributions
and was what I did).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMvBQVAAoJEGrS0YjAWTKVQVcH/2wlDQIM4C7E5iOfVZI/amSx
6QCuPrNl8re10eq0C2rVj+ZTQYcPsnek0Zlo1EwbJa13nRfLq6fcn7bYbId6jyPf
1NVt7Rn3Kq9k6/184HtLP8VJTSU9RmXwMV7bctGcMLwzFqov/sZNQaLlsZn4Pn9t
xNt19/MNMs4fLo+rcGEOGBFihUeWfPFUKAac7FqONYYpyljnwCBSChm8ULQpzRi1
cibWckTkw9PTnTzCURnmNIPdPNZ7m1dp+typySzjJspyvXs3OMYJzIlsMoOHvvh4
6pywi+fhv2hdcAKNdT1wll2YLwcxc7SKgzOKu/fb9HOKxuyEyaitxhGQEuyZ63A=
=H2VH
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 18.10.2010 11:33, schrieb Quintus:

exactly, but it didn’t work out[1] either, I’m still getting segfaults
contrib/src/stc" or just “cd contrib” (which builds all contributions
and was what I did).

Anyone ever compiled wxWidgets and got it to work with wxRuby?

Vale,
Marvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMvdnIAAoJEGrS0YjAWTKVULUIAI19fpZgdpTcX3F+WsY+8E0K
22hSDh5+BGcO8DP4gIbe3FrI2OpPb/0WCF15JvK8lFR59wGd/Lmm5zmpyls1VDzK
dvrgJnrSVuncqafHc+JRDtFfKKVcgUe8Aj08mMfJSGv40Rx5VZySL1TE+bH+Ivd4
Z+aEiNblnkIsfRPLN5btWisQBzeUGHsDxbh8ZVOUIu3XhZGZMbSL/zUIMfo8cpEL
JkecTHa4hOR+fwYxa/DNam3ecQZQIt0Zthz+IeF0Ky2Qloh5r/Vivyo8QFnbSmvK
7o6Q+eRHzhzPra1CZO4utRtF+4tIfA8zoE/7xWfTZ4zjMypuLccASvHrE2VZ3GY=
=o2U0
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 19.10.2010 19:48, schrieb Quintus:

http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets )
[1]Btw. the step “cd contrib/stc” is not possible, that has to be “cd
contrib/src/stc” or just “cd contrib” (which builds all contributions
and was what I did).

Anyone ever compiled wxWidgets and got it to work with wxRuby?

Vale,
Marvin

This stupid thing prevents me from continuing developing. Do I really
have to go back to Ubuntu Lucid to get wxWidgets/wxRuby to work?!

Vale,
Marvin


wxruby-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wxruby-users

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMv/9cAAoJEGrS0YjAWTKVCmwH/iUx+peqKDqiqPVrP7i6qw4i
UqYEYCQE4XW0FjwAFc/umhMsZC6/g8V27DnF7Jt3CaIDBe3nBVRhPQa/Gb/584oV
nOCx4Ile1pIupVDSQdj5Gkw5YclTcTyyZT8lRnnplf0BBhClMPE8MaxIQmlfXJVp
NsgOl8j9/iawYdPOtvPwhKch2lLVc88sF+mtEfqi7h08at+gZXfodBgbcewnRZIj
WEAwtOQuOnOkX7xyIdJkoySWlDfoRBXItQWvuJ6kBYy6usm5XY3nuyHBCaNH1Dji
bkK2wkU4MjGgDIu/ishkQkUS8X6tuWoZDKQ/0w4Gg0olf2gJoNJEeZBPoNB9FQI=
=tUC4
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 21.10.2010 10:52, schrieb Quintus:

This stupid thing prevents me from continuing developing. Do I really
have to go back to Ubuntu Lucid to get wxWidgets/wxRuby to work?!

Vale,
Marvin

OK guys, I’m one step nearer to the goal of a usable wxRuby on Ubuntu
Maverick… I decided to give the distro packages another try and
thought the the missing libwx_gtk2u_media-2.8.so.0 shared object file
should only affect the MediaCtrl. I tried to exclude MediaCtrl from
compilation via the WXRUBY_EXCLUDE variable, but I got to know that the
INSTALL file contains a fatal typo: After looking through wxRuby’s
Rakefiles I found the variable is actually named WXRUBY_EXCLUDED (note
the letter D at the end). So I tried

$ export WXRUBY_EXCLUDED=MediaCtrl
$ rake
and it compiled successfully! So I continued:
$ strip -x lib/wxruby2.so
$ rake gem

But nope:

(…)
Cannot build a package without a version being specified
Create a version by running rake with WXRUBY_VERSION=x.x.x
(…)

OK, not that hard.

$ rake gem WXRUBY_VERSION=2.0.1
rake aborted!
can’t modify frozen string
(…)

Uh! What’s that? Following the backtrace, I found it was line 22 in
rakepackage.rb which caused the error. I changed it from

spec.version = WXRUBY_VERSION

to

spec.version = WXRUBY_VERSION.dup

and finally, I got my gem file!

$ rake gem WXRUBY_VERSION=2.0.1
(in /home/quintus/Downloads/wxruby-2.0.1)
Enabling DYNAMIC build
Enabling RELEASE build
Enabling UNICODE build
The following wxWidgets features are not available and will be skipped:
MediaCtrl
MediaCtrl
MediaEvent
PrinterDC
Successfully built RubyGem
Name: wxruby-ruby19
Version: 2.0.1
File: wxruby-ruby19-2.0.1-x86_64-linux.gem

It’s interesting that MediaCtrl shows up twice in the list of skipped
features. Without the WXRUBY_EXCLUDED variable set, it appeared once,
but nevertheless wxRuby failed to compile saying
libwx_gtk2u_media-2.8.so couldn’t be found. I had to explicitely exclude
the MediaCtrl class to get rid of that dependency.
Now I continued with installation of the gem (which went just fine; I
even removed my previous wxruby-ruby19 gem to avoid conflicts) and tried
to run the minimal sample:

quintus@kerberos =>
/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 minimal.rb

(wxruby:27876): Gtk-WARNING **: Error parsing gtk-icon-sizes string:
‘panel-menu=24,24
panel=20,20
gtk-button=18,18
gtk-large-toolbar=24,24’
/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:16:
[BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

  • – control frame ----------
    c:0006 p:---- s:0017 b:0017 l:000016 d:000016 CFUNC :on_run
    c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :main_loop
    c:0004 p:0053 s:0012 b:0012 l:000011 d:000011 METHOD
    /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:16
    c:0003 p:0062 s:0006 b:0006 l:000e98 d:001c78 EVAL minimal.rb:73
    c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
    c:0001 p:0000 s:0002 b:0002 l:000e98 d:000e98 TOP

  • – Ruby level backtrace information

minimal.rb:73:in <main>' /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:16:in run’
/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:16:in
main_loop' /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:16:in on_run’

  • – C level backtrace information

/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(rb_vm_bugreport+0x5f)
[0x7f46f390248f]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x5fff6) [0x7f46f37eaff6]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(rb_bug+0xb3)
[0x7f46f37eb193]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x109285) [0x7f46f3894285]
/lib/libpthread.so.0(+0xfb40) [0x7f46f357db40]
/usr/lib/libpixman-1.so.0(pixman_image_composite32+0x668)
[0x7f46e62b79e8]
/usr/lib/libcairo.so.2(+0x29463) [0x7f46e91a3463]
/usr/lib/libcairo.so.2(+0x2a61c) [0x7f46e91a461c]
/usr/lib/libcairo.so.2(+0x2c31d) [0x7f46e91a631d]
/usr/lib/libcairo.so.2(+0x2c55e) [0x7f46e91a655e]
/usr/lib/libcairo.so.2(+0x49f56) [0x7f46e91c3f56]
/usr/lib/libcairo.so.2(+0x2243e) [0x7f46e919c43e]
/usr/lib/libcairo.so.2(cairo_fill_preserve+0x1d) [0x7f46e919343d]
/usr/lib/librsvg-2.so.2(+0x29f8e) [0x7f46def3df8e]
/usr/lib/librsvg-2.so.2(+0x248a0) [0x7f46def388a0]
/usr/lib/librsvg-2.so.2(+0x1d258) [0x7f46def31258]
/usr/lib/librsvg-2.so.2(+0x1eb53) [0x7f46def32b53]
/usr/lib/librsvg-2.so.2(+0x1f093) [0x7f46def33093]
/usr/lib/librsvg-2.so.2(+0x1eb53) [0x7f46def32b53]
/usr/lib/librsvg-2.so.2(+0x1ef64) [0x7f46def32f64]
/usr/lib/librsvg-2.so.2(+0x1eb53) [0x7f46def32b53]
/usr/lib/librsvg-2.so.2(rsvg_handle_render_cairo_sub+0xca)
[0x7f46def3eb1a]
/usr/lib/librsvg-2.so.2(rsvg_handle_get_pixbuf_sub+0x105)
[0x7f46def3f065]
/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so(+0xd6b)
[0x7f46df149d6b]
/usr/lib/libgdk_pixbuf-2.0.so.0(gdk_pixbuf_loader_close+0xf9)
[0x7f46edcde889]
/usr/lib/libgdk_pixbuf-2.0.so.0(+0x89a6) [0x7f46edcdc9a6]
/usr/lib/libgdk_pixbuf-2.0.so.0(gdk_pixbuf_new_from_stream_at_scale+0x81)
[0x7f46edcdcb01]
/usr/lib/libgtk-x11-2.0.so.0(+0x104eec) [0x7f46ee4c3eec]
/usr/lib/libgtk-x11-2.0.so.0(gtk_icon_info_load_icon+0x72)
[0x7f46ee4c4612]
/usr/lib/libgtk-x11-2.0.so.0(gtk_icon_theme_load_icon+0x13f)
[0x7f46ee4c685f]
/usr/lib/libgtk-x11-2.0.so.0(gtk_icon_set_render_icon+0x5ea)
[0x7f46ee4c0faa]
/usr/lib/libgtk-x11-2.0.so.0(gtk_widget_render_icon+0xea)
[0x7f46ee61834a]
/usr/lib/libgtk-x11-2.0.so.0(+0x1185d4) [0x7f46ee4d75d4]
/usr/lib/libgtk-x11-2.0.so.0(+0x1185f9) [0x7f46ee4d75f9]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0xa9) [0x7f46ed4399b9]
/usr/lib/libgobject-2.0.so.0(+0x23da1) [0x7f46ed44eda1]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x7e6)
[0x7f46ed450996]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_by_name+0x208)
[0x7f46ed450ce8]
/usr/lib/libgtk-x11-2.0.so.0(+0x1a5138) [0x7f46ee564138]
/usr/lib/libgtk-x11-2.0.so.0(+0x11ae2f) [0x7f46ee4d9e2f]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0xa9) [0x7f46ed4399b9]
/usr/lib/libgobject-2.0.so.0(+0x23da1) [0x7f46ed44eda1]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x7e6)
[0x7f46ed450996]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_by_name+0x208)
[0x7f46ed450ce8]
/usr/lib/libgtk-x11-2.0.so.0(+0x1a5138) [0x7f46ee564138]
/usr/lib/libgtk-x11-2.0.so.0(+0x1422af) [0x7f46ee5012af]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x15e) [0x7f46ed439a6e]
/usr/lib/libgobject-2.0.so.0(+0x23da1) [0x7f46ed44eda1]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x7e6)
[0x7f46ed450996]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_by_name+0x208)
[0x7f46ed450ce8]
/usr/lib/libgtk-x11-2.0.so.0(+0x1a5138) [0x7f46ee564138]
/usr/lib/libgtk-x11-2.0.so.0(+0x13c080) [0x7f46ee4fb080]
/usr/lib/libgtk-x11-2.0.so.0(gtk_menu_popup+0x1eb) [0x7f46ee4fca7b]
/usr/lib/libgtk-x11-2.0.so.0(+0x1445a7) [0x7f46ee5035a7]
/usr/lib/libgtk-x11-2.0.so.0(+0x1446b9) [0x7f46ee5036b9]
/usr/lib/libgtk-x11-2.0.so.0(+0x146d1e) [0x7f46ee505d1e]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x15e) [0x7f46ed439a6e]
/usr/lib/libgobject-2.0.so.0(+0x23da1) [0x7f46ed44eda1]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x7e6)
[0x7f46ed450996]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x83) [0x7f46ed450f53]
/usr/lib/libgtk-x11-2.0.so.0(gtk_menu_item_select+0x50) [0x7f46ee504930]
/usr/lib/libgtk-x11-2.0.so.0(+0x14a382) [0x7f46ee509382]
/usr/lib/libgtk-x11-2.0.so.0(+0x14b2ca) [0x7f46ee50a2ca]
/usr/lib/libgtk-x11-2.0.so.0(+0x13a9d8) [0x7f46ee4f99d8]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x15e) [0x7f46ed439a6e]
/usr/lib/libgobject-2.0.so.0(+0x24120) [0x7f46ed44f120]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x62b)
[0x7f46ed4507db]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x83) [0x7f46ed450f53]
/usr/lib/libgtk-x11-2.0.so.0(+0x2536df) [0x7f46ee6126df]
/usr/lib/libgtk-x11-2.0.so.0(gtk_propagate_event+0xc3) [0x7f46ee4f1e73]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x2eb) [0x7f46ee4f2f4b]
/usr/lib/libgdk-x11-2.0.so.0(+0x5c74c) [0x7f46ee16c74c]
/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1f2) [0x7f46ecd80342]
/lib/libglib-2.0.so.0(+0x442a8) [0x7f46ecd842a8]
/lib/libglib-2.0.so.0(g_main_loop_run+0x195) [0x7f46ecd847b5]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xa7) [0x7f46ee4f33e7]
/usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN11wxEventLoop3RunEv+0x48)
[0x7f46ef336578]
/usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN9wxAppBase8MainLoopEv+0x4b)
[0x7f46ef3bbb0b]
/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(+0x202108)
[0x7f46f0e30108]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x16de46) [0x7f46f38f8e46]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(rb_funcall+0x115)
[0x7f46f38f9785]
/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(_ZN16SwigDirector_App5OnRunEv+0x2d)
[0x7f46f0e320dd]
/usr/lib/libwx_baseu-2.8.so.0(_Z7wxEntryRiPPw+0x85) [0x7f46eea66695]
/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(+0x201ff0)
[0x7f46f0e2fff0]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x172948) [0x7f46f38fd948]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x165329) [0x7f46f38f0329]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x16c4aa) [0x7f46f38f74aa]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(rb_iseq_eval_main+0x280)
[0x7f46f38f78d0]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x647b2) [0x7f46f37ef7b2]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(ruby_exec_node+0x1d)
[0x7f46f37ef7dd]
/opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(ruby_run_node+0x1e)
[0x7f46f37f125e]
ruby(main+0x4b) [0x40094b]
/lib/libc.so.6(__libc_start_main+0xfe) [0x7f46f2941d8e]
ruby() [0x400839]

[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

Aborted

ARRRGH. Everything for the cat, as we Germans say (“Alles fr die
Katz’”), i.e. all my efforts for nothing. Does someone probably have ANY
idea?

Vale,
Marvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMxG9oAAoJEGrS0YjAWTKVbeYH/301PdktlJSuW7nFsye0CjNs
BVVq8tMCBfJvFjLsMxTstBoiH+4ZrxfR94Xm9JQoKZrnmWQzid6r86Y1VLIre1+c
t38vFRAHlGuFmAAWOuF4s6WjKc9qW9LK2hn43R94auGAsm9zLktKsJn/+gcpg/QH
jJU5jp+WsPfhsgFbRVtlRPYQViImZrwPibQILEscdwPaDvy3KOVzTqFXeTnIhaUj
/NzVqz8SCU0+pvLAp47OjWj1P9CTdta++/C05C/u9Z7+UGjNaWMglW2DYDxN4gYK
DyIWJTs4/6Sk6OlYYp67lN0iRMLNZdjC+wGIMO5YZRsvTSnowPz15RqakpeQtBU=
=/8FO
-----END PGP SIGNATURE-----