On 4/16/07, Nobuyoshi Nakada <nobu / ruby-lang.org> wrote:
> Hi,
>
> At Tue, 10 Apr 2007 20:21:41 +0900,
> Michal Suchanek wrote in [ruby-core:10907]:
> > I recently upgraded coreutils, and the location of install
> > changed from /bin to /usr/bin.
> >
> > The odd thing is that only ruby extensions failed to build,
> > everything else seems fine.
> >
> > It is because ruby resolves the path of install during build,
> > and the etensin configuration uses that.
>
> It is done by autoconf.  You need to run configure again in
> such case.
huh? The extension uses mkmf.rb. How do I run autoconf on that except
reinstalling ruby?
>
> > The correct solution is probably to store the user supplied
> > hint - either '' or the path the user specified. That way the
> > manual path can be preserver and the automatically resolved
> > path could work even if the location changes.
>
> Autoconf seems to dislike that "solution", since `install'
> command and its options are not very portable,
>

This is what I get from mkmf on Gentoo:

irb(main):001:0> require "mkmf"
=> true
irb(main):002:0> [CONFIG["AR"],CONFIG["CC"],CONFIG["CPP"],CONFIG["INSTALL"]]
=> ["i686-pc-linux-gnu-ar", "i686-pc-linux-gnu-gcc",
"i686-pc-linux-gnu-gcc -E", "/usr/bin/install -c"]

On OS X:

irb(main):001:0> require "mkmf"
=> true
irb(main):002:0> [CONFIG["AR"],CONFIG["CC"],CONFIG["CPP"],CONFIG["INSTALL"]]
=> ["ar", "gcc", "gcc -E", "/sw/bin/ginstall -c"]

I did not specify the install location. It is fine that the config
system determines it is named "ginstall" and requires the "-c" option.
However, I did not specify the location, and it is stored in mkmf.

If the binary is moved no extension (that does not use autoconf
itself) can be built anymore.

Thanks

Michal