[Scons-users] Problems with env.Install()

William Deegan bill at baddogconsulting.com
Sun Jan 27 18:19:39 EST 2013


Michel,

On Jan 27, 2013, at 9:22 AM, Michel Lestrade <michel.lestrade at crosslight.com> wrote:


> Bill,

>

>> I think it's an issue that you're mixing variant_dir with non-variant_dir SConscripts in the same directory and specifying duplicate=0.

>>

>> esmumps = SConscript(dirs = 'esmumps', duplicate=0,

>> exports = {'env':env.Clone(LIBS=[libscotch,libscotcherrexit,env['LIBS']]),'mpi':0})

>> SConscript(dirs = 'scotch', duplicate=0,

>> exports = {'env':env.Clone(LIBS=[libscotch,libscotcherrexit,env['LIBS']]),'mpi':0})

>>

>> And then:

>> ptesmumps = SConscript(dirs = 'esmumps', variant_dir = 'ptesmumps', duplicate=0,

>> exports = {'env':pt.Clone(LIBS=[libscotch,libscotcherrexit,libptscotch,pt['LIBS']]),'mpi':1})

>> SConscript(dirs = 'scotch', variant_dir = 'ptscotch', duplicate=0,

>> exports = {'env':pt.Clone(LIBS=[libscotch,libscotcherrexit,libptscotch,pt['LIBS']]),'mpi':1})

>>

>> It'll see the pthread.dll in the non-variant dir build, and so it won't run the install again, and since you specify duplicate=0, it won't copy it to the variant dir.

>>

>>

> You were absolutely correct. Giving a dummy variant_dir name instead of leaving it blank solves the problem. I guess I have a lot to learn about the proper use of variant_dir.


That's good news.
I thought it was interesting that the # of variant/no-variant dirs mapped to the missing dll's.
That's what lead me to the suggestion.

variant_dir's can be tricky to get right, but are quite useful in building variants and also, making sure that you don't build any build products in the same directories as your source so you can simply delete the variant dir and start from scratch.

Having a variant dir = the source dir doesn't provide much utility ( at least with the goal of separating sources from outputs,etc).

Glad we were able to resolve at this one.

-Bill



More information about the Scons-users mailing list