[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Findutils failure due to reliance /bin/echo

From: Eric Blake
Subject: Re: Findutils failure due to reliance /bin/echo
Date: Thu, 06 May 2010 08:17:32 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4

On 05/05/2010 04:30 PM, James Youngman wrote:
>>>>> FAIL: l1, unexpected failure, child process exited abnormally, 
>>>>> /tmp/nix-build-iqdrm25mpg40iivc59hjmdjjay1rfifp-findutils-4.5.10-git.drv-0/findutils-4.5.10-git/xargs/testsuite/../xargs:
>>>>>  /bin/echo: No such file or directory
>>>> This is due to the fact that there’s no /bin/echo in the build
>>>> environment (actually /bin on NixOS contains only /bin/sh).

That's a bug in Hydra's environment.  POSIX requires that all the
standard utilities, including echo, be available for use by exec on the
path listed by 'command -p getconf PATH'.  Even if it is also available
as a shell builtin, that does not alleviate the requirement to also have
it available on $PATH.

>> Still, ‘AC_PATH_PROG([ECHO], [echo])’ and then referring to @ECHO@
>> instead of /bin/echo in xargs.in.c would remove this path assumption.
>> What do you think?

I dislike the idea.  If echo is not available in the environment, then
the environment should be fixed, rather than making findutils work
around this non-standard setup.

> As far as I can tell, there is no requirement in POSIX or the SVID
> which would require "echo" to live in a particular directory, and none
> which would require xargs to expect echo to live in /bin.

Agreed - POSIX does not require /bin/echo.  But it _does_ require an
echo somewhere on the system-dependent minimum-compliance PATH (which
you can get at with 'command -p getconf PATH' on a POSIX-compliant
system, although command -p is not portable to some non-POSIX systems).

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]