# Compiling wxRuby on Ubuntu 10.04

**URL:** <https://www.ruby-forum.com/t/compiling-wxruby-on-ubuntu-10-04/197984>\
**Category:** wxRuby\
**Created:** [October 24, 2010, 2:17am UTC](https://www.ruby-forum.com/t/compiling-wxruby-on-ubuntu-10-04/197984 "2010-10-24T02:17:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [October 24, 2010, 2:17am UTC](https://www.ruby-forum.com/t/compiling-wxruby-on-ubuntu-10-04/197984/1 "2010-10-24T02:17:24Z")

</div>

I tried following your instructions and everything was going ok until I  
got  
to the following step:

> From: Quintus [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> Now unpack wxRuby and  
> $ cd wxruby-2.0.1  
> $ rake

src/BitmapButton.cpp:3771: warning: format not a string literal and no  
format arguments  
rake aborted!  
Command failed with status (1): [g++ -c  
-I/usr/local/lib/wx/include/gtk2-…]  
/usr/local/lib/ruby/1.9.1/rake.rb:993:in `block in sh' /usr/local/lib/ruby/1.9.1/rake.rb:1008:in `call’  
/usr/local/lib/ruby/1.9.1/rake.rb:1008:in `sh' /usr/local/lib/ruby/1.9.1/rake.rb:1092:in `sh’  
…/wxruby-2.0.1/rake/rakewx.rb:155:in `block in <top (required)>' /usr/local/lib/ruby/1.9.1/rake.rb:632:in `call’  
/usr/local/lib/ruby/1.9.1/rake.rb:632:in `block in execute' /usr/local/lib/ruby/1.9.1/rake.rb:629:in `each’  
/usr/local/lib/ruby/1.9.1/rake.rb:629:in `execute' /usr/local/lib/ruby/1.9.1/rake.rb:595:in `block in  
invoke\_with\_call\_chain’  
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' /usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke\_with\_call\_chain’  
/usr/local/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites' /usr/local/lib/ruby/1.9.1/rake.rb:602:in `each’  
/usr/local/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites' /usr/local/lib/ruby/1.9.1/rake.rb:594:in `block in  
invoke\_with\_call\_chain’  
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' /usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke\_with\_call\_chain’  
/usr/local/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites' /usr/local/lib/ruby/1.9.1/rake.rb:602:in `each’  
/usr/local/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites' /usr/local/lib/ruby/1.9.1/rake.rb:594:in `block in  
invoke\_with\_call\_chain’  
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' /usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke\_with\_call\_chain’  
/usr/local/lib/ruby/1.9.1/rake.rb:581:in `invoke' /usr/local/lib/ruby/1.9.1/rake.rb:2041:in `invoke\_task’  
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level' /usr/local/lib/ruby/1.9.1/rake.rb:2019:in `each’  
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level' /usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard\_exception\_handling’  
/usr/local/lib/ruby/1.9.1/rake.rb:2013:in `top_level' /usr/local/lib/ruby/1.9.1/rake.rb:1992:in `run’  
/usr/local/bin/rake:31:in `’

Am I missing something? Thanks.

-Philip

---

<div class="post-metadata">

**Author:** ![pnomolos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/85f322/32.png) [@pnomolos](https://www.ruby-forum.com/u/pnomolos)\
**Post date:** [October 24, 2010, 10:37am UTC](https://www.ruby-forum.com/t/compiling-wxruby-on-ubuntu-10-04/197984/2 "2010-10-24T10:37:03Z")

</div>

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

Am 24.10.2010 01:58, schrieb Philip S.:

> rake aborted!  
> /usr/local/lib/ruby/1.9.1/rake.rb:629:in `execute' /usr/local/lib/ruby/1.9.1/rake.rb:602:in `each’  
> /usr/local/lib/ruby/1.9.1/rake.rb:2013:in `top_level' /usr/local/lib/ruby/1.9.1/rake.rb:1992:in `run’  
> /usr/local/bin/rake:31:in `’
> 
> Am I missing something? Thanks.
> 
> -Philip

Your post is missing the actual error. The string literal warning occurs  
many times during compilation and shouldn’t lead to an interruption.  
Did you compile wxWidgets yourself? I’m wondering, because your include  
path shows /usr/local/lib/wx, which should be /usr/lib/wx I think.  
What is the output of

$ ruby -rrbconfig -ve ‘puts RbConfig::CONFIG[“configure\_args”]’  
$ dpkg -L libwxgtk2.8-dev  
$ which wx-config

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

iQEcBAEBAgAGBQJMw+YAAAoJEGrS0YjAWTKV+RkH/i7omyXw2d5j+oyez8hCkL6B  
qbH7RkTtx3D5erLFPirB8UpSN1tuSigZq7pPX6uVSNvFN3F9vuLTDzzWXKz+zdWA  
6SyDErzGjo8p4UatdUcKAaLpvsPUIduxSZeW2R21+iB2UhJ15+pcu5MIeRcM6wKb  
KpHF/tqQexrLxCrr8Kwx3mKEEGgShntw+CaI03nigXk1KDhGwkweexcH4CyJ6ReI  
90OgqOgPfcABKtQ/SQxwMjIYLwllApETwqDQbgtZ3M8xJnzri8T0zJDdDhyMB84F  
oLJvmdXumguBmEjGxEB2ABCgfWqi2wsO/tqBiNN2a9QS9FB1hNyEwPInfLlnPGs=  
=xQy9  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![pnomolos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/85f322/32.png) [@pnomolos](https://www.ruby-forum.com/u/pnomolos)\
**Post date:** [October 25, 2010, 5:27am UTC](https://www.ruby-forum.com/t/compiling-wxruby-on-ubuntu-10-04/197984/3 "2010-10-25T05:27:54Z")

</div>

Marvin GÃ¼lker wrote in post #956682:

> Your post is missing the actual error. The string literal warning occurs  
> many times during compilation and shouldn’t lead to an interruption.  
> Did you compile wxWidgets yourself?

Yes I did.

I’m wondering, because your include

> path shows /usr/local/lib/wx, which should be /usr/lib/wx I think.  
> What is the output of
> 
> $ ruby -rrbconfig -ve ‘puts RbConfig::CONFIG[“configure\_args”]’  
> $ dpkg -L libwxgtk2.8-dev  
> $ which wx-config
> 
> ?

$ruby -rrbconfig -ve ‘puts RbConfig::CONFIG[“configure\_args”]’  
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]  
‘–enable-shared’

$ dpkg -L libwxgtk2.8-dev  
/.  
/usr  
/usr/lib  
/usr/lib/wx  
/usr/lib/wx/include  
/usr/lib/wx/include/gtk2-unicode-release-2.8  
/usr/lib/wx/include/gtk2-unicode-release-2.8/wx  
/usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h  
/usr/lib/wx/config  
/usr/lib/wx/config/gtk2-unicode-release-2.8  
/usr/share  
/usr/share/doc  
/usr/share/doc/libwxgtk2.8-dev  
/usr/share/doc/libwxgtk2.8-dev/changelog.gz  
/usr/share/doc/libwxgtk2.8-dev/copyright  
/usr/share/doc/libwxgtk2.8-dev/changelog.Debian.gz  
/usr/lib/libwx\_gtk2u\_adv-2.8.so  
/usr/lib/libwx\_gtk2u\_aui-2.8.so  
/usr/lib/libwx\_gtk2u\_core-2.8.so  
/usr/lib/libwx\_gtk2u\_fl-2.8.so  
/usr/lib/libwx\_gtk2u\_gizmos-2.8.so  
/usr/lib/libwx\_gtk2u\_gizmos\_xrc-2.8.so  
/usr/lib/libwx\_gtk2u\_gl-2.8.so  
/usr/lib/libwx\_gtk2u\_html-2.8.so  
/usr/lib/libwx\_gtk2u\_media-2.8.so  
/usr/lib/libwx\_gtk2u\_ogl-2.8.so  
/usr/lib/libwx\_gtk2u\_plot-2.8.so  
/usr/lib/libwx\_gtk2u\_qa-2.8.so  
/usr/lib/libwx\_gtk2u\_richtext-2.8.so  
/usr/lib/libwx\_gtk2u\_stc-2.8.so  
/usr/lib/libwx\_gtk2u\_svg-2.8.so  
/usr/lib/libwx\_gtk2u\_xrc-2.8.so

$ which wx-config  
/usr/local/bin/wx-config

---

<div class="post-metadata">

**Author:** ![pnomolos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/85f322/32.png) [@pnomolos](https://www.ruby-forum.com/u/pnomolos)\
**Post date:** [October 25, 2010, 4:06pm UTC](https://www.ruby-forum.com/t/compiling-wxruby-on-ubuntu-10-04/197984/4 "2010-10-25T16:06:15Z")

</div>

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

Am 25.10.2010 05:27, schrieb Philip S.:

> > $ which wx-config  
> > /usr/lib  
> > /usr/share/doc/libwxgtk2.8-dev/changelog.gz  
> > /usr/lib/libwx\_gtk2u\_media-2.8.so

It seems you have two wxWidgets installations, one in /usr (that’s that  
one from the Ubuntu repos) and one in /usr/local (probably  
self-compiled?). /usr/local/bin comes first in PATH, therefore the  
wxWidgets installation there is used by wxRuby. Try this:

$ wx-config --prefix  
$ /usr/local/bin/wx-config --prefix #Same as above  
$ /usr/bin/wxconfig --prefix

and two different wxWidgets prefixes will eventually be shown. Building  
on “top of the distro packages” should work fine, so I suggest you to  
uninstall the wxWidgets in /usr/local/ either by running

$ sudo make uninstall

in the source directory of the compiled wxWidgets, or, if you don’t have  
that source directory anymore, a

$ cd /usr/local  
$ find -regex ‘._libwx._’ -or -regex ‘._/wx-._’ -or -name wxrc

_should_ list all wxWidgets files under /usr/local. Deleting those  
_should_ result in a complete deletion of the wxWidgets installation in  
/usr/local. However, do review the list of found files; deleting  
something non-wxish unintentionally can cause problems (as you might  
imagine). For instance, on my system this shows some Python files:

$ find -regex ‘._libwx._’ -or -regex ‘._/wx-._’ -or -name wxrc | grep py  
./include/wx-2.8/wx/wxPython/pytree.h  
./include/wx-2.8/wx/wxPython/pyistream.h  
./include/wx-2.8/wx/wxPython/pydrawxxx.h  
./include/wx-2.8/wx/wxPython/pyclasses.h  
./share/doc/libwxgtk2.8-dev/copyright  
./share/doc/libwxbase2.8-dev/copyright  
./share/doc/libwxbase2.8-0/copyright  
./share/doc/libwxgtk2.8-0/copyright

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

iQEcBAEBAgAGBQJMxXf8AAoJEGrS0YjAWTKV3NQH/1bfYpXOVl3G7cQnBSk2h6gc  
+ekR7qKav4B/wSLs3nUH5LxTFm1c1w+lonv1doTrQ/k9/wJsPO75JAgRihyEOijW  
NYYXTHsbP+Z8ghDoiMd1COj4wG96+MsGlqPOk3oIkde4H0VzNOdCA48kH6AT7R6X  
vwbLrgZ8RjEvrOfOlS+sgSZcbeseEWg/rLTavmxQWBXLhRDlpv9cF2rRvn6PCxaQ  
Kmt4gXnibwRFr+xTNJAfqMCFbXoY5FxeLYREPpGsbIXvxvEdHAR5se89Z6Rv9Wfh  
snxNtzvo0dfv7DCwINNYh2veKjDaWCBue9Y4bG5HEdUKjoxU1Z11EoFqvXPFuLY=  
=Fk/f  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![pnomolos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/85f322/32.png) [@pnomolos](https://www.ruby-forum.com/u/pnomolos)\
**Post date:** [October 26, 2010, 8:24pm UTC](https://www.ruby-forum.com/t/compiling-wxruby-on-ubuntu-10-04/197984/5 "2010-10-26T20:24:12Z")

</div>

Hello All,

Due to some issues with the setup of 10.10, I’ve been working on getting  
a  
new version of the wxRuby gems setup, and ready for you all. Currently,  
since it was the one requested by Phillip Stephens, I’ve posted a Ruby  
1.9  
Gem which can be downloaded from  
[http://www.trilake.net/wxRuby/wxruby-ruby19-2.0.1-x86-linux.gem](http://www.trilake.net/wxRuby/wxruby-ruby19-2.0.1-x86-linux.gem)

This version of the gem, has been compiled to work without wxMediaCtrl  
compiled in with the main wxWidgets Library. I will be setting up a new  
distro in my Apt repository to upload new versions of the wxRuby library  
for  
i386 and x86\_64, specifically for Maverick Meerkat. I will be setting  
up my  
64bit install of Ubuntu to host a VM for Lucid Lynx, to get installs for  
both 32bit and 64bit versions for 10.04. I apologize for the lateness  
in  
this post, but I was just able to get everything compiled, and uploaded.

Please bear with me, as I get the repositories setup, and going with  
proper  
authentication of the source packages, and such.

hth,

Mario

P.S. Installation instructions in a Copy & Paste Method for the Gem:

wget [http://www.trilake.net/wxRuby/wxruby-ruby19-2.0.1-x86-linux.gem](http://www.trilake.net/wxRuby/wxruby-ruby19-2.0.1-x86-linux.gem)  
sudo gem install wxruby-ruby19-2.0.1-x86-linux.gem

---

<div class="post-metadata">

**Author:** ![pnomolos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/85f322/32.png) [@pnomolos](https://www.ruby-forum.com/u/pnomolos)\
**Post date:** [October 26, 2010, 11:00pm UTC](https://www.ruby-forum.com/t/compiling-wxruby-on-ubuntu-10-04/197984/6 "2010-10-26T23:00:37Z")

</div>

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

Am 26.10.2010 20:15, schrieb Mario S.:

> distro in my Apt repository to upload new versions of the wxRuby library for  
> i386 and x86\_64, specifically for Maverick Meerkat. I will be setting up my  
> 64bit install of Ubuntu to host a VM for Lucid Lynx, to get installs for  
> both 32bit and 64bit versions for 10.04. I apologize for the lateness in  
> this post, but I was just able to get everything compiled, and uploaded.

I’m really interested in how you managed to do a successful compile on  
Ubuntu Maverick. I’ve been trying to do that for more than a week now  
and still no success (see my previous posts on this lists, e.g. here:  
[Compiling wxWidgets/wxRuby on Ubuntu 10.10 Maverick - wxRuby - Ruby-Forum](http://www.ruby-forum.com/topic/260671) ). Even if compilation was done  
without problems, I was bombed with segfaults when trying to use wxRuby,  
even with the minimal sample a click on the “File” menu made Ruby crash.  
Could you post some instructions on how to get that working (maybe in a  
new thread, as this is not what the OP is trying to do)?

Vale,  
Marvin

> sudo gem install wxruby-ruby19-2.0.1-x86-linux.gem  
> -----BEGIN PGP SIGNATURE-----  
> Version: GnuPG v1.4.10 (GNU/Linux)  
> Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org/](http://enigmail.mozdev.org/)

iQEcBAEBAgAGBQJMxz+NAAoJEGrS0YjAWTKVKKwH/2GwpoSvR3ur0ZUdi7JjLlhY  
iteTvnFlxUXYBJDCIgZkNZUZdRHydIy+HAfdXS2tBwFcejjFp+JCt6l0VTl+LrBw  
HjGogxD82xd6Rq+H8TDL0uJF//qtfJaIF2ikXkLnr5+TLmXf0pSpdNKLFp+SMMTS  
phPw1zdq5hyli2/gBr79oPPVpGLZzvpDs5VCEsEh7kQMUz40OOeCX5pR1Pe9BH+k  
HvKTvOBgI2ciJsyTtsM4CagrLgmO1P76TDmXGnyxG6wIccdJUb9RW1m5RM4+Rs4R  
92gTiULh8yLCzqYYjazmSm8tcXIJFK01+5tBA9kCiGHoBonGEuaSJQ54JSO/X9g=  
=vUP2  
-----END PGP SIGNATURE-----
