lost stderr in console

Bob Feng


As the description in Commit 01b6090b, the change was to fix the incremental build issue in the MSVC toolchain. But now it‘s found that impacts the usage of the GCC toolchain.

Please file a BZ for this issue. And I'll fix it.


-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of wenyi,xie via groups.io
Sent: Thursday, March 25, 2021 10:18 AM
To: gaoliming <gaoliming@byosoft.com.cn>; discuss@edk2.groups.io
Subject: 答复: [edk2-discuss] lost stderr in console

Hi, liming,

Yes, my command using 2>&1 to redirect strerr to stdout, and after updating to version 202011 the stderr are not shown in the screen but only written in xxx.log.
According to Laszlo's help and checking the commit log, I find the problem relate to this commit:

Proc = MakeSubProc(Command, stdout=PIPE, stderr=STDOUT, env=os.environ, cwd=WorkingDir, bufsize=-1, shell=True)

As the stdout and stderr are combined togetherin since the commit, so in version 201903 my command can work, but in version 202011, after this commit merged, it can't work well.

发件人: gaoliming [mailto:gaoliming@byosoft.com.cn]
发送时间: 2021年3月25日 9:27
收件人: discuss@edk2.groups.io; xiewenyi (A) <xiewenyi2@huawei.com>
主题: 回复: [edk2-discuss] lost stderr in console

Do you use build command to build your platform and find the message from stderr are not shown in the screen?

发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表 wenyi,xie via
发送时间: 2021年3月17日 11:23
收件人: discuss@edk2.groups.io
主题: [edk2-discuss] lost stderr in console


I used to set makeflags like below,so that only message from stderr
will be shown in console while compiling, and at the same time message
from stderr and stdout will all be saved in xxx.log.
COMMAND MAKEFLAGS= set -eo pipefail && sh xxx.sh 2>&1 >>
${LOG_FILE_DIR}/xxx.log | tee -a ${LOG_FILE_DIR}/xxx.log

But after updating edk2 from 201903 to 202011, the message from stderr
is not shown in console any more. In xxx.log, the message from stderr
and stdout are still saved.
Do anything change in edk2 may affect on it ?