[Scons-users] finding out which env causes this error: Two different environments were specified for target

Mats Wichmann mats at wichmann.us
Fri Mar 25 11:03:42 EDT 2022


On 3/25/22 08:52, daggs wrote:
> Greetings,
> 
> is there any way to know which two envs are responsible to the error mentioned on the subject?

At the moment there's no helpful option or other debug aid which spits
that out (and there should be).

Usually it's a mistake in variant dir usage that causes it, which
probably won't surprise you since based on earlier email that's what you
were working on.

Look for places where you might be forcing a path. If the variant dirs
get to operate naturally you'll have, say, build/a/foo and build/b/foo -
different paths for foo target, so those will be considered different
targets and not trigger the error; if you do something clever with paths
they may end up resolving to the same thing and then scons throws up its
hands and gives up.


More information about the Scons-users mailing list