installing binutils

Allard Welter allard at nospam.nl
Sat Jan 10 08:22:21 PST 2004


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?
> >
> > It is because of the way you are entering the command. the \ means
> > continue on the next line. configure is now assuming --prefix=/tools is
> > something besides an option flag.
>
> Actually, it's escaping the next character.

Sorry, just for completeness: From the bash manual ...

<quote>
A non-quoted backslash `\' is the Bash escape character.  It preserves
the literal value of the next character that follows, with the
exception of `newline'.  If a `\newline' pair appears, and the
backslash itself is not quoted, the `\newline' is treated as a line
continuation (that is, it is removed from the input stream and
effectively ignored).
<unquote>

>
> Since "\ " means "put there an empty space, you bash from hell!", the
> result would be something like this:
>
> [ddiaz at akva ~/bin]$ ./configuro \ --prefix=/tools --disable-nls
> [ --prefix=/tools]
> [--disable-nls]
>

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.

> And without the escape character:
> [ddiaz at akva ~/bin]$ ./configuro  --prefix=/tools --disable-nls
> [--prefix=/tools]
> [--disable-nls]
>
>
> This is a little proof of concept:
> -- ./configuro --
> #!/bin/bash
> echo "[$1]
> [$2]"
> -----------------
>
>
> Best regards,
>
> Daniel Díaz
> yosoy at danieldiaz.org

Thanks for pointing this out to me.

Allard

-- 
allard at quicknet.nl




More information about the lfs-support mailing list