Can't build with ruby 1.9

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

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. <

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. <

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. [email protected]:

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. [email protected]:

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

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Wed, 5 May
2010 18:23:40 +0200,
Alexander M. [email protected] 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

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

Regards,
Alex

Kouhei S. wrote:

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Wed, 5 May
2010 18:23:40 +0200,
Alexander M. [email protected] 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

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 [email protected]
“Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Thu, 6 May
2010 08:16:20 +0200,
Alexander M. [email protected] 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

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Sat, 8 May
2010 08:30:28 +0200,
Alexander M. [email protected] 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

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

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] Can’t build with ruby 1.9” on Thu, 6 May
2010 08:16:20 +0200,
Alexander M. [email protected] 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

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.