From: ANDREW MARLOW, BLOOMBERG/ LONDON OF (amarlow1_at_[hidden])
Date: 2005-06-22 07:00:26
thanks Craig, I could not have put it better.
This whence error has been bugging me for some time.
----- Original Message -----
From: Craig Rodrigues <jamboost_at_[hidden]>
At: 6/22 12:49
On Tue, Jun 21, 2005 at 10:16:37PM -0500, Rene Rivera wrote:
> "whence" *is* a builtin for bourne shell. You must mean that it's not a
> builtin for bash.
No it is not. whence is a built-in for the Korn shell (ksh)
which is not /bin/sh on all platforms.
> > This will get rid of error messages that build.sh prints out
> > when I build bjam on Linux and FreeBSD.
> OK, I never got warnings on RedHat, so I guess it has a real bourne
> shell (or something closer to a real one) instead of a symlink from "sh"
> to "bash".
Well I don't know how your RedHat box is configured, but on my
SuSE Linux 8.0 box, if I run /bin/sh and type "whence ls",
whence: command not found
> Sorry but I can't apply the patch as it's going to break other Unix like
> systems, like OpenBSD and Solaris.
Well, I just checked (with the help of some friends on IRC) on the following
platforms: NetBSD, FreeBSD, OpenBSD, MacOS X, Solaris, and IRIX. "type" is a
valid shell-builtin for "/bin/sh" on all those platforms, while "whence" is
not (although whence is available on some platforms).
The current behavior of build.sh is to default to "hash" if "whence"
returns an error....in my cases on FreeBSD and Linux, the invocations
of "whence" errors out because it does not exist as a valid command,
and is not a shell-builtin for /bin/sh.
If you are going to invoke "/bin/sh" for build.sh, then you
should strive for portability, and do what is POSIX compliant.
"type" is documented as part of the POSIX/Single Unix Specification
but "whence" is not.
-- Craig Rodrigues rodrigc_at_[hidden] Yahoo! Groups Links
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk