[Scons-users] Tracing the loading of SConscript files

Bill Deegan bill at baddogconsulting.com
Wed Dec 23 14:23:16 EST 2015


Oh.. you're not using variant_dir in your SConscript calls?

On Wed, Dec 23, 2015 at 10:37 AM, Stefan Seefeld <stefan at seefeld.name>
wrote:

> On 23.12.2015 12:56, Bill Deegan wrote:
> > Stefen,
>
> Bill,
>
> thanks for the quick reply !
>
> >
> > First I'd try --debug=stacktrace
> > See if that yields you anything.
>
> That shows me where the error was raised, and allowed me to inject print
> statements into the FS.VariantDir() method (as well as my SConscript
> files).
> Now, when I run `scons -n` I see:
>
> scons: Reading SConscript files ...
> invoking VariantDir(src_dir=".",
> variant_dir=#/bin.SCons/libs/release/dynamic/threading-multi,
> duplicate=False
> VariantDir(variant-dir=threading-multi, source_dir=boost.python)
> invoking VariantDir(src_dir=./build, variant_dir=./src, duplicate=False
> VariantDir(variant-dir=src, source_dir=build)
> Checking for C header file Python.h... (cached) yes
> invoking VariantDir(src_dir=".",
> variant_dir=#/bin.SCons/libs/release/static/threading-multi,
> duplicate=False
> VariantDir(variant-dir=threading-multi, source_dir=boost.python)
> invoking VariantDir(src_dir=./build, variant_dir=./src, duplicate=False
> VariantDir(variant-dir=src, source_dir=build)
> scons: done reading SConscript files.
> ...
>
> However, when I run `scons --test -n` I get:
>
> scons: Reading SConscript files ...
> invoking VariantDir(src_dir=".",
> variant_dir=#/bin.SCons/libs/release/dynamic/threading-multi,
> duplicate=False
> VariantDir(variant-dir=threading-multi, source_dir=boost.python)
> invoking VariantDir(src_dir=./build, variant_dir=./src, duplicate=False
> VariantDir(variant-dir=src, source_dir=build)
> Checking for C header file Python.h... (cached) yes
> invoking VariantDir(src_dir=".",
> variant_dir=#/bin.SCons/libs/release/static/threading-multi,
> duplicate=False
> VariantDir(variant-dir=threading-multi, source_dir=.)
>
> scons: *** Source directory cannot be under variant directory.
>
> Notice the "source_dir=." in the last VariantDir invocation, which
> differs from the equivalent call of `scons -n` above (i.e., without
> --test`.
> There is an additional SConscript file that's loaded with --test, and I
> verified that if I don't read that (i.e., invoke 'Return()' above
> everything else), I don't get the error. This suggests that somehow the
> content of that SConscript file might have corrupted the internal state
> of the build system, and I need to figure out what. (That SConscript
> file is here:
> https://github.com/stefanseefeld/boost.python/blob/scons/test/SConscript)
>
> >
> > Can you provide a simple set of SConstruct/SConscripts which
> > reproduces this?
>
> I may try to reduce the problem to something manageable. For now I have
> checked in the full set of build scripts into my boost.python repo (the
> "scons" branch), which you can find (and clone) here:
> https://github.com/stefanseefeld/boost.python/tree/scons
>
> And a related question: What is the exact semantic of the 'VariantDir'
> function ? I understand the general purpose, but I'm not sure what it
> specifically does, in particular if I invoke it multiple times one after
> another. Is the effect accumulated (say, the variant_dir values are
> concatenated) ? Or does the second override the former ?
>
> Thanks,
>         Stefan
>
> --
>
>       ...ich hab' noch einen Koffer in Berlin...
>
> _______________________________________________
> 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/20151223/8f804d7f/attachment-0001.html>


More information about the Scons-users mailing list