public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: Console output broken in version 3.3.x under native ninja
Date: Thu, 11 Nov 2021 17:18:39 +0900	[thread overview]
Message-ID: <20211111171839.34cb325261ae7a6f82923de1@nifty.ne.jp> (raw)
In-Reply-To: <BL3PR08MB7451C16C03ACC04FFE32E812F3939@BL3PR08MB7451.namprd08.prod.outlook.com>

On Wed, 10 Nov 2021 15:40:37 +0000
"Bresalier, Rob \(Nokia - US/Murray Hill\) wrote:
> Hi:
> 
> This worked fine with Cygwin 3.2.0 but is broken starting with Cygwin 3.3.0, hence I think it is a Cygwin bug and not a ninja bug.
> 
> When running Cygwin applications under Windows native 'ninja.exe' build tool (not the Cygwin packaged one) then the stdout is not emitted to the console starting with Cygwin 3.3.0. It worked fine with Cygwin 3.2.0 and stdout is emitted to the console. If using Cygwin ninja with 3.3.0 it also works. The problem is with Windows native ninja and Cygwin programs with Cygwin version 3.3.0 and later.
> 
> Using Cygwin ninja is not an option for us as a solution. We need to use the Windows native ninja for reasons that I won't go into here.
> 
> To reproduce the issue:
> 
> 1) Download windows native ninja from here: https://github.com/ninja-build/ninja/releases
>    a. Use ninja-win.zip that has the ninja.exe executable
>    b. DO NOT USE the Cygwin version of ninja
> 
> 2) Below is a sample build.ninja file that demonstrates the problem. This sample build.ninja simply causes bash -help to run. Create this build.ninja text file in some directory.
> 
> 3) cd to the directory where you have the build.ninja, and then run the native ninja.exe, you won't see the bash --help output with Cygwin 3.3.0 and later.
>   a. I suggesting using -v option with ninja.exe: "path/to/native/ninja.exe -v"
> 
> 4) If you try it with Cygwin 3.2.0 it works fine you will see the bash --help output.
> 
> 5) If you run c:/cygwin64/bin/bash --help outside of ninja it works fine.
> 
> 6) This happens if you run the native ninja.exe from either a command window or from the Cygwin/minty/bash
> 
> Here is the sample build.ninja to be used to reproduce the problem:
> 
> --------start build.ninja --------------
> rule CUSTOM_COMMAND
>   command = $COMMAND
>   description = $DESC
> 
> build MC5U_BMDCO6_versions.txt: CUSTOM_COMMAND
>   COMMAND = c:/cygwin64/bin/bash --help
>   DESC = Running bash --help
>   restat = 1
> --------end build.ninja --------------
> 
> Thanks for having a look.

Thanks for the report.

I could reproduce your problem and found the cause.

Windows native ninja creates pipe with size zero, which cannot
be handled correctly by current cygwin pipe code (raw_write()).

I will submit a patch for this issue shortly.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

      reply	other threads:[~2021-11-11  8:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 15:40 Bresalier, Rob (Nokia - US/Murray Hill)
2021-11-11  8:18 ` Takashi Yano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211111171839.34cb325261ae7a6f82923de1@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).