[Scons-users] 回复: Scons-users Digest, Vol 144, Issue 11

Yu,Zhiwei (YFI,Shanghai,CN) zhiwei.yu at yanfeng.com
Wed Sep 27 10:33:01 EDT 2023


Thank you, Mats  and Steve.
I think I can try to collect all of the stdout meaasge from compiler. And then, filte them.
If I make any progress, I will send email.




Best Regards!


于志伟

Software Engineer

延锋科技

------------------------------------

zhiwei_yu at yanfeng.com<mailto:zhiwei_yu at yanfeng.com>



[YF_logo_PNG]


________________________________
发件人: Scons-users <scons-users-bounces at scons.org> 代表 scons-users-request at scons.org <scons-users-request at scons.org>
发送时间: 2023年9月27日 13:37
收件人: scons-users at scons.org <scons-users at scons.org>
主题: Scons-users Digest, Vol 144, Issue 11

CAUTION: This email originated from outside of the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.


Send Scons-users mailing list submissions to
        scons-users at scons.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://pairlist4.pair.net/mailman/listinfo/scons-users
or, via email, send a message with subject or body 'help' to
        scons-users-request at scons.org

You can reach the person managing the list at
        scons-users-owner at scons.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Scons-users digest..."


Today's Topics:

   1. Re:  ??: Scons-users Digest, Vol 144, Issue 8
      (Steve Hill  (Wireless))


----------------------------------------------------------------------

Message: 1
Date: Tue, 26 Sep 2023 12:29:22 +0000
From: "Steve Hill  (Wireless)" <Steve.Hill1 at viavisolutions.com>
To: SCons users mailing list <scons-users at scons.org>
Subject: Re: [Scons-users]  ??: Scons-users Digest, Vol 144, Issue 8
Message-ID:
        <BY1PR18MB5327271276C4A02D83795AA2D1C3A at BY1PR18MB5327.namprd18.prod.outlook.com>

Content-Type: text/plain; charset="utf-8"

As Mats has said, the issue is not restricted to Python - all spawned process can also output to stdout and, by default, all this output can interleave in arbitrary ways. We've got round this by overloading the function used to spawn a sub-process such that it captures the output from the tool and outputs it to stdout only having taken a Lock that is used for all output during the build phase. This has the added advantage that, for some tools that are very chatty and don't provide a way to quieten them down, we can filter out the noise and only output the parts that are useful information for the user.

S.

-----Original Message-----
From: Scons-users <scons-users-bounces at scons.org> On Behalf Of Mats Wichmann
Sent: Monday, September 25, 2023 6:28 PM
To: SCons users mailing list <scons-users at scons.org>
Subject: Re: [Scons-users] ??: Scons-users Digest, Vol 144, Issue 8

EXTERNAL EMAIL: Do not click links or open attachments unless you know and trust the sender.


On 9/25/23 08:54, Eric Fahlgren wrote:
> On Mon, Sep 25, 2023 at 3:23?AM Yu,Zhiwei (YFI,Shanghai,CN)
> <zhiwei.yu at yanfeng.com <mailto:zhiwei.yu at yanfeng.com>> wrote:
>
>     Hi Guys,
>
>              I find that if I set -j8, the printing messages sequence
>     will be disordered.
>              I think the reason is python print buffer has competition
>     in multithreading. Am I right?
>              And how can I resolve it.
>
>
> As each subprocess has something to say, it says it.  This is normal
> and expected for anything other that -j1.  If you have a requirement
> that the output messages be sequential, then your only solution is to
> turn off multiple subprocesses and use -j1.

It's not clear exactly what the problem is.  Will add these notes:

* SCons chooses the build order to best resolve the depndency graph.
That means things may not be built in the order you expect - that's one possible form of out-of-order, and nothing to worry about.

* SCons prints its own message for each action, if those are too noisy you can change what it prints, which might look clearer (if you don't need the details).  Those messages should not interfere with one another, as those are happening inside Python.

* SCons has no control at all over what external commands output or when they do, so those might indeed interleave, it multiple theads are in use.  For many commands, they don't actually say anything unless something is wrong, but some are more talkative.
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://urldefense.com/v3/__https://pairlist4.pair.net/mailman/listinfo/scons-users__;!!Niha4SQ!8DFMhe-xBuct_VbHF8evvWm7JbYsnsbMRSvV2N1nhGWN5ErmmuF0kZKEUINOlQW1wMSYrmFoxmOmNkF8qobUjsj5$

------------------------------

Subject: Digest Footer

_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://pairlist4.pair.net/mailman/listinfo/scons-users


------------------------------

End of Scons-users Digest, Vol 144, Issue 11
********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20230927/a8846579/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-YF_logo_PN.png
Type: image/png
Size: 5412 bytes
Desc: Outlook-YF_logo_PN.png
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20230927/a8846579/attachment-0001.png>


More information about the Scons-users mailing list