Forum: wxRuby Ubuntu 11.10 wxRuby source compilation

6335c5cb12f3683e6e7c0b1c27e1e313?d=identicon&s=25 Tommy Europe (jabaar)
on 2012-02-03 11:31
Hello,
I am quite a beginner in the Linux world, so excuse me my ignorance. I
tried to compile the wxRuby source files, just as described on the
official instruction for Ubuntu users:
http://wxruby.rubyforge.org/wiki/wiki.pl?BuildingForUbuntu
I have extracted dirs for wxruby-2.0.1 and swig-1.3.38 in the /opt
directory. I am using ruby 1.9.2p0 installed via rvm.
Everything was going ok, untill rake step for wxRuby. I get the
following error:

jabaar@satl300:/opt/wxruby-2.0.1/swig$ sudo rake
[sudo] password for jabaar:
(in /opt/wxruby-2.0.1)
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from ./rake/rakepackage.rb:44
.
Enabling DYNAMIC build
Enabling RELEASE build
Enabling UNICODE build
The following wxWidgets features are not available and will be skipped:
  PrinterDC
/usr/lib/ruby/1.8/rake.rb:2383: command not found: swig -version
rake aborted!
Could not get version info from SWIG; is a very old version installed?.

I installed swig (according to the instruction mentioned above) and I
get the following output in terminal for swig -version:
jabaar@satl300:/opt/wxruby-2.0.1/swig$ swig -version

SWIG Version 1.3.38

Compiled with g++ [i686-pc-linux-gnu]
Please see http://www.swig.org for reporting bugs and further
information

So I assume it is installed allright. I am torturing this installation
problem for two days now... Can somebody tell me what I am doing wrong?
E7f3cbcb69beec85643d1ecc54121460?d=identicon&s=25 David Beswick (davidbeswick)
on 2012-02-03 13:34
(Received via mailing list)
Hello Tommy, this seems similar to a bug that a patch I made should have
fixed. Please see the second-to-last post in this thread:

http://www.ruby-forum.com/topic/1246679

Try applying the patch and seeing if it fixes your problem.

Alternatively, it looks like Alex committed that patch to the main
branch,
so you could try downloading the latest revision from SVN.

http://rubyforge.org/scm/?group_id=35
85991f138ede6236f35eb98da22b7b01?d=identicon&s=25 Marvin Gülker (quintus)
on 2012-02-03 14:55
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 03.02.2012 11:31, schrieb Tommy Europe:
> /usr/lib/ruby/1.8/rake.rb:2383: command not found: swig -version

