Re: make bug on Solaris when using Sun CC

Scott Wilson <[email protected]> Thu, 8 Jan 2004 13:13:36 -0600 (CST)
Newsgroups gmane.network.bb4.devel
Message-ID <[email protected]>

While the line of code I gave still fixes the problem, the actual
cause is different than I expected.

<01/08/04 cove >> /bin/sh
$ uname -a
SunOS cove 5.9 Generic_112233-08 sun4u sparc SUNW,Ultra-250
$ type gcc 2> /dev/null
gcc not found
$ /bin/type gcc 2> /dev/null
$ type type
type is a shell builtin
$

The binary /bin/type has the behavior you'd expect, but the built in shell
command on the Solaris Bourne does not.  The builtin has the "error" go to
the terminal regardless of redirection.

Additionally....

$ XX=`/bin/type gcc` 2> /dev/null
gcc not found
$ echo $XX

$ XX=`/bin/type gcc 2> /dev/null`
$ echo $XX

$


It also seems that when using backticks, the standard error pipe is
independant of the standard error of the executed command.



Scott Wilson                    Manager / Lead System Administrator
[email protected]            NSIT - TaRT - Systems & Servers

On Thu, 8 Jan 2004, Robert-Andre Croteau wrote:

> Graham Glen wrote:
> > 
> > >
> > > actually
> > > XX=`type gcc` 2>/dev/null
> > >
> > > was intended to be
> > > XX=`type gcc 2>/dev/null`
> > >
> > >
> > > BTW, are you sure Sol9 yields "gcc not found" for this statement:
> > 
> > Rob,
> > 
> > I've just tested this on Solaris 8 & 9 and it gives gcc not found.
> > 
> 
> my mistake, the default shells on the boxes I tested on were not /bin/sh
> ...
> 
> I'll fix genmake to check for "gcc not found"
> 
> thanks
> -- 
> Robert-Andre Croteau    BSD,MOTU
> Quest Software, Inc.            Big Brother, Product Architect
> http://www.quest.com/                          http://bb4.com/
> +1 (514) 238-9374
>         Si le bonheur ne s'achete pas alors louez le.
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
> To unsubscribe from this list send e-mail to mailto:[email protected]
> with unsubscribe bbd in the BODY of the message.
> 



--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list send e-mail to mailto:[email protected]
with unsubscribe bbd in the BODY of the message.