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

Don Baldwin donb at qti.qualcomm.com
Wed Feb 28 18:50:25 EST 2018


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<mailto: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<mailto: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/20180228/a459846b/attachment-0001.html>


More information about the Scons-users mailing list