Did you add the SWIG installation directory, and namely its
subdirectory "bin", to your PATH variable and `export'-ed it so that
subsequent commands can find it? What’s the output of

$ echo $PATH

?

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

iQEcBAEBAgAGBQJPK+VnAAoJELh1XLHFkqhaCrwH/2ujqiQzJ38e4KZs/NOhn6dG
TT0EdLV8V/EwvUtOcmH0gXirS6veLvo75gdKhZyqAQuM3xc0U+tkDMZhuDKbb6TS
AlhauwrVc8IRC1c0Wi2i8AV66EE4mhq44IycD3NPt6Pd9pPV7O5tWohjhUI7KF4Y
+WGomix44TVy6vhYXHdlKNihmF3vvOOQ2BY7JUbj1SKg6nAukl5K+XcM7RYG0n5X
yVuYgPJQNyRq+PH5vAl58QVuCgUKXvKTqg2vRWgOrsY075lV522vXmv93LOv9KH3
pWu+hLOAYU5T0TZzzKREnZVM6jE5FjI3sojGQCP5O1/pKvth1qgdIw0uW5ht4ek=
=q3V6
-----END PGP SIGNATURE-----
6335c5cb12f3683e6e7c0b1c27e1e313?d=identicon&s=25 Tommy Europe (jabaar)
on 2012-02-03 15:08
I tried applying your patch, but unfortunatelly error stayed the same (I
don't know if i used it right, I copied the patch to /opt/wxruby-2.0.1,
I ran patch -p0 < patch_name.patch in command line from that directory
and got confirmation on modification of some files, so I assumed I did
right). I also tried using SVN versions (version 2.0.1 from tag/wxruby2
and trunk version) and it didn't work. If the stable version is some
other one, please let me know.

I didn't rebuild any other packages (even if I wanted to I wouldn't know
how). I get exactly the same results every time. Probably I am doing or
have done something wrong during the process, so if you have the idea,
where could it be, please let me know. Maybe I should start from the
beginning, how to clean up the mess I made then?
6335c5cb12f3683e6e7c0b1c27e1e313?d=identicon&s=25 Tommy Europe (jabaar)
on 2012-02-03 15:52
To Marvin,

As mentioned in the configuration for Ubuntu page in the official wxruby
site, I kept swing inside /opt directory. I had also put wxruby
directory there.I have the following in my .bashrc (as reccomended in
ubuntu instalation site mentioned):

PATH=/opt/bin:$PATH
LD_LIBRARY_PATH=/opt/lib:$LD_LIBRARY_PATH
GEM_HOME=/home/jabaar/.rvm/gems/ruby-1.9.2-p0/gems

I do all the commands with sudo.

$PATH variable has /opt/bin directory
$ echo $PATH
/home/jabaar/.rvm/gems/ruby-1.9.2-p0/bin:/home/jabaar/.rvm/gems/ruby-1.9.2-p0@global/bin:
/home/jabaar/.rvm/rubies/ruby-1.9.2-p0/bin:/home/jabaar/.rvm/bin:/opt/bin:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:
/sbin:/bin:/usr/games
85991f138ede6236f35eb98da22b7b01?d=identicon&s=25 Marvin Gülker (quintus)
on 2012-02-03 18:45
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

PLEASE: Reply to the email you actually want to reply to, not always
to the original posting. Some people (e.g. me) use a tree view to
display the mailing list’s posts, and always replying to the top post
mixes this up.

Am 03.02.2012 15:52, schrieb Tommy Europe:
> I do all the commands with sudo.
>
> $PATH variable has /opt/bin directory $ echo $PATH
>
/home/jabaar/.rvm/gems/ruby-1.9.2-p0/bin:/home/jabaar/.rvm/gems/ruby-1.9.2-p0@global/bin:/home/jabaar/.rvm/rubies/ruby-1.9.2-p0/bin:/home/jabaar/.rvm/bin:/opt/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

In
>
your original post, you said:

> jabaar@satl300:/opt/wxruby-2.0.1/swig$ swig -version

This looks as if your SWIG was installed as
/opt/wxruby-2.0.1/swig/swig. So, if you do

$ sudo which swig
$ sudo swig -version

in another directory than the SWIG installation directory I doubt it
would find SWIG. Install SWIG so that the SWIG executable resides at
/opt/swig, i.e. you can execute

$ /opt/swig/bin/swig -version

without error. Then you have to consider that `sudo' may cause
environment variables to be reset. For compiling, there’s no need to
use `sudo', just do it with normal user privileges (of course you need
write access to the directory where you compile wxRuby, I usually do
it in /home/quintus/Downloads/wxruby).

Prior to compiling, do

$ export PATH=/opt/swig/bin:$PATH

and ensure that

$ which swig
$ swig -version

report the correct things, i.e. the path to the installed SWIG
executable and the correct SWIG version. Without leaving the current
shell, compile wxRuby:

$ rake
$ strip -x lib/wxruby2.so
$ rake gem

Be prepared that compiling wxRuby can take a looooooong time, even on
modern computers.

Finally I’d like to ask: _Why_ do you actually want to compile wxRuby?
The sole reason I found it necessary was that there was no 64-bit
precompiled version of wxRuby 2.0.1. I once provided a precompiled gem
to the wxRuby devs, but it seems it still didn’t make it to the
RubyGems index.

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

iQEcBAEBAgAGBQJPLBmTAAoJELh1XLHFkqhaVhwIAJzxHLjdgsIgh4nx9PIt2Vbz
I5c3KzeFjWp7ayiH5idKdHxOMCBQQkq3uFoTcmpL8pLd/+5alUv11wk+RlRR2Adt
NZGxn93pD4GH0yVKHMyJdQsCJMMRA1fJKzH5+ocFp//MAnZraMcaZQqQif0c/feD
6rkioHjFVj3Eq56V8/m+m3YQmVH2bS20JsIKYwhn1kW86Usi1bPQn8w1JbZfqc6J
/Yku10HLszw8RmTro/4S/1m1L/b4Bb/4gdd22KoqXZWCoDixuqN60MWvXJETmuVy
1pujKwvY01Vh7OQCk6BmzTNgEVTDBxaEDi9GjnDUtVJ7OxwVdVaznanh9YUlPW0=
=N3Uz
-----END PGP SIGNATURE-----
6335c5cb12f3683e6e7c0b1c27e1e313?d=identicon&s=25 Tommy Europe (jabaar)
on 2012-02-04 12:39
You were probably right all along, but what turned out to be most
important was:

Marvin Gülker wrote in post #1043971:

> Finally I’d like to ask: _Why_ do you actually want to compile wxRuby?
> The sole reason I found it necessary was that there was no 64-bit
> precompiled version of wxRuby 2.0.1. I once provided a precompiled gem
> to the wxRuby devs, but it seems it still didn’t make it to the
> RubyGems index.

Indeed there was no need for me to compile it by myself, it was just
some noob stuff stacked upon each other that make me think it was. Sorry
for the inconvinience and thanks for the great advices.
85991f138ede6236f35eb98da22b7b01?d=identicon&s=25 Marvin Gülker (quintus)
on 2012-02-04 16:59
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 04.02.2012 12:39, schrieb Tommy Europe:
> Indeed there was no need for me to compile it by myself, it was
> just some noob stuff stacked upon each other that make me think it
> was. Sorry for the inconvinience and thanks for the great advices.

You’re welcome :-).

Compiling wxRuby is somewhat special anyway. If you want to learn how
to compile software, go for something easier such as Ruby itself.

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

iQEcBAEBAgAGBQJPLUzYAAoJELh1XLHFkqhaabkH/3jTC+Law4gyUdY5bbaWEQLE
eDy4IDmuRCtCFQvlSrz5QDeFHkzYWw0BKr3k74vy2G5wIohkvETgY6Th1c8TE1gF
NA4G/H+HSitGiUh3WKW3Qu/xr9fvt/pa2l1bezIh4cEOCllPoao29e1g5GrbhXg8
crqkR1vRvqGPwgCmyeMNjuuuthOpvTJLFnuwmPA227xJoj/XsNJdSYh2G6oqz/3T
Ka+RWW0/75P/vAKwYauPpjY9qXJU87X65DtdEk18oBGZhQS1E7BzhbpH8/L98Q2q
VXisdvoG9HirxHwTko4tzNqfEwgMVBHDerjrpNbq8moKTgfQD65pMEvI8/mlwcc=
=KhaU
-----END PGP SIGNATURE-----
This topic is locked and can not be replied to.