Compiling wxRuby on Ubuntu 10.04

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

Hi there,

A few days ago I compiled wxRuby on Ubuntu 10.04 Lucid Lynx and came
over some issues not mentioned at
http://wxruby.rubyforge.org/wiki/wiki.pl?BuildingOnTopOfLinuxDistroPackages

First and most importantly, even though I though I had all necessary
packages installed, I was presented many errors about ld not finding
lgtk-x11-2.0 and other important libs as pango. I figured out that for
whatever reason, these files didn’t exist on my Ubuntu installation:

/usr/lib/libgtk-x11-2.0.so
/usr/lib/libgdk-x11-2.0.so
/usr/lib/libatk-1.0.so
/usr/lib/libgdk_pixbuf-2.0.so
/usr/lib/libpangoxft-1.0.so
/usr/lib/libpangox-1.0.so
/usr/lib/libpango-1.0.so

Searching for similar named files turned up that I had files ending in
“.so.0” in the /usr/lib/ directory. I’m not sure if I was correct in
doing so, but I just symlinked them to the needed file names:

/usr/lib/libgtk-x11-2.0.so.0 → /usr/lib/libgtk-x11-2.0.so
/usr/lib/libgdk-x11-2.0.so.0 → /usr/lib/libgdk-x11-2.0.so
/usr/lib/libatk-1.0.so.0 → /usr/lib/libatk-1.0.so
/usr/lib/libgdk_pixbuf-2.0.so.0 → /usr/lib/libgdk_pixbuf-2.0.so
/usr/lib/libpangoxft-1.0.so → /usr/lib/libpangoxft-1.0.so
/usr/lib/libpangox-1.0.so.0 → /usr/lib/libpangox-1.0.so
/usr/lib/libpango-1.0.so.0 → /usr/lib/libpango-1.0.so

After figuering this out, the compilation process complained about
missing gl, glu and glut headers which I thought were optional. Maybe I
missed some compile option to ommit them and if so I’d appreciate it if
someone could enlighten me about that, but installing the freeglut3-dev
package did the trick for me.
I’m not sure about the StyledTextCtrl’s dependencies–maybe I just have
the necessary headers on my system as I tend to install many development
packages on compiling problems (not only with wxRuby). Does wxRuby
complain on compilation if they’re missing?

In short here are my questions:

  • What’s about that wrongly named shared object files? Is something
    wrong with my system?
  • How to instruct rake not to build gl, glu, glut and the
    StyledTextControl extensions if the necessary development headers are
    not available for whatever reason?
  • What are the development headers needed for StyledTextCtrl?

Ah, and last but not least, why is the
http://wxruby.rubyforge.org/wiki/wiki.pl?BuildingOnTopOfLinuxDistroPackages
page not linked anywhere on the wxRuby homepage? It is only findable by
searching for it. There should be a link to it on
http://wxruby.rubyforge.org/wiki/wiki.pl?InstallingFromSource I suggest.

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

iQEcBAEBAgAGBQJMq1ZtAAoJEGrS0YjAWTKVVrYH/0L8NKbGUrD5sqCcEJsfa16R
PRRDMnYRBKyRim5UEaj05dJ1vouOyEJ+bxX8+ZidNRCnTdVpkHXemEQcayT1vXhX
rLX69l6VYn3bwN4g8I8xSaIT273gz7aDXZwZB/381nmMjHpdmi2CK2b7RQl3SBxa
X0UyEvFHHGodoMHmw6oz5R5ZHvVVFaIYr8qxARfTnTEyJ8oFPqO0VB5X1VJgCwPK
AHItQWYhAa/0z+TfClKdmVzgPdNTO4N/onaE5XtSd2xbvQPfa903T2GGV+3TIXYW
I1D/7O/tF4KSUWCRiqgGccgVCMoFx26U7+j2XWCG7sNZW6ANaiRQx0r3wJrNmu8=
=dw8X
-----END PGP SIGNATURE-----

Hello Marvin,

On Tue, Oct 5, 2010 at 12:46 PM, Quintus [email protected] wrote:

packages installed, I was presented many errors about ld not finding

/usr/lib/libpango-1.0.so.0 → /usr/lib/libpango-1.0.so

In short here are my questions:

  • What’s about that wrongly named shared object files? Is something
    wrong with my system?

First off, doing the symlink is the correct procedure. I found that
from
Ubuntu 9.04 onwards, they stop putting the symlinks in for the
libraries,
and therefore when trying to compile, it fails. Symlinking was the
correct
procedure here to compile.

  • How to instruct rake not to build gl, glu, glut and the
    StyledTextControl extensions if the necessary development headers are
    not available for whatever reason?

