tk | 9 Feb 19:53
Gravatar

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.
(Continue reading)

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)

Quintus | 17 Dec 12:37
Picon
Gravatar

wxRuby and Rubinius


Hi there,

I managed to compile wxRuby 2.0.1 against the current Rubinius master
using both Rubinius’ 1.8 and 1.9 mode on my 64bits Arch Linux system.
Here’s the used Rubinius version:

rubinius 2.0.0dev (1.9.3 bb60dc9a yyyy-mm-dd JI)
[x86_64-unknown-linux-gnu]

Basic things work quite well (I was surprised!), but as soon as it
comes to complex things, e.g. running most sub-demos of the bigdemo,
Rubinius crashes with:

$ /opt/rubies/rubinius/bin/rbx -X19 bigdemo.rb
Thread deadlock in ::lock()!
Aborted

Rubinius uses real concurrent threads, something I’ve always missed on
MRI (and I was hoping it would resolve the
wxRuby-and-threads-problem), but appearantly wxRuby isn’t _that_
thread-safe. Has there been any consideration of supporting Rubinius
for wxRuby?

Regarding the build process itself, I wanted to share my experiences.
Surprisingly, with a few adjustments wxRuby compiles flawlessly.
Here’s what I did:

0. Set up a working MRI Ruby 1.9 (1.8 _should_ work as well), install
   g++, wxWidgets and SWIG 1.3.38 as well as LLVM 2.8.
(Continue reading)

Mc Ben | 4 Dec 13:20

'open(f).each' doesn't close file

On Ruby 1.9.3 (win7(64))

'cause code says more the thousand words:
##################
 open("test.txt","r").each do end  # doesn't close file
 FileUtils.rm "test.txt"           # will fail: Permission denied
