[Scons-users] Scons Implicity Dependency not found issue

Jason Kenny dragon512 at live.com
Fri Oct 26 12:08:56 EDT 2018


I think I solved this problem in Parts already. Each "component" gets builds and has a set of dependencies on other components. These dependency allow the passing of  various values such as CPPPATH etc so only the ideal paths and location are known when the component builds. This prevent the issues of picking up headers from random components that may cause a circular depends or unexpected depends on other component.

But to try to answer you question... if you use duplicate=0 and you copy a header file in to the variant directory.. this should take over as the one seen first. It also should be a mirror of the srcnode version. ie contents of node and node.srcnode() should be the same.

Jason
________________________________
From: Scons-users <scons-users-bounces at scons.org> on behalf of Bill Deegan <bill at baddogconsulting.com>
Sent: Friday, October 26, 2018 10:18 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Scons Implicity Dependency not found issue

Wouldn't this work?

def usw_board_path(fn):
   return  "#"/$USW_BUILD_PATH/$USE_BUILD_FOLDER/%s"%fn

On Fri, Oct 26, 2018 at 5:59 AM Hua Yanghao <huayanghao at gmail.com<mailto:huayanghao at gmail.com>> wrote:
On Fri, Oct 26, 2018 at 9:45 AM Hua Yanghao <huayanghao at gmail.com<mailto:huayanghao at gmail.com>> wrote:
>
> On Thu, Oct 25, 2018 at 10:08 PM Jason Kenny <dragon512 at live.com<mailto:dragon512 at live.com>> wrote:
> >
> > Hi,
> >
> > I would recommend myself that you use duplicate=0 then. The point for duplicate=1 as default is that there are some tools that don't deal with files input output location and to help avoid possible issues if you have a large build and you might have modified a file while the build was going on ( given you tell SCons to make copies instead of hardlinks... ie this is the --duplicate option). There are a few issues with this however:
> >
> > 1) windows will make copies as SCons does not understand symlink or hard links on this platform with out some extension added to it
> > 2) takes extra times as one has to create items
> > 3) when it is making copies I have had issues I cannot explain yet ( ie not looked in to enough) where scons does not update the files in the variantdir correctly making bad builds. ( I think that is what you are seeing)
> >
> > For large build the time save with duplicate=0 is a big deal, as well as the disk savings given the hard-soft-copy options is not working correctly
> >
> > Bill -- just a guess but I think the issue when copy is being used is that SCons nodes understand the variant and srcnode exists, but has no check, or depends logic to say variant version depends on the srcnode version so there are cases in which a depends on a variant node does mean that the srcnode "copy" update is not seen. So for example the scanner does gets a file and tests that it exists, but since the header does not have any builder the logic to understand that the it should update based on the value of srcnode() version is skipped.
> >
> > -Jason
>
> Thanks Jason. I am seriously considering doing so now ...

In my build system, I made a clear decision that all compiled files
goes to the variant_dir, such that the source folders are intact. This
enabled a uniform way to specifying external dependencies where either
a scons scanner is missing. Now If I use duplicate=0, then I need two
different system to specify this kind of dependency, one for the files
that is in the original source folders, and one for the files that is
created on the fly in the variant_dir ... this breaks user APIs ...
but I do see the build speed up quite a bit.

So finally I come up with a new user-visible API that in SConscript
for users: usw_board_path(fn): return
os.path.join("#"+env["USW_BUILD_PATH"], env["USW_BUILD_FOLDER"], fn),
I can see sometimes, especially with variant_dir, scons tries to be
really smart (maybe a bit too much) that it tries to translate every
single path it sees if without the leading #.

I think I will settle with this one, looks like we really should use
duplicate with great caution.

Thanks Jason for sharing the experience of duplicate=1.

BR, Yanghao
_______________________________________________
Scons-users mailing list
Scons-users at scons.org<mailto:Scons-users at scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ca524782c3a5743105f0b08d63b565172%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636761639248094164&sdata=pq5Jzdjv9wOOyVuwM%2Fkc0ca2cyEdUH3WQEQQczFnDQw%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20181026/5efd5041/attachment-0001.html>


More information about the Scons-users mailing list