# Can't build with ruby 1.9

**URL:** <https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912>\
**Category:** Ruby-Gnome 2\
**Created:** [May 1, 2010, 11:28pm UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912 "2010-05-01T23:28:59Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 1, 2010, 11:28pm UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/1 "2010-05-01T23:28:59Z")

</div>

Hello,

I can’t build ruby-gstreamer from ruby-gnome2 0.19.4 with ruby  
1.9.1p376.

I can build ruby-glib from the very same package but not gstreamer.

Also I can build gstreamer bindings just fine for ruby 1.8.

See build log in attachment.

I’m not good in C/C++. Can anybody help me to solve this problem?

Regards,  
Alex

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 2, 2010, 12:14am UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/2 "2010-05-02T00:14:24Z")

</div>

I can’t be certain about this, and maybe someone else here would have a  
better idea, but there’s a missing export for a function of rbobj\_\*  
which  
is probably a core function used throughout the Ruby GStreamer bindings.  
This could come from libruby1.9.so, or it could come from some other  
core  
component that has been specifically written for the Ruby GStreamer  
bindings.

Someone else would have to guide you, but this is just a start, it’s an  
un-resolved export, that the GCC Compiler tool chain can’t find in any  
of  
the included symbol files / object files / shared object files, and it  
is  
needed in order to execute.

On Sat, May 1, 2010 at 5:28 PM, Alexander M. \<

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 2, 2010, 12:50am UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/3 "2010-05-02T00:50:47Z")

</div>

Thanks Mario for response,

As far as I can tell all the missing symbols are defined in glib  
bindings in the same ruby-gnome2 package.

I see them defined in glib/src/rbgobject.h But I don’t know how to point  
gcc to pick them there.

Mario S. wrote:

> I can’t be certain about this, and maybe someone else here would have a  
> better idea, but there’s a missing export for a function of rbobj\_\*  
> which  
> is probably a core function used throughout the Ruby GStreamer bindings.  
> This could come from libruby1.9.so, or it could come from some other  
> core  
> component that has been specifically written for the Ruby GStreamer  
> bindings.
> 
> Someone else would have to guide you, but this is just a start, it’s an  
> un-resolved export, that the GCC Compiler tool chain can’t find in any  
> of  
> the included symbol files / object files / shared object files, and it  
> is  
> needed in order to execute.
> 
> On Sat, May 1, 2010 at 5:28 PM, Alexander M. \<

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 2, 2010, 7:45pm UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/4 "2010-05-02T19:45:29Z")

</div>

Hi.

I have had trouble building ruby-gnome2 with ruby 1.9 after a build  
using ruby 1.8. To resolve it I use “make distclean”.

2010/5/2, Alexander M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 4, 2010, 12:11am UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/5 "2010-05-04T00:11:36Z")

</div>

Hi Vincent,

This is not the case. I try to build it clean for ruby 1.9. I mentioned  
1.8 only to emphasis that this problem is probably connected with  
version of ruby I’m building for.

Vincent C. wrote:

> Hi.
> 
> I have had trouble building ruby-gnome2 with ruby 1.9 after a build  
> using ruby 1.8. To resolve it I use “make distclean”.
> 
> 2010/5/2, Alexander M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 5, 2010, 6:23pm UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/6 "2010-05-05T18:23:40Z")

</div>

OK. I’ve found a solution.

It looks like gstreamer bindings couldn’t find glib2.so. The solution is  
to point linker where to find the lib. I’m using Gentoo portage to  
install bindings so it means glib2.so is already in ruby site dir, hence  
the patch pointing there. In general case, I think extconf.rb should  
look for it either in TOPDIR/glib or in ruby site dir and add the path  
that exists to libs list.

Sorry if this not correct solution. It works for me and I hope it may  
work for others.

Regards,  
Alex

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 6, 2010, 12:18am UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/7 "2010-05-06T00:18:34Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Wed, 5 May  
2010 18:23:40 +0200,  
Alexander M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> work for others.  
> Thanks for your work.  
> Could you also show mkmf.log?  
> We want to remove ‘-Wl,–no-undefined’ instead of adding  
> -lglib2. If we can’t remove ‘-Wl,–no-undefined’, we will  
> add -lglib2.

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 6, 2010, 8:16am UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/8 "2010-05-06T08:16:20Z")

