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

Bill Deegan bill at baddogconsulting.com
Fri Mar 25 13:44:59 EDT 2022


(Insert standard ask.. ;)
Any chance you can make a small reproducer?

On Fri, Mar 25, 2022 at 10:14 AM daggs <daggs at gmx.com> wrote:

>
>
> > Sent: Friday, March 25, 2022 at 8:02 PM
> > From: "Mats Wichmann" <mats at wichmann.us>
> > To: "daggs" <daggs at gmx.com>
> > Cc: "SCons users mailing list" <scons-users at scons.org>
> > Subject: Re: [Scons-users] finding out which env causes this error: Two
> different environments were specified for target
> >
> > On 3/25/22 09:40, daggs wrote:
> > >
> > >
> > >> Sent: Friday, March 25, 2022 at 6:26 PM
> > >> From: "Mats Wichmann" <mats at wichmann.us>
> > >> To: "daggs" <daggs at gmx.com>
> > >> Cc: "SCons users mailing list" <scons-users at scons.org>
> > >> Subject: Re: [Scons-users] finding out which env causes this error:
> Two different environments were specified for target
> > >>
> > >> On 3/25/22 09:23, daggs wrote:
> > >>
> > >>> I do something like this:
> > >>> for folder in [ a, b, c ]:
> > >>>     for modes in [ y. z ]:
> > >>>         export('mode')
> > >>>         sconscript("src/" + folder + "/SConscript", variant_dir =
> "out/" + folder + "." + mode, duplicate = 0. export('env'))
> > >>>
> > >>> the issue occurs when I define InstallAs in folder b
> > >>> if I remove it and add prints to the targets, I see them all ok.
> > >>
> > >> And what target is defined by the InstallAs call?
> > >>
> > >>
> > >
> > > "tgt/" + folder + "." + mode + "/" + bin where bin differs for each
> folder
> >
> > Okay, you're saying that you've commented out the InstallAs calls and it
> > works, but you've printed what the targets would have been for those and
> > they look suitably unique?  Or is my reparsing of the comment from your
> > earlier message wrong?
> >
> > If so, it seems you've proven where the problem comes from (InstallAs)
> > and maybe SCons is interpreting that path differently than the pure
> > Python string comes out?
> >
>
> I'll try to make it clearer, as I pre define the targets, I can print them.
> when I run scons in dry run mode for targets a.y and a.z, I see the dep
> tree properly. it has a installAs call.
> when I do the same for b.z and b.y with the installAs call, I get two envs
> error with b.y.
> if I remove the installAs in b and prints the targets, I see no problems
> in the installAs target dst.
>
> Dagg.
> _______________________________________________
> 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/20220325/6b2a940b/attachment.htm>


More information about the Scons-users mailing list