[Scons-users] SCons not looking past first missing dependency to find additional missing dependencies

Bill Deegan bill at baddogconsulting.com
Thu Mar 1 20:20:06 EST 2018


You probably only want 3.0.1, 3.0.0 required py 3 print statements.

On Thu, Mar 1, 2018 at 1:45 PM, Don Baldwin <donb at qti.qualcomm.com> wrote:

> Thanks Bill.  We will follow up on all of your suggestions, including
> evaluating SCons 3.x.
>
>
>
> Thanks,
>
> Don
>
>
>
>
>
> *From:* Scons-users [mailto:scons-users-bounces at scons.org] *On Behalf Of *Bill
> Deegan
> *Sent:* Wednesday, February 28, 2018 6:21 PM
>
> *To:* SCons users mailing list <scons-users at scons.org>
> *Subject:* Re: [Scons-users] SCons not looking past first missing
> dependency to find additional missing dependencies
>
>
>
> SCons 3.0 does not require python 3.x. It's python 2.7.x and 3.5+
> compatible.
>
> Indeed your example repro's it.
>
> Also I tried this:
> env = Environment()
>
> def test_builder_action(target, sources, env):
>     print "In test_builder_action: target =", target, 'Sources are:',
> sources
>
> # Setup builder
> env.Append(BUILDERS={'TestBuilder' : env.Builder(action=test_
> builder_action)})
>
> test_node = env.TestBuilder(['test.target'],
> ['test1.source','test2.source'])
> test_node = env.TestBuilder(['test1.target'], ['test11.source','test12.
> source'])
>
> And this is the output:
> python ~/devel/scons/git/scons-bugfixes/src/script/scons.py  -k
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
> scons: *** [test.target] Source `test1.source' not found, needed by target
> `test.target'.
> scons: *** [test1.target] Source `test11.source' not found, needed by
> target `test1.target'.
> scons: done building targets (errors occurred during build).
>
> So looks like -k will get you all the builders failing, but only the first
> missing file for each.
>
> I'd consider this an enhancement request and not a bug.  Bug please file
> with your repo SConstruct on github.
>
> Of course if you wanted to fix it and give a pull request with a test
> that'd be even better!
>
>
>
> -Bill
>
>
>
>
>
> On Wed, Feb 28, 2018 at 6:50 PM, Don Baldwin <donb at qti.qualcomm.com>
> wrote:
>
> Hi Bill,
>
>
>
> Actually, we probably could move to 34.x, but we have a lot of python
> scripts involved with our build, and migrating all of them to Python 3.x
> would be a huge effort.
>
>
>
> Here is a small test case:
>
>
>
> SConstruct file:
>
>
>
> env = Environment()
>
>
>
> def test_builder_action(target, sources, env):
>
>     print "In test_builder_action: target =", target, 'Sources are:',
> sources
>
>
>
> # Setup builder
>
> env.Append(BUILDERS={'TestBuilder' : env.Builder(action=test_
> builder_action)})
>
>
>
> test_node = env.TestBuilder(['test.target'],
> ['test1.source','test2.source'])
>
>
>
> Here is the output:
>
>
>
> scons: Reading SConscript files ...
>
> scons: done reading SConscript files.
>
> scons: Building targets ...
>
> scons: *** [test.target] Source `test1.source' not found, needed by target
> `test.target'.
>
> scons: building terminated because of errors.
>
>
>
> As you can see, it’s only complaining about missing test1.source, and not
> test2.source.  Neither file is actually present in the build.
>
>
>
> -Don
>
>
>
> *From:* Scons-users [mailto:scons-users-bounces at scons.org] *On Behalf Of *Bill
> Deegan
> *Sent:* Wednesday, February 28, 2018 2:40 PM
> *To:* SCons users mailing list <scons-users at scons.org>
> *Subject:* Re: [Scons-users] SCons not looking past first missing
> dependency to find additional missing dependencies
>
>
>
> Why can't you move to 3.x?
>
> Can you provide a small test case to demonstrate this issue?
>
>
>
> On Wed, Feb 28, 2018 at 5:23 PM, Don Baldwin <donb at qti.qualcomm.com>
> wrote:
>
> Hi,
>
>
>
> Is there a way to have SCons find and report all of the missing
> dependencies for a target at once?
>
>
>
> We have a build where we’re getting an error like the following:
>
>
>
>                 scons: *** [foo.h] Explicit dependency `foo_1.xml' not
> found, needed by target `foo.h'.
>
>
>
> After we fix this error and rebuild, we get the following:
>
>
>
>                 scons: *** [foo.h] Explicit dependency `foo_2.xml' not
> found, needed by target `foo.h'.
>
>
>
> We’re already specifying -k on the command line, but that doesn’t seem to
> be working.
>
>
>
> We’re using version 2.0.0.final.0, which I know is pretty old.  We do
> have the option of moving to 2.5.1, if the behavior is different in that
> version, but we can’t move to 3.x.
>
>
>
> One of our guys did some digging, and found the following code in
> SCons/node/__init__.py:
>
>
>
>             for d in self.depends:
>
>                 if d.*missing*():
>
>                     msg = "Explicit dependency `%s' not found, needed by
> target `%s'."
>
>                     raise SCons.Errors.*StopError*(msg % (d, self))
>
>
>
> We looked in SCons version 2.5.1, and the code there looks identical, so I
> suspect that has the same behavior.
>
>
>
> Thanks,
>
> Don
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
>
> _______________________________________________
> 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/20180301/47a9555e/attachment.html>


More information about the Scons-users mailing list