[Scons-users] "Defer to SCons to build build\__cpp_path.txt"

Daniel Moody dmoody256 at gmail.com
Wed Apr 27 11:36:35 EDT 2022


Hello Liruncong,

I could not reproduce your case in a simple test. I think your build is
creating some differences each time scons is run. The ninja tool will
regenerate the ninja file if there are any differences from the previous
ninja file, for example even if the command line options for some
compilation are the same but in a different order. In that case all things
which ninja will defer to scons to build, must be rebuilt. SCons however
may determine for those items that they do not need to be rebuilt
because the inputs (the CPPPATH string) have not changed.

I pushed an update to the ninja_integration_branch which prints an
additional message if scons decided to regenerate the file. If it decides
to regenerate the build.ninja file you should see a message like:

Generated new build.ninja!

If scons decided not to regenerate the ninja file because there were no
changes you should see:

No updates detected, build.ninja not regenerated.

If you see the ninja file is being regenerated each time, please make a
copy of the build.ninja file, then run again and compare the original copy
to the newly generated ninja file. You can send me both copies so I can see
if for some reason scons is causing the unexpected regeneration.

On Wed, Apr 27, 2022 at 7:16 AM liruncong2018 <liruncong2018 at qq.com> wrote:

> Hi,
> After successful compilation, select a file and add a blank line, then
> execute the following two commands in sequence:
> 1) run_ninja_env.bat -d explain build\__cpp_path.txt
> 2) scons -j%NUMBER_OF_PROCESSORS% --experimental=ninja
> The attachment is the execution result of the above two commands.
> The following output from the log record should be removed:
> ···
> [2/2518] Defer to SCons to build build\__link_objects.txt [2K
> [3/2518] Defer to SCons to build build\__exe_cpp_path.txt [2K
> [4/2518] Defer to SCons to build build\__cpp_path.txt [2K
> [5/2518] Defer to SCons to build build\__define_options.txt [2K
> ···
> From the file time point of view, the 4 txt files have not been
> recompiled, so there should be no output information.
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Daniel Moody" <dmoody256 at gmail.com>;
> *发送时间:* 2022年4月27日(星期三) 凌晨2:51
> *收件人:* "SCons users mailing list"<scons-users at scons.org>;
> *抄送:* "liruncong2018"<liruncong2018 at qq.com>;
> *主题:* Re: [Scons-users] "Defer to SCons to build build\__cpp_path.txt"
>
> It depends on the specific files in question and their dependencies.
> Looking at the most recent build.ninja you sent, these files only depend on
> the scons build (they are from the Textfile builder, so then in the scons
> build, the only dependency is the source string, which is generated from
> CPPPATH in the SConscripts files).
>
> I would like to know why ninja decided to rebuild these files if they are
> already built. After this issue is occurring, then run this command
>
> run_ninja_env.bat -d explain build\__cpp_path.txt
>
> And ninja should say why it is attempting to rebuild the file. Please send
> me the output as well.
>
> On Tue, Apr 26, 2022, 8:18 AM liruncong2018 via Scons-users <
> scons-users at scons.org> wrote:
>
>> Hi,
>>>
>>> When there are file errors that are not corrected, the following lines
>>>> always appear when compiling, but the file time has not changed, indicating
>>>> that the file has not been regenerated.
>>>
>>> Is it possible not to display this information if the file is not
>>>> regenerated? Otherwise, users will think these files have been updated.
>>>
>>> ···
>>>
>>> [2/2518] Defer to SCons to build build\__cpp_path.txt [2K
>>>>
>>>> [3/2518] Defer to SCons to build build\__link_objects.txt [2K
>>>>
>>>> [4/2518] Defer to SCons to build build\__define_options.txt [2K
>>>>
>>>> ···
>>>>
>>>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220427/79128210/attachment.htm>


More information about the Scons-users mailing list