Forum: Ruby-Gnome 2 Recent Ruby: 'depend' files must be changed

3853dd5371ac1e094fc45d6c2aa0e459?d=identicon&s=25 Carlo E. Prelz (Guest)
on 2012-11-12 07:40
(Received via mailing list)
Attachment: diff (4 KB)
Hello all.

I am using Ruby from Matz's SVN repository. Last time I updated, I
found out that the compilation mechanism of ruby-gnome2 fails to
install most of the newly compiled .so files.

I have found out how to solve the problem locally. What happens is
that mkmf now includes an 'install-so' target in the makefile. Thus,
when I run make, for several libraries I get warning like these:

Makefile:223: warning: overriding commands for target `install-so'
Makefile:167: warning: ignoring old commands for target `install-so'

But then, when doing make install, the new library archives are not
copied over the old ones in /usr/local/lib/ruby.

This happens because, in several of the 'depend' files, both targets
'install' and 'install-so' are defined.

I got the mechanism to work by eliminating 'install-so'. For example,
in the case of glib2, I changed file glib2/ext/glib2/depend from:

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
install-so:
  $(INSTALL_DATA) $(srcdir)/rbglib.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbglibdeprecated.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbglib2conversions.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgutil.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgutil_list.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgutildeprecated.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgobject.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgcompat.h $(RUBYARCHDIR)
  $(INSTALL_DATA) glib-enum-types.h $(RUBYARCHDIR)

install:
  if test -n "$(pkgconfigdir)"; then      \
    $(MAKEDIRS) $(pkgconfigdir);        \
    $(INSTALL_DATA) ruby-glib2.pc $(pkgconfigdir);  \
  fi
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

to

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
install:
  $(INSTALL_DATA) $(srcdir)/rbglib.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbglibdeprecated.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbglib2conversions.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgutil.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgutil_list.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgutildeprecated.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgobject.h $(RUBYARCHDIR)
  $(INSTALL_DATA) $(srcdir)/rbgcompat.h $(RUBYARCHDIR)
  $(INSTALL_DATA) glib-enum-types.h $(RUBYARCHDIR)
  if test -n "$(pkgconfigdir)"; then      \
    $(MAKEDIRS) $(pkgconfigdir);        \
    $(INSTALL_DATA) ruby-glib2.pc $(pkgconfigdir);  \
  fi
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

Since I do not know exactly how this mechanism works, I cannot say if
this is the right way to solve the problem, but I eventually had a
successful install.

I attach a diff file.

Carlo
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2012-11-14 14:49
(Received via mailing list)
Hi,

In <20121112062332.GA16276@fluido.as>
  "[ruby-gnome2-devel-en] Recent Ruby: 'depend' files must be changed"
on Mon, 12 Nov 2012 07:23:32 +0100,
  "Carlo E. Prelz" <fluido@fluido.as> wrote:

>
> But then, when doing make install, the new library archives are not
> copied over the old ones in /usr/local/lib/ruby.
>
> This happens because, in several of the 'depend' files, both targets
> 'install' and 'install-so' are defined.

Thanks for your report!
I didn't notice it.

> I got the mechanism to work by eliminating 'install-so'. For example,
> in the case of glib2, I changed file glib2/ext/glib2/depend from:

I think the following approach is better because some
packagers use install-so to install *.so and *.h files:

diff --git a/glib2/ext/glib2/depend b/glib2/ext/glib2/depend
index f601650..6e517c2 100644
--- a/glib2/ext/glib2/depend
+++ b/glib2/ext/glib2/depend
@@ -1,4 +1,5 @@
-install-so:
+install-so: install-headers
+install-headers:
   $(INSTALL_DATA) $(srcdir)/rbglib.h $(RUBYARCHDIR)
   $(INSTALL_DATA) $(srcdir)/rbglibdeprecated.h $(RUBYARCHDIR)
   $(INSTALL_DATA) $(srcdir)/rbglib2conversions.h $(RUBYARCHDIR)

If you can send a pull request on GitHub with the approach,
I'll merge it. If you cannot it, I'll do it later.


Thanks,
--
kou
3853dd5371ac1e094fc45d6c2aa0e459?d=identicon&s=25 Carlo E. Prelz (Guest)
on 2012-11-15 07:16
(Received via mailing list)
Subject: Re: [ruby-gnome2-devel-en] Recent Ruby: 'depend' files must be
changed
  Date: Wed 14 Nov 12 10:48:11PM +0900

Quoting Kouhei Sutou (kou@cozmixng.org):

> If you can send a pull request on GitHub with the approach,
> I'll merge it. If you cannot it, I'll do it later.

The whole concept of "send a pull request on GitHub" is a bit hazy
here - I confess I find git often confusing and counterintuitive.

I am sure the world can wait.

Carlo

--
  *         Se la Strada e la sua Virtu' non fossero state messe da
parte,
* K * Carlo E. Prelz - fluido@fluido.as             che bisogno ci
sarebbe
  *               di parlare tanto di amore e di rettitudine?
(Chuang-Tzu)
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2012-11-15 13:38
(Received via mailing list)
Hi,

In <20121115061537.GA1934@fluido.as>
  "Re: [ruby-gnome2-devel-en] Recent Ruby: 'depend' files must be
changed" on Thu, 15 Nov 2012 07:15:37 +0100,
  "Carlo E. Prelz" <fluido@fluido.as> wrote:

>
> I am sure the world can wait.

OK. I'll do it later.
Thanks for your report. It was very helpful.


Thanks,
--
kou
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2012-11-22 14:02
(Received via mailing list)
Hi,

In <20121115.213723.657926821957984851.kou@cozmixng.org>
  "Re: [ruby-gnome2-devel-en] Recent Ruby: 'depend' files must be
changed" on Thu, 15 Nov 2012 21:37:23 +0900 (JST),
  Kouhei Sutou <kou@cozmixng.org> wrote:

>>> If you can send a pull request on GitHub with the approach,
>>> I'll merge it. If you cannot it, I'll do it later.
>>
>> The whole concept of "send a pull request on GitHub" is a bit hazy
>> here - I confess I find git often confusing and counterintuitive.
>>
>> I am sure the world can wait.
>
> OK. I'll do it later.
> Thanks for your report. It was very helpful.

I've fixed it in master.

Thanks,
--
kou
3853dd5371ac1e094fc45d6c2aa0e459?d=identicon&s=25 Carlo E. Prelz (Guest)
on 2012-11-26 16:51
(Received via mailing list)
Subject: Re: [ruby-gnome2-devel-en] Recent Ruby: 'depend' files must be
changed
  Date: Thu 22 Nov 12 10:01:25PM +0900

Quoting Kouhei Sutou (kou@cozmixng.org):

> I've fixed it in master.

Many thanks, as usual...

Carlo

--
  *         Se la Strada e la sua Virtu' non fossero state messe da
parte,
* K * Carlo E. Prelz - fluido@fluido.as             che bisogno ci
sarebbe
  *               di parlare tanto di amore e di rettitudine?
(Chuang-Tzu)
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.