##################
(it doesn't matter if the "do end" is filled or omitted)

Bug, 'Feature' or my mistake?

--

-- 
Posted via http://www.ruby-forum.com/.
Ed Connell | 25 Nov 08:14
Picon

Thread.new

This code runs fine (except you can't mess with the window until the 10 loops are finished).  But if the comment mark is moved down to the 10.times do so that it can run in a different thread, nothing below Thread.new do ever happens.  Help! please.  Thanks.

I'm running Ruby 1.9.3 and wxRuby 2.01.

  def busy_task
    # start task in a separate thread
    <at> text.append_text "In busy_task\n"
#    Thread.new do
    10.times do
      <at> text.append_text "In busy_task\n"       
      <at> tasks += 1
      tasks = <at> tasks
      10.times do 
        <at> text.append_text "running #{tasks} ... #{Time.new}\n"
        (1...1_00_000).inject :+
      end # do
      <at> text.append_text "Thread #{tasks} done\n"
    end # do
  end # busy_task

--
I have a right and a left brain, but there is nothing right in the left one and there is nothing left in the right one!

Homepage: edsbog.com

_______________________________________________
wxruby-users mailing list
wxruby-users <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users

gentoo ebuild for latest version?

DO anybody use wxruby on gentoo.

The last update of my gentoo platform broke my wxruby programs.

The ebuild I have in my /usr/local/portage
 is for version 1.9.8 of wxruby and it uses 
version <1.3.36 of swig, but portage only support swig 1.3.40 now.

Anyone with a newer version of a ebuild?
Alejandro Riedel | 30 Oct 03:06
Picon

ERROR - libwx_gtk2u_media-2.8.so.0: cannot open shared object file

Hi all,

I've been working with wxruby for a while with an Ubuntu 10.04 environment mounted with VMWare over Windows.

Now, I'm trying to set it up in a new environment. It's Ubuntu 11.04, using RVM with both ruby 1.8.7 and 1.9.2 installed.

I installed wxruby and wxruby-ruby19 accordingly within corresponding gemsets.

Now, when I try to launch an app that works in my old environment I'm getting this error...

>.../custom_require.rb:36:in `require': libwx_gtk2u_media-2.8.so.0: cannot open shared object file

I tried installing the libraries related to wxGTK but they were already installed and updated...

$sudo apt-get install libwxgtk2.8-dev
>libwxgtk2.8-dev is already the newest version.
$sudo apt-get install libwxgtk2.8-0
>libwxgtk2.8-0 is already the newest version.
 
How can I solve this?

I don't know if it helps but I installed both wxruby versions using 'gem install' command...

Thanks in advance,
Alex

ALEJANDRO RIEDEL

_______________________________________________
wxruby-users mailing list
wxruby-users <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
Alex Fenton | 19 Oct 10:24
Picon

Re: Packaging wxRuby fails

hello all - have now committed this patch - looks excellent and works fine on my main Ubuntu box (11.10). Thanks again and sorry to be slow - have just started a new job and moved hosts.

We should look to release a bug-fix 2.0.2 soon - I have a little bit of time this weekend. There are some uncommitted patches I'd like to review at http://rubyforge.org/tracker/?atid=220&group_id=35&func=browse

We had thought that we wouldn't add features to 2.0.x line, but I'd favour merging these given our slow (!) release schedule. Discussion welcome (preferably on wxruby-dev).

best
alex

On 02/10/11 21:41, Alex Fenton wrote:
hi

thanks very much for the research, summary and patch. I've just got back from holiday, but will have a look at this later this week with a view to merging. I'm using 11.04 so should be able to test directly.

best alex

On 01/10/11 10:22, David Beswick wrote:
Hi everyone, an update on this problem and wxruby's gem and build troubles. I was just able to build wxruby and run bigdemo with the help of a propose d natty (11.04) fix for Ubuntu's apt wxwidgets package. This is great progress! As soon as the natty fix is released, binary gems might be ready to go again.

To summarise the problems and their fixes so far:

1. Previously, running any wxruby app would cause a crash in pixman. This has possibly been narrowed down to a problem with mesa or opengl drivers and it affects many projects that link dynamically to wxwidgets as well as other gui toolkits. Excluding opengl support seems to fix this for wxruby. See https://bugs.launchpad.net/ubuntu/+source/pixman/+bug/756237

2. An additional problem cropped up in Natty, and maybe other versions. The Xinerama library is in an unusual place in Ubuntu 64-bit. wxwidget's configure script can't find it and so it disables support for the wxDisplay class (as if --disable-display was given,) and this causes rake compile to fail because there's no definition of wxDisplay::ResetMode. There is an official proposed fix for this now, see https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/828999, and follow the directions to get the fixed package. Please take a moment to verify the fix on the bug page, if you try it.

3. Just today, I discovered a problem with the wxruby rake files. The rake files exclude various classes from the build on linux, but the logic fails because code reads the array $excluded_classes in rakeunixish.rb before the array is actually set up at the bottom of rakeconfigure.rb. This causes link to fail because libgtk-media isn't present, and MediaCtrl should be excluded from the build. I added a class to wrap the functionality of extracting and testing for wx features, and it's implemented such that querying wx features should be insensitive to the order of different bits of code. Please apply the attached patch to fix this, let me know if you have problems with it.



On Wed, May 11, 2011 at 3:19 AM, Quintus <sutniuq <at> gmx.net> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 09.05.2011 22:01, schrieb Alex Fenton:
> On 09/05/11 17:36, Quintus wrote:
>> Some progress seems to have been made, but wxRuby still doesn't run on
>> any Ubuntu>  Lucid. The bug at
>> https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/632984 has
>> finally been fixed (for Oneiric), just to reveal another one (see my
>> last comment on that bug) that still prevents the main bug at
>> https://bugs.launchpad.net/ubuntu/+source/pixman/+bug/756237 to get
>> flagged for Natty.
>
> thanks for the update - and thanks also for reporting on and documenting
> the issues on the Ubuntu bugtracker. I was half-thinking of switching to
> Fedora anyway before the next Ubuntu came out - maybe this will tip me
> over.

I think I already mentioned it, but it was exaktly wxRuby that was the
final reason for me to switch from Ubuntu to Arch Linux. I really enjoy
the rolling release model now--no way back. :-)

However, Ubuntu is the most-widespread Linux distribution out there.
It's not wise to drop support for it I think, because it would
significantly state a contrast to the platform-indepentness wxRuby aims
to provide.

> Martin, I have been quite successful at deploying both 32 bit and
> 64-bit
> 10.04 installations of wxRuby. I had to go back to the 2.0.0 gem for
> 64, but
> it seems to work quite fine with our rather elaborate application.

Ubuntu Lucid 64bit worked without a problem for me, even though I had to
compile wxRuby 2.0.1 myself. It's just that wxRuby doesn't work on each
and every Ubuntu *after* Lucid.

And btw. my name is Marvin, note the v. :-)

> Hi Don, on which distributions and versions of those distributions
> were you
> deploying your apps on?

I can confirm wxRuby not working for Ubuntu Maverick 64bit, Ubuntu
Maverick 32bit, Ubuntu Natty 32bit (the last to being virtual machines)
and Arch Linux 64bit (completely updated last Friday)*. But I suppose it
doesn't work for different reasons on each machine... :-(

> Here's the bug that discussion references, in Debian:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613221

Thanks! It really looks like a bug in pixman then.

###########################

So, what can we do now? wxRuby's obviously not at fault, it's

a) pixman that is broken and
b) Debian/Ubuntu that ships broken wxWidgets packages

b) is marked as fixed for Oneiric, but I doubt wheather wxRuby will run
then, because of a) and a symbol lookup error I already described on
Launchpad (this would be c) then I think).

The pixman bug breaks wxRuby on nearly every recent Linux distribution,
and Debian/Ubuntu breaks it a second time due to their package
management, which is especially problementic because of their popularity.

To conclude: I'm worried about wxRuby's future, although it seems that
wxRuby can't do much about the mentioned problems.

> best
> alex

Valete,
Marvin

* The distros I were using "normally", i.e. not as virtual machines,
were like this:
Ubuntu Lucid 64bit -> Ubuntu Maverick 64bit [broke wxRuby] -> Arch Linux
64bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNyXOBAAoJELh1XLHFkqhajpYIAK0/ZBrho5fd9fGaEkGGQbal
+uwRxdavIldM38I8wolfIomPEZxTzupim+NPLigB1NHToUrSjhhCGkg482YuJR9u
HMncfRInw5eK/rXo1xHwF213sY3bZtxy9EOG+lJ/qLCm6qrke5tAGBKLzsY62QtG
v4KOXGNOyC+NEtdHFyPhancvwqrjfnyL/OjgUMku03saLq58vDZMiv1rAz++m69c
RO5h6sIZ+ZHp4tVIKSMKjLYoyQrVfuNK/A0RJMdpnLlsz+oAiP36sS65wKEL1wB4
+F62p7Ow/yjgItqAeG2HgKRcJyKwRT9tXSK8M83dsxWk9hyJVubILa2dWpvsD70=
=12Su
-----END PGP SIGNATURE-----
_______________________________________________
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


_______________________________________________
wxruby-users mailing list
wxruby-users <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
Eric B. | 12 Oct 18:42

XP and Windows 7 -- def() inside App#run block problem

When I run the following code, I expect a blank frame to open (which is
what happens when the def block is left out of the code). Instead, the
program exits immediately.

ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
wxruby 2.0.1
OS: Microsoft Windows XP Professional 5.1.2600

#!/usr/bin/ruby -w

require "wx"

Wx::App.run do
  Wx::Frame.new(nil).show

  def cause_of_problem
    puts "This prevents the window from staying open, even though it is
never run"
  end

end

A perhaps related issue involves errors such as uninitialized variable
accesses inside of event loops in Windows 7 -- I get no error message
(even with $stdout.sync = true); instead, the application just stops
responding, which makes debugging impractical.

Has anyone else seen similar problems, and is wxruby debugging more
robust under Linux?

Thanks,
Eric

--

-- 
Posted via http://www.ruby-forum.com/.
Mark Barton | 10 Oct 20:36

having trouble show/hide bitmap in a sizer

I'm trying to display one of two separate bitmap images along with some text. The images are a check and and a cross symbol and are displayed as

FIRMWARE C
or
FIRMWARE X
or
FIRMWARE

where C would be my checkmark image and X is the cross image. This is the code I am using to initially setup the Static bitmap and sizer. This is then added to a vertical box sizer containing a few other controls. Lastly for a test, I simply show the appropriate image as in <at> check_sb_firmware.show and <at> x_sb_firmware for the other image. The problem that I am seeing is the first time I show the image, the image appears at the top of my panel, the second time I show the image it is in the correct position, just after my text. Am I handling this wrong or perhaps there is a better way? It seems like it should be a simple task.

Thanks
Mark


def make_firmware_check(parent)
    firmware_check_sizer = Wx::BoxSizer.new(Wx::HORIZONTAL)
    check_bm_firmware = Bitmap.new("images/check_icon.png", Wx::BITMAP_TYPE_ANY)
    <at> check_sb_firmware = Wx::StaticBitmap.new(parent, -1, check_bm_firmware)
    fw_text = Wx::StaticText.new(parent, ID_SERIAL_STATIC_TEXT, "FIRMWARE", Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, 0, "")
    x_bm_firmware = Bitmap.new("images/x_icon.png", Wx::BITMAP_TYPE_ANY)
    <at> x_sb_firmware = Wx::StaticBitmap.new(parent, -1, x_bm_firmware)
    firmware_check_sizer.add(fw_text, 1, Wx::RIGHT|Wx::TOP|Wx::ALIGN_LEFT, 5)
    firmware_check_sizer.add( <at> check_sb_firmware, 0, Wx::ALIGN_CENTER, 3)
    firmware_check_sizer.add( <at> x_sb_firmware, 0, Wx::ALIGN_CENTER, 3)
    <at> check_sb_firmware.hide
    <at> x_sb_firmware.hide
    return firmware_check_sizer
  end

_______________________________________________
wxruby-users mailing list
wxruby-users <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
Mark Barton | 6 Oct 18:46

WxRuby refresh from a long running function

Hi All,

This is my first post and I am a complete (well 
almost complete)  noob at WxRuby. I have 
programmed in Ruby for a while, but now I am 
trying my hand at a GUI base program running on 
Windows. There is quite a bit of serial 
communication between the app and a external 
device. The problem I am facing is a function call 
that takes a long time to complete before 
returning to WxRuby.

My application is pretty simple with a start 
button, a few fields that display data and a 
progress bar. There are a couple of dialogs that 
pop up during the call as well. Advancing the 
progress bar and displaying dialogs works just 
fine, except the dialog windows do mess up the top 
application appearance once the dialog is 
dismissed. Of course once the function call is 
complete the screen will refresh as expected.

I have tried setting a separate thread for the 
function and using a timer with Thread.pass as 
shown in the WxRuby thread example. Although the 
GUI is nice an responsive, the performance of the 
long running function is unacceptable.

So is there a callback that can be done to allow 
the ruby app to run that I can make from this long 
running function or some other way to use a 
separate thread more efficiently.

Ruby 1.8.7,  WxRuby 2.0.1

Any help is appreciated.

Mark

Gmane