# Gtk2.so: undefined symbol: rb\_progname

**URL:** <https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031>\
**Category:** Ruby-Gnome 2\
**Created:** [January 6, 2009, 5:18pm UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031 "2009-01-06T17:18:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 6, 2009, 5:18pm UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/1 "2009-01-06T17:18:39Z")

</div>

anyone here using gentoo?

i just installed from the ruby overlay dev-lang/ruby-1.9.0.4-r1 and  
[ebuild R] dev-ruby/ruby-glib2-0.18.1 0 kB [1]  
[ebuild R] dev-ruby/ruby-gdkpixbuf2-0.18.1 0 kB [1]  
[ebuild R] dev-ruby/ruby-pango-0.18.1 0 kB [1]  
[ebuild R] dev-ruby/ruby-atk-0.18.1 0 kB [1]  
[ebuild R] dev-ruby/ruby-gtk2-0.18.1 0 kB [1]  
[ebuild R] dev-ruby/ruby-gtksourceview-0.18.1 0 kB [2]

looks like it installed files in the right places, but:  
$ irb19  
irb(main):001:0\> require ‘gtk2’  
LoadError: /usr/lib/ruby/site\_ruby/1.9.0/i686-linux/gtk2.so: undefined  
symbol: rb\_progname - /usr/lib/ruby/site\_ruby/1.9.0/i686-linux/gtk2.so  
from /usr/lib/ruby/site\_ruby/1.9.0/gtk2/base.rb:19:in `require' from /usr/lib/ruby/site_ruby/1.9.0/gtk2/base.rb:19:in`\<top  
(required)\>’  
from /usr/lib/ruby/site\_ruby/1.9.0/gtk2.rb:11:in `require' from /usr/lib/ruby/site_ruby/1.9.0/gtk2.rb:11:in`\<top (required)\>’  
from (irb):1:in `require' from (irb):1 from /usr/bin/irb19:12:in`’  
irb(main):002:0\>

how can i get rid of this and get it to run?

thanks  
balint

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 6, 2009, 5:55pm UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/2 "2009-01-06T17:55:49Z")

</div>

On Tue, Jan 6, 2009 at 5:17 PM, Dobai-Pataky B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> anyone here using gentoo?
> 
> i just installed from the ruby overlay dev-lang/ruby-1.9.0.4-r1 and

[…]

> how can i get rid of this and get it to run?

Use latest stable Ruby (version 1.8.7-p72) instead of unstable 1.9?

–  
Guillaume C. - [NVC Communication Obstacles Game](http://zarb.org/~gc/)

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 7, 2009, 8:56am UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/3 "2009-01-07T08:56:37Z")

</div>

On Wed, Jan 7, 2009 at 1:54 AM, Guillaume C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Tue, Jan 6, 2009 at 5:17 PM, Dobai-Pataky B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > anyone here using gentoo?
> > 
> > i just installed from the ruby overlay dev-lang/ruby-1.9.0.4-r1 and
> 
> […]
> 
> > how can i get rid of this and get it to run?
> 
> Use latest stable Ruby (version 1.8.7-p72) instead of unstable 1.9?

Yes, as we talked about in a different discussion, ruby-gtk does not  
work with ruby 1.9 🙂

Hmmm… SInce we’ve hit this problem more than once in the past few  
weeks, maybe it would be worth putting a warning on the Ruby-GNOME2  
web page. Maybe in the text of the “What’s Ruby-GNOME2?”  
section. Here’s my suggestion:

"Ruby-GNOME2 is a set of Ruby 1.8.7 language bindings for the GNOME 2.0  
development environment. This is the next generation of Ruby-GNOME.

Note: Ruby-GNOME2 does _not_ currently work with Ruby version 1.9.  
The only version of Ruby that is currently supported is version 1.8.7."

That way when people try to compile it by hand and run into trouble,  
they will hopefully realize the problem quickly.

```
         MikeC

```

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 7, 2009, 9:54am UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/4 "2009-01-07T09:54:02Z")

</div>

Guillaume C. wrote:

> > how can i get rid of this and get it to run?
> 
> Use latest stable Ruby (version 1.8.7-p72) instead of unstable 1.9?

i switched to ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux], but  
that gives me a lot of ‘[BUG] object allocation during garbage  
collection phase’, which i can’t identify.  
can anyone help me with that?

thanks in advice  
balint

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 7, 2009, 10:05am UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/5 "2009-01-07T10:05:45Z")

