[Scons-users] Out of tree build getting "Source directory cannot be under variant directory" error

Evan Driscoll driscoll at cs.wisc.edu
Thu Aug 23 16:48:13 EDT 2012


On 08/23/2012 03:43 PM, ethan09 wrote:

> Maybe this is the correct behavior, but I did try print what is

> returned from os.getcwdu() and find it identical my launchdir. I am

> using an old version on Ubuntu:


Hmm, okay. I'm surprised by that, but whatever. I have one other
suggestion of something to try, though I don't know if it'll work:

Try changing
VariantDir(vdir, 'src')
SConscript(vdie + '/SConscript')
to
SConscript(vdie + '/SConscript', variant_dir = vdir)

I've tried using the VariantDir call directly and have had trouble in
the past with it and gave up, though I don't remember what sort of
trouble. Perhaps you'll have more luck with that?

Or it may be that you're correct... I'm not sure how prepared SCons is
to do out-of-tree builds.

Evan



>

> $ scons -v

> SCons by Steven Knight et al.:

> script: v2.0.1.r5134, 2010/08/16 23:02:40, by bdeegan on cooldog

> engine: v2.0.1.r5134, 2010/08/16 23:02:40, by bdeegan on cooldog

>

>> Try GetLaunchDir() instead: "Returns the absolute path name of the

>> directory from which scons was initially invoked. This can be useful

>> when using the -u, -U or -D options, which internally change to the

>> directory in which the SConstruct file is found."

>

> Thanks for the tip on GetLaunchDir() that I previously did not know about.

> However changing os.getcwdu() to GetLaunchDir() didn't help my case.

> The error message remains the same.

> My worry is that SCons regards variant_dirs that is completely

> detached from src_dir, as actually above the src dir.

>

>>

>> Evan

>

> Thanks,

> EW

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 545 bytes
Desc: OpenPGP digital signature
Url : <http://four.pairlist.net/pipermail/scons-users/attachments/20120823/1a44e456/attachment-0001.pgp>


More information about the Scons-users mailing list