# wxRuby on Ubuntu 9.10

**URL:** <https://www.ruby-forum.com/t/wxruby-on-ubuntu-9-10/178160>\
**Category:** wxRuby\
**Created:** [October 30, 2009, 1:42am UTC](https://www.ruby-forum.com/t/wxruby-on-ubuntu-9-10/178160 "2009-10-30T01:42:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scrozier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/48db29/32.png) [@scrozier](https://www.ruby-forum.com/u/scrozier)\
**Post date:** [October 30, 2009, 1:42am UTC](https://www.ruby-forum.com/t/wxruby-on-ubuntu-9-10/178160/1 "2009-10-30T01:42:24Z")

</div>

Installing the gem from rubygems, along with the available wxwidgets  
packages from synaptic, I’d recieve this error:

/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so:  
/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so:  
symbol \_ZN13wxAuiNotebook14ShowWindowMenuEv, version WXU\_2.8.5 not  
defined in file libwx\_gtk2u\_aui-2.8.so.0 with link time reference -  
/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so  
(LoadError)

So I went the route of compiling my own wxRuby (still using the  
wxwidgets libraries from synaptic). Received this error:

Class: GLCanvas  
: Window  
class wxGLCanvas  
g++ -c -I/usr/lib/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=208010 -fno-strict-aliasing -g -g -O2 -fPIC  
-Wno-unused-function -I. -I /usr/lib/ruby/1.8/i486-linux -o  
obj/GLCanvas.o src/GLCanvas.cpp  
In file included from /usr/include/wx-2.8/wx/glcanvas.h:54,  
from src/GLCanvas.cpp:2207:  
/usr/include/wx-2.8/wx/gtk/glcanvas.h:19:19: error: GL/gl.h: No such  
file or directory  
/usr/include/wx-2.8/wx/gtk/glcanvas.h:20:20: error: GL/glx.h: No such  
file or directory  
/usr/include/wx-2.8/wx/gtk/glcanvas.h:21:20: error: GL/glu.h: No such  
file or directory  
In file included from /usr/include/wx-2.8/wx/glcanvas.h:54,  
from src/GLCanvas.cpp:2207:  
/usr/include/wx-2.8/wx/gtk/glcanvas.h:47: error: â€˜GLXContextâ€™ does not  
name a type  
/usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: ISO C++ forbids  
declaration of â€˜GLXFBConfigâ€™ with no type  
/usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: expected â€˜;â€™ before  
â€˜\*â€™ token  
rake aborted!  
Command failed with status (1): [g++ -c  
-I/usr/lib/wx/include/gtk2-unicod…]

Finally I compiled wxWidgets from source following the wxRuby wiki, then  
compiled wxRuby from source doing the same…

And now I’m getting this error:  
LoadError: /usr/local/lib/site\_ruby/1.8/i486-linux/wxruby2.so: undefined  
symbol: gst\_element\_query\_duration -  
/usr/local/lib/site\_ruby/1.8/i486-linux/wxruby2.so  
from /usr/local/lib/site\_ruby/1.8/i486-linux/wxruby2.so  
from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`require' from /usr/local/lib/site_ruby/1.8/wx.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in`gem\_original\_require’  
from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`require’  
from (irb):1

ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]  
wxWidgets 2.8.10 compiled from source following the wxRuby wiki.  
SWIG Version 1.3.36

Not sure where to go from here.

---

<div class="post-metadata">

**Author:** ![scrozier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/48db29/32.png) [@scrozier](https://www.ruby-forum.com/u/scrozier)\
**Post date:** [October 30, 2009, 10:03pm UTC](https://www.ruby-forum.com/t/wxruby-on-ubuntu-9-10/178160/2 "2009-10-30T22:03:49Z")

</div>

Steve cd wrote:

> Installing the gem from rubygems, along with the available wxwidgets  
> packages from synaptic, I’d recieve this error:
> 
> /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so:  
> /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so:  
> symbol \_ZN13wxAuiNotebook14ShowWindowMenuEv, version WXU\_2.8.5 not  
> defined in file libwx\_gtk2u\_aui-2.8.so.0 with link time reference -  
> /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so  
> (LoadError)
> 
> So I went the route of compiling my own wxRuby (still using the  
> wxwidgets libraries from synaptic). Received this error:
> 
> Class: GLCanvas  
> : Window  
> class wxGLCanvas  
> g++ -c -I/usr/lib/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=208010 -fno-strict-aliasing -g -g -O2 -fPIC  
> -Wno-unused-function -I. -I /usr/lib/ruby/1.8/i486-linux -o  
> obj/GLCanvas.o src/GLCanvas.cpp  
> In file included from /usr/include/wx-2.8/wx/glcanvas.h:54,  
> from src/GLCanvas.cpp:2207:  
> /usr/include/wx-2.8/wx/gtk/glcanvas.h:19:19: error: GL/gl.h: No such  
> file or directory  
> /usr/include/wx-2.8/wx/gtk/glcanvas.h:20:20: error: GL/glx.h: No such  
> file or directory  
> /usr/include/wx-2.8/wx/gtk/glcanvas.h:21:20: error: GL/glu.h: No such  
> file or directory  
> In file included from /usr/include/wx-2.8/wx/glcanvas.h:54,  
> from src/GLCanvas.cpp:2207:  
> /usr/include/wx-2.8/wx/gtk/glcanvas.h:47: error: â€˜GLXContextâ€™ does not  
> name a type  
> /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: ISO C++ forbids  
> declaration of â€˜GLXFBConfigâ€™ with no type  
> /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: expected â€˜;â€™ before  
> â€˜\*â€™ token  
> rake aborted!  
> Command failed with status (1): [g++ -c  
> -I/usr/lib/wx/include/gtk2-unicod…]
> 
> Finally I compiled wxWidgets from source following the wxRuby wiki, then  
> compiled wxRuby from source doing the same…
> 
> And now I’m getting this error:  
> LoadError: /usr/local/lib/site\_ruby/1.8/i486-linux/wxruby2.so: undefined  
> symbol: gst\_element\_query\_duration -  
> /usr/local/lib/site\_ruby/1.8/i486-linux/wxruby2.so  
> from /usr/local/lib/site\_ruby/1.8/i486-linux/wxruby2.so  
> from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
> `require' from /usr/local/lib/site_ruby/1.8/wx.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem\_original\_require’  
> from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
> `require’  
> from (irb):1
> 
> ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]  
> wxWidgets 2.8.10 compiled from source following the wxRuby wiki.  
> SWIG Version 1.3.36
> 
> Not sure where to go from here.

I finally worked it out. I ended up uninstalling everything, using the  
package manager’s wxwidgets libraries, and compiling wxRuby from source.  
This time it worked so I assume I was missing some library when I tried  
this before… maybe libmesa. One odd thing was that rake install may  
not have copied wxruby2.so to the correct location. I’m not qualified  
at all to back that up with any certainty, but I received this error:  
irb(main):001:0\> require ‘wx’  
LoadError: no such file to load – wxruby2  
from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’  
from /usr/local/lib/site\_ruby/1.8/wx.rb:12  
from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’  
from (irb):1

I edited wx.rb’s require statment to point at the source directory’s  
lib/wxruby2.so… no idea if that is recommended.

---

<div class="post-metadata">

**Author:** ![scrozier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/48db29/32.png) [@scrozier](https://www.ruby-forum.com/u/scrozier)\
**Post date:** [October 30, 2009, 10:34pm UTC](https://www.ruby-forum.com/t/wxruby-on-ubuntu-9-10/178160/3 "2009-10-30T22:34:43Z")

</div>

That is not recommended, as you may accidentally delete the source  
directory, and it will loose the wxruby2.so file.

The best solution to install wxRuby once you have compiled it, is to do:  
[eumario@localhost ~/wxruby2/]: WXRUBY\_VERSION=2.0.1 rake gem  
[eumario@localhost ~/wxruby2/]: gem install wxruby-2.0.1-x86-linux.gem

This will create the Gem, and install it as a gem, as you provide the  
exact  
filename, it will install it from the local directory, instead of going  
out  
to the net to grab it.