</div>

On Wed, Jan 7, 2009 at 9:53 AM, Dobai-Pataky B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > […]  
> > collection phase’, which i can’t identify.  
> > can anyone help me with that?

double check you’re still using rg2 0.18.1, then reduce as much as  
possible the length of a sample script triggering that bug and try to  
make it happen everytime you run the sample script and explain how to  
trigger it, and send that script over

notice to kou: I also still experience that bug with 0.18.1 and ruby  
1.8.7, but it happens rarely and I was unable to create a small test  
case; I’ve seen in commit logs that some post 0.18.1 commits may  
already fix that though (commits related to GC for example)

–  
Guillaume C. - [NVC Communication Obstacles Game](http://zarb.org/~gc/)

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 7, 2009, 11:29am UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/6 "2009-01-07T11:29:36Z")

</div>

Dobai-Pataky B. wrote:

> > > > 
> > > 
> > > i switched to ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux], but
> 
> > 
> 
> now i get some '[BUG] Segmentation fault’s with 1.8.7 which i can’t  
> identify. ☹

i just ran into a “[BUG] object allocation during garbage collection  
phase” with ruby 1.8.6 (2008-08-08 patchlevel 286) [i686-linux], in the  
following line:  
cr.curve\_to(x1+m1,y1,  
xr+(x1-xr).abs_Math.cos(f3),yr-(yr-y1).abs_Math.sin(f3),xr,yr)  
where cr is a cairo\_context  
and i can’t reproduce it ☹

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 7, 2009, 1:44pm UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/7 "2009-01-07T13:44:01Z")

</div>

Dobai-Pataky B. wrote:

> > > > > >
> > > > 
> > > > that gives me a lot of '[BUG] object allocation during garbage
> > 
> > ```
> > }
> > 
> > ```
> > 
> > >
> 
> cr.curve\_to(x1+m1,y1,  
> xr+(x1-xr).abs_Math.cos(f3),yr-(yr-y1).abs_Math.sin(f3),xr,yr)  
> where cr is a cairo\_context  
> and i can’t reproduce it ☹

i have this error on almost every ruby version i tested (rubyee, ruby  
1.8.7) except on ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux]  
and i think the problem is related to threading.

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 7, 2009, 10:16am UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/8 "2009-01-07T10:16:53Z")

</div>

Guillaume C. wrote:

> > > >
> 
> trigger it, and send that script over

i had this in my script:  
Gtk.timeout\_add(20000){  
ocs=ObjectSpace.each\_object{}  
garbage\_collect

# GC.start

```
        oce=ObjectSpace.each_object{}
        p "started:#{ocs} finished:#{oce} freed:#{ocs-oce} objects"
        true
    }

```

if i removed that, i don’t get the ‘object allocation during garbage  
collection phase’

> notice to kou: I also still experience that bug with 0.18.1 and ruby  
> 1.8.7, but it happens rarely and I was unable to create a small test  
> case; I’ve seen in commit logs that some post 0.18.1 commits may  
> already fix that though (commits related to GC for example)

now i get some '[BUG] Segmentation fault’s with 1.8.7 which i can’t  
identify. ☹

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 7, 2009, 1:51pm UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/9 "2009-01-07T13:51:40Z")

</div>

> and i think the problem is related to threading.  
> can you send the smallest possible self-contained script for  
> reproducing that problem?

–  
Guillaume C. - [NVC Communication Obstacles Game](http://zarb.org/~gc/)

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [January 7, 2009, 5:34pm UTC](https://www.ruby-forum.com/t/gtk2-so-undefined-symbol-rb-progname/157031/10 "2009-01-07T17:34:21Z")

</div>

Guillaume C. wrote:

> > 1.8.7) except on ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux]  
> > and i think the problem is related to threading.
> 
> can you send the smallest possible self-contained script for  
> reproducing that problem?

i don’t promise that ☹  
my situation is a bit complex:  
i run a threaded rub server which holds structured data(ex. hashes,  
arrays) clients read those data into specific widgets(created/destroyed  
runtime ex. TreeViews,RCairo widgets created by me) via druby on  
background threads.  
so i can find my problems, if ruby exits with information with my files  
and linenumbers where the error occured, but when there is just a ‘BUG,  
segfault’ than i’m just guessing.

but if i’ll not be able to work around my threading problems, i might  
try to reproduce this in a simple script.

thanks  
balint
