# Rb\_thread\_critical - anyone knows this error?

**URL:** <https://www.ruby-forum.com/t/rb-thread-critical-anyone-knows-this-error/222312>\
**Category:** Ruby-Gnome 2\
**Created:** [August 24, 2012, 8:37pm UTC](https://www.ruby-forum.com/t/rb-thread-critical-anyone-knows-this-error/222312 "2012-08-24T20:37:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 24, 2012, 8:37pm UTC](https://www.ruby-forum.com/t/rb-thread-critical-anyone-knows-this-error/222312/1 "2012-08-24T20:37:05Z")

</div>

I try to run menu.rb from gtk2/ sample directory:

rb menu.rb

Error is this:

/pkg/Ruby/1.9.3p194/lib/ruby/site\_ruby/1.9.1/rubygems/custom\_require.rb:36:in  
`require': /pkg/Ruby/1.9.3p194/lib/ruby/site_ruby/1.9.1/x86_64-linux/glib2.so: undefined symbol: rb_thread_critical - /pkg/Ruby/1.9.3p194/lib/ruby/site_ruby/1.9.1/x86_64-linux/glib2.so (LoadError) from /pkg/Ruby/1.9.3p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in`require’  
from  
/pkg/Ruby/1.9.3p194/lib/ruby/site\_ruby/1.9.1/glib2.rb:100:in `rescue in <top (required)>' from /pkg/Ruby/1.9.3p194/lib/ruby/site_ruby/1.9.1/glib2.rb:96:in`\<top (required)\>’  
from  
/pkg/Ruby/1.9.3p194/lib/ruby/site\_ruby/1.9.1/rubygems/custom\_require.rb:36:in  
`require' from /pkg/Ruby/1.9.3p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in`require’  
from  
/pkg/Ruby/1.9.3p194/lib/ruby/site\_ruby/1.9.1/gtk2/base.rb:12:in `<top (required)>' from /pkg/Ruby/1.9.3p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in`require’  
from  
/pkg/Ruby/1.9.3p194/lib/ruby/site\_ruby/1.9.1/rubygems/custom\_require.rb:36:in  
`require' from /pkg/Ruby/1.9.3p194/lib/ruby/site_ruby/1.9.1/gtk2.rb:11:in`\<top (required)\>’  
from  
/pkg/Ruby/1.9.3p194/lib/ruby/site\_ruby/1.9.1/rubygems/custom\_require.rb:36:in  
`require' from /pkg/Ruby/1.9.3p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in`require’  
from menu.rb:11:in `’

(My ruby prefix is /pkg/Ruby/1.9.3 etc…)

My glib.so probably does not have glib2.so rb\_thread\_critical symbol.

Does one of you know how to get this symbol? Or is there a workaround?  
So far, everything else seems to work ok when I compile the rubygnome  
bindings.

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [August 27, 2012, 2:00pm UTC](https://www.ruby-forum.com/t/rb-thread-critical-anyone-knows-this-error/222312/2 "2012-08-27T14:00:57Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] rb\_thread\_critical - anyone knows this error?”  
on Fri, 24 Aug 2012 20:37:06 +0200,  
Marc H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I try to run menu.rb from gtk2/ sample directory:
> 
> rb menu.rb
> 
> Error is this:  
> /pkg/Ruby/1.9.3p194/lib/ruby/site\_ruby/1.9.1/rubygems/custom\_require.rb:36:in  
> `require’:  
> /pkg/Ruby/1.9.3p194/lib/ruby/site\_ruby/1.9.1/x86\_64-linux/glib2.so:  
> undefined symbol: rb\_thread\_critical -  
> …  
> My glib.so probably does not have glib2.so rb\_thread\_critical symbol.

It seems that your build has a problem.  
Could you show how to install Ruby/GLib2?

> Does one of you know how to get this symbol? Or is there a workaround?  
> So far, everything else seems to work ok when I compile the rubygnome  
> bindings.

rb\_thread\_critical is defined in Ruby 1.8 but it’s not  
defined in Ruby 1.9. So it’s strange that your Ruby/GLib2  
on Ruby 1.9 refers the symbol.

## Thanks,

kou
