[Aboriginal] "sh: gettext: command not found" during host compile

Matthew J Fletcher amimjf at sky.com
Tue Jul 12 13:02:07 PDT 2011

On 12/07/11 01:24, Rob Landley wrote:
> On 07/11/2011 01:34 PM, Matthew J Fletcher wrote:
>> On 11/07/11 12:36, Rob Landley wrote:
>>> On 07/10/2011 02:02 AM, Matthew J Fletcher wrote:
>>>> Hi,
>>>> I get this printed several thousand times during compile, it does not
>>>> seem to effect the build process, i.e for various targets it runs to
>>>> completion.
>>> Um, during compile of what?  While building a system image on a host?
>>> Or while building another source package natively under a system image?
>> Almost everything. I started following the FAQ on debug_logging and
>> quickly noticed that even "more/record-commands.sh" outputed "sh:
>> gettext: command not found"
> Huh.  Why does it _think_ you have gettext?  If you ran host-tools.sh
> there shouldn't be one in build/host.  (Check your build/host to see if
> you have one?)
> Do "which gettext" and see what it finds?  And if you can run it?

[mfletcher at purplebox ~]$ which gettext

[mfletcher at purplebox ~]$ gettext --version
gettext (GNU gettext-runtime) 0.17
Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

but i also have,.

[mfletcher at purplebox ~]$ which gettext.sh

[mfletcher at purplebox ~]$ gettext.sh --version
/usr/bin/gettext.sh (GNU gettext-runtime) 0.17
Copyright (C) 2003-2007 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

bonkers !

>> stripping that script right down to,..
>> #!/bin/bash
>> source sources/include.sh || exit 1
>> $CC --version
>> my output is,..
>> [mfletcher at purplebox aboriginal-1.0.2]$ more/record-commands.sh
>> sh: gettext: command not found
>> gcc (GCC) 4.4.3
>> Copyright (C) 2010 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> interesting,.. not using $CC and doing /usr/bin/gcc --version in the
>> script does not complain about gettext.
> Sigh.  Ubuntu made its horrible wrapper script even worse, didn't it?
> Do you suppose it has any connection to this old commit?
>    http://landley.net/hg/aboriginal/rev/1041
>> But inside include.sh all CC is just "export_if_blank CC=cc" and my 'cc'
>> is just a symlink to /usr/bin/gcc
>> I think i am lost.
> Ubuntu turned gcc into a perl script that calls gcc.  (Yes really.)
> Sounds like Mandrake might have done the same thing, if so I'll have to
> install a copy here and fix it...

On this box /usr/bin/gcc which simlinks to cc is a binary, nano says the 
first bytes are ^?ELF.

you probably wont like my linux box at work that uses the shell wrapper 
colourgcc (or it might be the american spelling), anyhow thats a 
different box.

> Now you see why I go to such great lengths to sanitize the host
> environment.  Because they keep coming up with new ways to be CRAZY.  I
> can work around everything but the host toolchain by building busybox (I
> spent several years implementing working versions of things like "sort"
> and "sed" and "patch" and "mount" in busybox), but unfortunately you
> need a compiler to build a compiler...
>>>> How would i go about finding what sh is trying to invoke ?
>>> I have infrastructure that wraps all the command line utilities and
>>> saves a log of every command line called, in order.  It's described here:
>>>     http://landley.net/aboriginal/FAQ.html#debug_logging
> Note that shell scripts which call #!/stuff bypass the $PATH and thus my
> wrapper won't catch those.
> Rob


Matthew J Fletcher


More information about the Aboriginal mailing list