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

Managan, Rob managan1 at llnl.gov
Thu Aug 23 18:39:26 EDT 2012


Not sure about this but in my Sconstruct files I would have used
SConscript('src/SConscript')




*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Rob Managan email managan at llnl.gov
LLNL phone: 925-423-0903
P.O. Box 808, L-095 FAX: 925-422-3389
Livermore, CA 94551-0808





On 8/23/12 1:21 PM, "ethan09" <ethanwwei at gmail.com> wrote:


>I have a tree like this and want to do an out-of-tree build, but

>getting the error "Source directory cannot be under variant directory"

>that confuses me: my source dir is homedir/src/proj/src, while my

>variant_dir is homedir/tmp/, that doesn't seem to be the case.

>

>Similar problems include:

>http://scons.tigris.org/ds/viewMessage.do?dsForumId=1268&dsMessageId=26388

>63

>but in that case scons did not complain. According to the original

>poster, the manpage says something "variant_dir may not be underneath

>src_dir ", which is understandable. Your help is highly appreciated.

>

>src/proj

> |- SConstruct

> \-src

> |- foo.in

> \-SConscript

>

>$ pwd

>/home/users/<myid>/src/proj

>

>$ cat SConstruct

>import os

>vdir = os.getcwdu()

>VariantDir(vdir, 'src')

>SConscript(vdie + '/SConscript')

>

>$ cat src/SConscript

>env = Enviroment()

>env.Command('foo.out', 'foo.in', "cp $SOURCE $TARGET")

>

>Now I want to build in an empty variant directory:

>

>$ cd /home/users/<myid>/tmp/ # an empty directory

>$ scons -f ../src/proj/SConstruct

>scons: Reading SConscript files ...

>

>scons: *** Source directory cannot be under variant directory.

>File "/home/users/<myid>/src/proj/SConstruct", line 3, in <module>

>

>Thanks,

>EW

>_______________________________________________

>Scons-users mailing list

>Scons-users at scons.org

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




More information about the Scons-users mailing list