delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/15/22:19:55

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <03fe01c0adc5$657e4330$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Andy Helten" <andy DOT helten AT dot21rts DOT com>, <cygwin AT cygwin DOT com>
References: <3AB14F6C DOT E15E2D61 AT dot21rts DOT com> <032601c0adab$c8931870$0200a8c0 AT lifelesswks> <3AB181E3 DOT 85663C13 AT dot21rts DOT com>
Subject: Re: Shell's "eval" doesn't behave when running a non-cygwin compiler
Date: Fri, 16 Mar 2001 14:01:12 +1100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 16 Mar 2001 02:55:37.0672 (UTC) FILETIME=[94206480:01C0ADC4]

An "update" won't be enough. You need to go to the cygwin web page and
download a development snapshot to test what I'm suggesting.

Rob

----- Original Message -----
From: "Andy Helten" <andy DOT helten AT dot21rts DOT com>
To: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>;
<cygwin AT cygwin DOT com>
Sent: Friday, March 16, 2001 2:00 PM
Subject: Re: Shell's "eval" doesn't behave when running a non-cygwin
compiler


> I just recently, thee weeks ago, installed the entire distribution on
a
> Win98 machine and two weeks ago on a Win2k machine -- both exhibit the
same
> behavior.  I will update again tomorrow.
>
> Andy
>
> Robert Collins wrote:
>
> > Try a recent snapshot. There was a related thread recently (cygwin
not
> > waiting for non-cygwin child process's) that IIRC Chris checked in a
fix
> > for.
> >
> > Rob
> >
> > ----- Original Message -----
> > From: "Andy Helten" <andy DOT helten AT dot21rts DOT com>
> > To: <cygwin AT cygwin DOT com>; "Larry Hall (RFK Partners, Inc)"
> > <lhall AT rfk DOT com>
> > Sent: Friday, March 16, 2001 10:25 AM
> > Subject: Shell's "eval" doesn't behave when running a non-cygwin
> > compiler
> >
> > > Hello,
> > >
> > > I've posted this problem to this newgroup a couple times
> > > (first without an strace listing and then with an strace
> > > listing), under the subject: "VxWorks' GNU cross-compiler in
> > > the Cygwin environment".  However, I have only gotten one
> > > response and was hoping if I simplified the problem scenario
> > > and changed the "Subject:" line, it might be more appealing
> > > to look at.
> > >
> > > The following simple shell script can be used to produce the
> > > problem:
> > >
> > > #!/bin/sh
> > > rm -f conftest
> > > ac_link="c++ppc -nostdlib -nostdinc -c -o conftest
> > > conftest.cpp"
> > >
> > > if { (eval echo \"$ac_link\"); (eval $ac_link); } then
> > >   echo "Compile succeeded (or did it?)"
> > > else
> > >   echo "Compile failed!"
> > > fi
> > >
> > > if test -s conftest; then
> > >   echo "1. The output is available!"
> > > else
> > >   echo "1. The output is NOT available!"
> > > fi
> > >
> > > sleep 2
> > >
> > > if test -s conftest; then
> > >   echo "2. The output is available!"
> > > else
> > >   echo "2. The output is NOT available!"
> > > fi
> > >
> > >
> > >  If I run the above shell script using 'bash' or 'sh', I get
> > > the following output:
> > >
> > > c++ppc -nostdlib -nostdinc -c -o conftest conftest.cpp
> > > Compile succeeded (or did it?)
> > > 1. The output is NOT available!
> > > 2. The output is available!
> > >
> > > Also, I have found a work around using the following perl
> > > script:
> > >
> > > #!/usr/bin/perl
> > > eval `c++ppc @ARGV`;
> > >
> > > Apparently, Perl's "eval" waits for the compiler to finish
> > > before continuing and 'sh' waits for the cygwin perl to
> > > finish, so this at least serializes things.  So the output
> > > from the shell script when using the perl script as the
> > > "compiler" is what you would expect:
> > >
> > > c++ppc_cygwin_workaround -nostdlib -nostdinc -c -o conftest
> > > conftest.cpp
> > > Compile succeeded (or did it?)
> > > 1. The output is available!
> > > 2. The output is available!
> > >
> > > However, the downside is that I don't get the return value
> > > from the compiler.  So if a compile fails, it does not stop
> > > the build.
> > >
> > > The question I have:  can cygwin 'sh' or 'bash' be used to
> > > spawn non-cygwin utilities (compilers)?  From my experience,
> > > the answer is NO.  Is it even possible to get 'sh' to
> > > recognize and wait for a non-cygwin process spawned by
> > > 'eval'?  Could someone please answer these questions?  I can
> > > provide an strace of the above situation if anyone wants
> > > it.  And yes, I would be willing to at least look at the
> > > problem, but first would like someone to at least
> > > acknowledge this is problem and/or classify this behavior
> > > (normal/not normal/user error). OR, if there is another
> > > Bourne compatible shell that works with the cygwin
> > > environment could someone point me to it?
> > >
> > > Thanks,
> > > Andy
> > >
> > >
> > >
> > > --
> > > Want to unsubscribe from this list?
> > > Check out: http://cygwin.com/ml/#unsubscribe-simple
> > >
> > >
> >
> > --
> > Want to unsubscribe from this list?
> > Check out: http://cygwin.com/ml/#unsubscribe-simple
>
>
> Shop online without a credit card
> http://www.rocketcash.com
> RocketCash, a NetZero subsidiary
>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019