Compile problems gtk2, ruby-gnome2-all-1.1.2

I’m using RHEL 5.7.
My base ruby is 1.9.3p0
gcc 4.1.2
gtk2-2.10.4-21.el5_5.6

I have been trying to get gtk2 from 1.1.2 to build, “ruby extconf.rb”
checks out fine. Says gtk2 is good to build.

However, halfway through compilation it bombs on rbgtkprintsettings.c.

The compile time error is:
rbgtkprintsettings.c: In function ‘Init_gtk_print_settings’:
rbgtkprintsettings.c:704: error: ‘rg_initialize’ undeclared (first use
in this function)

I tried dropping back to previous versions. See the same thing in:
1.1.1
1.1.0

When I hit 1.0.3, the compile problem goes away. So it looks like
something that was introduced in 1.1.0.

I can get this to work on some other systems I tried, just not on
these RHEL 5.x machines(64 and 32 bit ones)

Thanks for any help.

On Sat, Feb 4, 2012 at 5:15 PM, grant schoep [email protected]
wrote:

The compile time error is:

I can get this to work on some other systems I tried, just not on
these RHEL 5.x machines(64 and 32 bit ones)

Thanks for any help.

Ah, never fails, I ask a question and then figure it out about as I hit
send.

Line numbers here related to 1.1.2 release

The problem is, in rbgtkprintsettings.c.

For the block #if GTK_CHECK_VERSION(2,12,0)

If its not 2,12 it uses the 2nd block
However, it is using the old naming. Basically it has
#if GTK_CHECK_VERSION(2,12,0)
static VALUE
rg_initialize(int argc, VALUE *argv, VALUE self)
{

#else
static VALUE
ps_initialize(VALUE self)
{

#endif

That should be rg_initialize again, not ps_initialize.

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] compile problems gtk2,
ruby-gnome2-all-1.1.2” on Sat, 4 Feb 2012 17:33:59 -0700,
grant schoep [email protected] wrote:

#if GTK_CHECK_VERSION(2,12,0)

That should be rg_initialize again, not ps_initialize.

Thanks! I’ve fixed the problem. :slight_smile:


kou

Kouhei S. wrote in post #1044133:

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] compile problems gtk2,
ruby-gnome2-all-1.1.2” on Sat, 4 Feb 2012 17:33:59 -0700,
grant schoep [email protected] wrote:

#if GTK_CHECK_VERSION(2,12,0)

That should be rg_initialize again, not ps_initialize.

Thanks! I’ve fixed the problem. :slight_smile:


kou

Could you share how to fix the problem clearly?

I meet the same question and I really want to know how to fix it.

Thanks,

Could you share how to fix the problem clearly?

I meet the same question and I really want to know how to fix it.

If it the problem I had, compiling rbgtkprintsettings.c

You want to find the “ps_initialize” part and change it to
rg_initialize.
The snippet of code was like

#if GTK_CHECK_VERSION(2,12,0)
static VALUE
rg_initialize(int argc, VALUE *argv, VALUE self)
{

#else
static VALUE
ps_initialize(VALUE self)
<-------------------------This line should be rs_ not ps_
{

#endif

Kou checked the fix in, sometimes when I hit these buggers, I like to
grab
the latest version from git and do some vimdiffs.

The git page is nice too, you can see the diff/delta’s on exactly what
was
changed with each fix. Without having to checkout each version and diff
them. Yes, sometimes the latter is better IMHO, but then that me…