[Scons-users] scons-local-2.5.1 build and clean shows random failure

Mats Wichmann mats at wichmann.us
Tue Jul 25 19:34:09 EDT 2017


On 07/25/2017 04:39 PM, Bill Deegan wrote:
> Yes.. You created dependency cycle..
> But only after a build.
> Thus why it's showing up only on clean...
> 
> Once you build you have output/linux64_build
> Then you say map . to output/linux_64build  which ends up with a virtual
> subdirectory via variantdir of output/linux64_build/output/linux_64...
> 
> see the issue.
> 
> Variantdirs should never have parent/child relationships.
> 
> I'd advice instead of using VariantDir(), use variant_dir in your
> SConscript call to map like this:
> 
> SConscript('src/SConscript',variant_dir='output/linux64_build/src')

I haven't followed this too closely, but this piques my interest. I have
a dependency cycle problem - with a particular set of options.  Our
project has too many ways to build, I'm hammering away at that problem;
it means there are some rarely-exercised paths through the sconscripts.
And it means I still don't have enough evidence to narrow down precisely
where we're causing the problem. Ordinary scenarios work just fine.

Our Variant dir setup looks like this, in a function called with an
argument of 'dir':

    build_dir = dir + '/out/' + target_os + '/'
    ... some stuff specific to one target ...
    build_dir = build_dir + target_arch
    if env.get('RELEASE'):
        build_dir = build_dir + '/release/'
    else:
        build_dir = build_dir + '/debug/'
    env.VariantDir(build_dir, dir, duplicate=0)

where the value passed as 'dir' comes from:

    env.GetLaunchDir()

Is that likely to be triggering this "Variantdirs should never have
parent/child relationships" issue?  Kind of looks like it to me.






More information about the Scons-users mailing list