StyledTextControl by default should be detected on weither it’s
installed or
compiled or not into the wxWidgets library, if it isn’t compiled, then
Rake
should detect that, and not attempt to compile StyledTextControl. If
you
want StyledTextControl, then you need to ensure StyledTextControl is
either
installed (I believe it should be by default with the Ubuntu repository
packages), or going into contrib/stc/ and running make + make install to
build and install StyledTextControl.

As for gl/glu/glut ignore, I believe that you need to do something like
this: EXCLUDED_CLASSES=GLCanvas rake

This basically tells Rake, to ignore GLCanvas. I could be wrong, as
I’ve
never tried to compile wxRuby without GL, even though I don’t use it
personally myself.

  • What are the development headers needed for StyledTextCtrl?

There shouldn’t be any dependancies you need to install for
StyledTextCtrl,
as it’s generally compiled into the wxWidgets library, if you build
yourself, you would need to go into contrib/stc/ and run make/make
install
to build the STC code, and wxRuby will automatically detect if it is
there,
or not, and compile based upon the detection of it being there for you.

Ah, and last but not least, why is the

http://wxruby.rubyforge.org/wiki/wiki.pl?BuildingOnTopOfLinuxDistroPackages
page not linked anywhere on the wxRuby homepage? It is only findable by
searching for it. There should be a link to it on
http://wxruby.rubyforge.org/wiki/wiki.pl?InstallingFromSource I suggest.

I didn’t even know that page was there, someone probably added it last
year,
and forgot to make the necessary changes. The Wiki is in pretty bad
shape,
and needs to be fixed.

I1D/7O/tF4KSUWCRiqgGccgVCMoFx26U7+j2XWCG7sNZW6ANaiRQx0r3wJrNmu8=
=dw8X
-----END PGP SIGNATURE-----


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

hth,

Mario

Ok I tried unsuccessfully to get wxRuby2.0.1 to work with either ruby1.8
or ruby1.9 and Ubuntu 10.04 by compiling according to the instructions
previously mentioned.

Does someone have a gem that works? Do I have to remove all traces of
wxruby first? What do I need to do to get wxruby working again?

Thanks

-Philip

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

Am 21.10.2010 23:49, schrieb Philip S.:

On Ubuntu 10.04 it should work with the wxWidgets packages without
problems. Do a
$ sudo apt-get install libwxgtk2.8-dev freeglut3-dev
then set the symlinks I mentioned in my previous post. Afterwards
install SWIG 1.3.38 (newer versions won’t work) and ensure the SWIG and
Ruby executables are in your PATH.
Now unpack wxRuby and
$ cd wxruby-2.0.1
$ rake
$ strip -x lib/wxruby2.so
$ rake gem
and you should be done. Works for both 1.8 and for 1.9. But not on
Ubuntu Maverick, because a bug was introduced that makes it impossible
to compile wxRuby (see another thread of mine a few days ago).

Note however that I do not use the Ruby provided by Ubuntu. I think they
compile it without the --enable-shared flag wich is required by wxRuby
and apart from that the Ruby provided by the Ubuntu packagers is a bit
out of date. Therefore I compiled Ruby myself into
/opt/rubies/ruby-1.9.2-p0. If you want to that as well, I recommend you
to
$ sudo apt-get install libssl-dev zlib1g-dev libreadline5-dev
libyaml-dev
before, otherwise your’re missing some important C extensions (mainly
ZLib: Rubygems depends on it).

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

iQEcBAEBAgAGBQJMwUamAAoJEGrS0YjAWTKV31wIAImPlUHMZc4rqpSIDgZFe7N+
1wsJFh083IRXtV+e+42qrt4C9nGpZlZPiR1FYTG0eBTKjhH8cWQkx5DhW+h1QUPB
KkhzWNXuSxROCQjDMFguHzIeVmAAZBG0R++YTrkacCLATH5wynROqWXTkd7cxBhc
R0iEg5+kAw/WN4DVtYjFeH0szbjARiLqUjVIyTyMZBHMs3XKYlANARlriYQEd3j0
Rb/14JfADLrkpQfv9hZY6OaVSAaC1D5OEiVWr8ZQNtgrtPLyW/hQJ/+izvVCpytS
X0WZvXux8c9xob8T8q6eBIXTmD23MjgY8CKWkVsH+90g/YcAoOi2HDcKLpSVFKE=
=c2t7
-----END PGP SIGNATURE-----