installing binutils

Allard Welter allard at nospam.nl
Sat Jan 10 09:33:35 PST 2004


On Saturday 10 January 2004 17:38, S. Anthony Sequeira wrote:
> On Sat, 10 Jan 2004 17:22:21 +0100, Allard Welter penned:
> > On Saturday 10 January 2004 16:12, Daniel Díaz wrote:
> >> On Sat, 2004-01-10 at 09:02, Allard Welter wrote:
> >> > On Saturday 10 January 2004 14:56, Trapp wrote:
> >> > > Hi
> >> > > I'm trying to install binutils but when I do configure \
> >> > > --prefix=/tools --disable-nls It gives me the error:   configure:
> >> > > warning:  --prefix=/tools: invalid host type
> >> > > Any idea what the problem is?
>
> [...]
>
> > And " --prefix" (with a space at the beginning) is of course not a valid
> > option, so configure is going to it's default which seems to be to
> > interpret any non-valid options as the host-type.
>
> No, space is just that, white space, all the '\' is doing is telling the
> shell to interpret the next character literally.  so the --prefix is
> perfectly valid in this context.  The error is due to something else
> entirely.
>

I beg to differ, the next character is indeed interpreted as a space. straight 
after the space comes --prefix, which is tacked onto space and passed to 
configure. If there were no spaces after the backslash, --prefix will be 
passed as it should be and if there were two or more spaces, a space and 
--prefix will be passed.

try this:
allard pts/2 ~/tmp> touch some-file
allard pts/2 ~/tmp> ls some-file
some-file
allard pts/2 ~/tmp> ls \some-file # "some-file" passed to ls
some-file
allard pts/2 ~/tmp> ls \ some-file # " some-file" passed to ls
ls:  some-file: No such file or directory
allard pts/2 ~/tmp> ls \  some-file # " " and "some-file" passed to ls */
ls:  : No such file or directory
some-file


<and from an arbitrary configure>
case $ac_option in

[...]

  *)
    # FIXME: should be removed in autoconf 3.0.
    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=
$ac_option}
    ;;
esac
<unquote>

As you can see, you get a warning about an invalid host type and then build, 
host and target are set to the abberrant option. I haven't unpacked binutils 
to see what the default for ac_option is here, but I'm guessing the same 
since we're not using autoconf 3 yet.

> > Thanks for pointing this out to me.
> >
> > Allard
>
> --
> Tony

-- 
allard at quicknet.nl




More information about the lfs-support mailing list