Tommy Europe | 3 Feb 11:31

Ubuntu 11.10 wxRuby source compilation

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 <at> 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 <at> satl300:/opt/wxruby-2.0.1/swig$ swig -version

(Continue reading)

David Beswick | 3 Feb 11:39
Picon

Re: Ubuntu 11.10 wxRuby source compilation

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



On Fri, Feb 3, 2012 at 9:31 PM, Tommy Europe <lists <at> ruby-forum.com> wrote:
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 <at> 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 <at> 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?

--
Posted via http://www.ruby-forum.com/.
_______________________________________________
wxruby-users mailing list
wxruby-users <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users

_______________________________________________
wxruby-users mailing list
wxruby-users <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
Quintus | 3 Feb 14:47
Picon
Gravatar

Re: Ubuntu 11.10 wxRuby source compilation


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
Tommy Europe | 3 Feb 15:08

Re: Ubuntu 11.10 wxRuby source compilation

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?

--

-- 
Posted via http://www.ruby-forum.com/.
Tommy Europe | 3 Feb 15:52

Re: Ubuntu 11.10 wxRuby source compilation

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 <at> 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
jabaar <at> satl300:/opt/wxruby-2.0.1$

--

-- 
Posted via http://www.ruby-forum.com/.
Quintus | 3 Feb 18:30
Picon
Gravatar

Re: Ubuntu 11.10 wxRuby source compilation


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 <at> 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 <at> 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
Tommy Europe | 4 Feb 12:39

Re: Ubuntu 11.10 wxRuby source compilation

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.

--

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
wxruby-users mailing list
wxruby-users <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
Quintus | 4 Feb 16:20
Picon
Gravatar

Re: Ubuntu 11.10 wxRuby source compilation


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
tk | 9 Feb 19:53

getting wxRuby to work on Ubuntu 11.10

I've just subscribed to this list and now see another went through a  
similar process about the same time. I made a page on the wxRuby wiki  
with some notes about the eventual success but I am not satisfied so  
will be working on a better process.  
http://wxruby.rubyforge.org/wiki/wiki.pl?Building_WxRuby_2.0.1

That page is not meant to be a formal how-to but more so information  
on some of the pitfalls that occured to help others get wxRuby  
working. I certainly appreciate the efforts by all who have worked on  
this project. Have you looked at the support code for this ? I look  
and see not man hours of work but years.

I started off wanting the latest stable ruby (1.9.3) working on my  
x86_64 Ubuntu 11.10 distribution with the latest wxWidgets (2.9.3).  
There were some set backs.

The wxRuby archive is 2009, set up for wxWidgets 2.6-8.x and ruby 1.9  
was freshly supported. Linux kernel was 2.4.x. So, there have been  
changes since then :)

I thought, ok this is great to get my code skills back in shape and I  
was really tired of recompile cycles so wanted to use ruby to be my  
main logic engine for my next projects. I'm not a complete newb but  
haven't coded in Linux for around two years so am very rusty.

I want current systems so started by with a fresh isntall of Ubuntu  
11.10 Desktop x86_64. I installed the wxWidget package - saw it was  
only 2.8.11 so uninstalled and dl'ed wx 2.9.3, compiled and  
exverything looked good aside the response time for wxAUI. I then  
recompiled Ubuntu to enable 1000 Hz; much smoother desktop response now.

I went through a lengthy process of getting 1.9.3 to work with my IDE  
development tools. I wanted the latest and greatest but it took effort  
of compiling and getting ruby-debug to work with my IDE (used NetBeans  
in the past but the latest does not support ruby so went with  
RubyMine). I eventually worked out .rvm and the various paths. So I  
now have a working ruby 1.9.3 p21, in a nice IDE with debug support. I  
then started with wxRuby, which didn't work.

I spent about a week gettig wxRuby to work. I was scouring the  
internet for clues and leanred a lot about what has happened in the  
past few years of ruby, linux and wx development. The end result is  
what I put in the wiki notes. It came down to not having time to make  
an initial demo of a working ruby wx development system.

I wound up using Ubuntu's wxWidgets 2.8.11 package which had all the  
libraries separated, including the the contributed ones (which is  
contrayry to the build notes on the wiki about haveing a monolithic wx  
build - as I understood it at the time). I located SWIG 1.3.38 and it  
seemed fine.

I had to edit some rake build files due to the more modern gcc being  
stricter and treating warnings as errors. As my skill comes back, I  
will probably remember what I should really do with that issue. Part  
of the trouble is string handling which is changed in wx 2.9.3 anyway  
so there will be a lot of focus in that area eventually.

In the end I now have an initial dev environment I can sneak out demo  
code while working on what i really want which is a fully modern  
ruby/wx dev environment. This means at least ruby 1.9.3 and wx 2.9.3  
working together on a 64 bit linux machine with modern kernel glibc 3  
etc.

That is the short story. The long story involved a lot of back  
tracking, compiling various things, dealing with incompatible  
ruby-debug support gems. One example is, "Why not just use the x86_64  
gem from the repository ?" I did but the lib was linked against glibc  
2.14 and Ubuntu is 2.13 Future Ubuntu 12.x is still using 2.14, btw.

I'm going to make a post in the development list about wanting to help  
modernize the work. wx will be changing quite a bit, ruby already has  
with ruby 2.0 in the development head. We need to update the project.

TK
Quintus | 9 Feb 23:21
Picon
Gravatar

Re: getting wxRuby to work on Ubuntu 11.10


Am 09.02.2012 19:53, schrieb tk <at> tkinnovations.net:
> I'm going to make a post in the development list about wanting to
> help modernize the work. wx will be changing quite a bit, ruby
> already has with ruby 2.0 in the development head. We need to
> update the project.

That’s interesting. I’m currently looking into writing C++ extensions
for Ruby and was thinking about rewriting a new wxWidgets binding from
scratch and just got up and running with the (very, very) basic
things... wxRuby is great, yes, but the development has stalled over
the last months/years and I fully agree with you that something must
be done about it. I’ve been a long-time wxRuby user but as I more and
more tend to look at Rubinius and it’s concurrent threads and their C
API compatibility, I’d like to use wxRuby from there. The most
annoying thing I’ve experienced with wxRuby is its inability to deal
with threading and I doubt it is easily possible to make the old
codebase conforming to that schema, especially regarding the true
concurrency Rubinius provides. So I came to the conclusion to just try
writing a new wxWidgets binding, also cleaning up the API wxRuby
provides. Even if it may not prove useful in any way, it will be some
kind of learning experience; and if not even that, it might just have
been a fun project.

> I started off wanting the latest stable ruby (1.9.3) working on my
x86_64 Ubuntu 11.10 distribution with the latest wxWidgets (2.9.3).
There were some set backs.

If you want to be on the cutting edge, why do you use Ubuntu then?
Canonical is known to not always provide the newest technologies,
instead they focus on stability. You should look into a
rolling-release Linux distribution like Arch Linux or Gentoo. Aside
from just being more recent, they also have the benefit of not having
all the packages split up into microparts the Debian world seems to
like so much.

I’m interested in how you proceed with your wxRuby upgrade. Maybe I
will look on it as well, but for now SWIG scares me a bit too much; I
don’t like code generated for me.

> TK

Vale,
Marvin

PS: I think I’m going to subscribe to the wxRuby development ML as
well. Just to see what’s going on there.

Gmane