</div>

Here’s mkmf.log of patched extconf.rb. Tell me if you want one of  
unpatched.

Regards,  
Alex

Kouhei S. wrote:

> Hi,
> 
> In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> “Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Wed, 5 May  
> 2010 18:23:40 +0200,  
> Alexander M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > work for others.  
> > Thanks for your work.  
> > Could you also show mkmf.log?  
> > We want to remove ‘-Wl,–no-undefined’ instead of adding  
> > -lglib2. If we can’t remove ‘-Wl,–no-undefined’, we will  
> > add -lglib2.
> 
> ## Thanks,
> 
> kou

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 8, 2010, 8:30am UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/9 "2010-05-08T08:30:28Z")

</div>

Yeah, I know.

As I mentioned before it’s acceptable for my case. I use Gentoo portage.  
It breaks up ruby-gnome2 to individual packages and tracks dependencies  
for itself. So by the time of ruby-gstreamer installation ruby-glib2 is  
already installed.

I’m not sure how to fix it for more general case. Currently, building  
ruby-gstreamer doesn’t trigger ruby-glib2 build. So it’s possible to  
have a system without single instance of glib2.so.

I’d like to help but my knowledge on this topic is very short.

Kouhei S. wrote:

> Hi,
> 
> In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> “Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Thu, 6 May  
> 2010 08:16:20 +0200,  
> Alexander M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Here’s mkmf.log of patched extconf.rb. Tell me if you want one of  
> > unpatched.
> 
> Thanks.  
> It seems that Ruby uses -no-undefined option.
> 
> Uhm… With your patch, we need to install Ruby/GLib2 before  
> building Ruby/GStreamer…
> 
> We need more better way.
> 
> –  
> kou

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 9, 2010, 2:45am UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/10 "2010-05-09T02:45:46Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Sat, 8 May  
2010 08:30:28 +0200,  
Alexander M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’d like to help but my knowledge on this topic is very short.

What about this patch?  
Note: You need to reinstall Ruby/GLib and rerun extconf.rb  
of Ruby/GStreamer.

# Index: glib/src/lib/mkmf-gnome2.rb

— glib/src/lib/mkmf-gnome2.rb (revision 3768)  
+++ glib/src/lib/mkmf-gnome2.rb (working copy)  
@@ -81,6 +81,8 @@

# else

# STDOUT.print “no\n”

# end

- else
- $DLDFLAGS.gsub!(/\s-Wl,–no-undefined\s/, ‘’)  
end

nil

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 10, 2010, 8:45pm UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/11 "2010-05-10T20:45:37Z")

</div>

Hi,  
on Gentoo the current ebuilds (0.19.4)in the portage tree have only  
ruby18 target.  
ho you build for 1.9 by hand or via your modified ebuilds?  
thanks  
Balint

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 8, 2010, 4:53am UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/12 "2010-05-08T04:53:00Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Thu, 6 May  
2010 08:16:20 +0200,  
Alexander M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Here’s mkmf.log of patched extconf.rb. Tell me if you want one of  
> unpatched.

Thanks.  
It seems that Ruby uses -no-undefined option.

Uhm… With your patch, we need to install Ruby/GLib2 before  
building Ruby/GStreamer…

We need more better way.

–  
kou

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [May 10, 2010, 8:51pm UTC](https://www.ruby-forum.com/t/cant-build-with-ruby-1-9/187912/13 "2010-05-10T20:51:34Z")

</div>

I have few modified ebuilds.  
It just adds one more ruby target. And a patch.

Dobai-Pataky BÃ¡lint wrote:

> Hi,  
> on Gentoo the current ebuilds (0.19.4)in the portage tree have only  
> ruby18 target.  
> ho you build for 1.9 by hand or via your modified ebuilds?  
> thanks  
> Balint

PS: Sorry Kouhei, had no time to check your patch. I’ll do in a day or  
two.
