Ruby Forum Ruby-Gnome 2 > glib and ruby 1.9

Posted by Philipp Goetzinger (pgoetzin)
on 14.05.2008 23:43
Hello,
is someone using glib/gtk with ruby 1.9 ?

im using ubuntu 8.04 and compiled glib/gstreamer/gtk

and now i get the following message if i want to run a script

ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]
/usr/local/lib/site_ruby/1.9.0/glib2.rb:70:in `require':
/usr/local/lib/site_ruby/1.9.0/i486-linux/glib2.so: undefined symbol:
rb_curr_thread - /usr/local/lib/site_ruby/1.9.0/i486-linux/glib2.so
(LoadError)


i know the thread handling in 1.9 is different to 1.8 but that is why i
want to switch.
right now im using 1.8 but i have problems to get gstreamer synchronize
with gtk .


in old forum entries i read that it should work with the svn release but
i tried it with the svn from 2 days ago ..

bye

Philipp
Posted by Philipp Goetzinger (pgoetzin)
on 14.05.2008 23:59
after i recompiled it it was working .. no idea why ..

but now i get a new error

include/cairo -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 
-I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 
-I/usr/include/pixman-1    -o rbgtkbuilder.o -c rbgtkbuilder.c
rbgtkbuilder.c: In function ‘builder_add’:
rbgtkbuilder.c:72: warning: passing argument 1 of ‘rb_reg_new’ makes 
integer from pointer without a cast
rbgtkbuilder.c:72: error: too many arguments to function ‘rb_reg_new’
make[2]: *** [rbgtkbuilder.o] Error 1
make[2]: Leaving directory `/home/pgoetzin/ruby-gnome2/trunk/gtk/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/pgoetzin/ruby-gnome2/trunk/gtk'

-----
SUCCEEDED: NONE
FAILED: gtk
-----
Done.


anyone a idea ?
Posted by Kouhei Sutou (Guest)
on 15.05.2008 01:33
(Received via mailing list)
Hi,

2008/5/15 Philipp Goetzinger <ruby-forum-incoming@andreas-s.net>:

> is someone using glib/gtk with ruby 1.9 ?

> ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]

Try with ruby 1.9.0-1.


Thanks,
--
kou
Posted by Philipp Goetzinger (pgoetzin)
on 15.05.2008 12:28
Hi kou,

ok with 1.9.0-1. gtk is working again ... for all who have the same 
problem ..

##########################################################################
Creating a Ruby 1.9 sandbox

1. mkdir /home/user/ruby19 (example folder)
2. cd /home/user/ruby19
3. mkdir src
4. cd src
5. wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-1.tar.bz2
6. tar -jxvf ruby-1.9.0-1.tar.bz2
7. cd ruby-1.9.0-1
8. ./configure –prefix=/home/user/ruby19
9. make
10. make install

Now you can switch to this sandbox at any time by executing ‘export 
PATH=/home/user/ruby19/bin:$PATH’ in a shell.
########################################################################
src http://blog.sparkymat.net/2008/04/02/rubygame-3-on-ruby-19/



but now gstreamer is broken .. i can compile its but i get the following 
message... when i include the gst lib

##############################################################################
pgoetzin@pgoetzin-nc6000:~/ruby-gnome2/trunk/gstreamer/sample$ ruby1.9 
gst-inspect.rb
/home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/gst.rb:3:in `require': 
/home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/i686-linux/gst.so: 
undefined symbol: rb_argv - 
/home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/i686-linux/gst.so 
(LoadError)
  from /home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/gst.rb:3:in `<top 
(required)>'
  from gst-inspect.rb:9:in `require'
  from gst-inspect.rb:9:in `<main>'
pgoetzin@pgoetzin-nc6000:~/ruby-gnome2/trunk/gstreamer/sample$ ruby1.9 
-v
ruby 1.9.0 (2008-03-01 revision 15664) [i686-linux]
pgoetzin@pgoetzin-nc6000:~/ruby-gnome2/trunk/gstreamer/sample$

---or-------------------------------------------------------------------------
irb(main):002:0> require 'gtk2'
=> true
irb(main):003:0> require 'gst'
LoadError: 
/home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/i686-linux/gst.so: 
undefined symbol: rb_argv - 
/home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/i686-linux/gst.so
  from /home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/gst.rb:3:in 
`require'
  from /home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/gst.rb:3:in `<top 
(required)>'
  from (irb):3:in `require'
  from (irb):3
  from /home/pgoetzin/ruby19/lib/ruby/1.9.0/irb.rb:149:in `block (2 
levels) in eval_input'
  from /home/pgoetzin/ruby19/lib/ruby/1.9.0/irb.rb:262:in 
`signal_status'
  from /home/pgoetzin/ruby19/lib/ruby/1.9.0/irb.rb:146:in `block in 
eval_input'
  from /home/pgoetzin/ruby19/lib/ruby/1.9.0/irb.rb:145:in `eval_input'
  from /home/pgoetzin/ruby19/lib/ruby/1.9.0/irb.rb:69:in `block in 
start'
  from /home/pgoetzin/ruby19/lib/ruby/1.9.0/irb.rb:68:in `catch'
  from /home/pgoetzin/ruby19/lib/ruby/1.9.0/irb.rb:68:in `start'
  from ./irb:12:in `<main>'
irb(main):004:0>

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

with the ubuntu 8.04  and ruby 1.9.0(2007-12-25 revision 14709)  I could 
compile gst and it was working !


any idea ?

thx & bye

Philipp
Posted by Kouhei Sutou (Guest)
on 15.05.2008 13:42
(Received via mailing list)
Hi,

In <8fc282af9a9beb87fdf009d282341a67@ruby-forum.com>
  "Re: [ruby-gnome2-devel-en] glib and ruby 1.9" on Thu, 15 May 2008 
12:28:06 +0200,
  Philipp Goetzinger <ruby-forum-incoming@andreas-s.net> wrote:

> /home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/gst.rb:3:in `require': 
> /home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/i686-linux/gst.so: 
> undefined symbol: rb_argv - 

I've fixed the problem.


Thanks,
--
kou
Posted by Philipp Goetzinger (pgoetzin)
on 15.05.2008 16:07
Kouhei Sutou wrote:
> Hi,
> 
> In <8fc282af9a9beb87fdf009d282341a67@ruby-forum.com>
>   "Re: [ruby-gnome2-devel-en] glib and ruby 1.9" on Thu, 15 May 2008 
> 12:28:06 +0200,
>   Philipp Goetzinger <ruby-forum-incoming@andreas-s.net> wrote:
> 
>> /home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/gst.rb:3:in `require': 
>> /home/pgoetzin/ruby19/lib/ruby/site_ruby/1.9.0/i686-linux/gst.so: 
>> undefined symbol: rb_argv - 
> 
> I've fixed the problem.
> 
> 
> Thanks,
> --
> kou

Hello kou
jepp with the new svn version its working.

great work !
thanks for your support

bye
Philipp