Discussion:
[Scons-users] default toolchain in Scons breaking on windows
Jason Kenny
2018-02-20 16:52:31 UTC
Permalink
Hi Bill,

I have a question for some advice on how to address an issue.

As I am taking time again to fix up Parts. I have an issue open https://bitbucket.org/sconsparts/parts/issues/24/parts-fails-to-build-on-windows-if-msvc-is

The issue here is that when starting SCons, logic to load the "default" environment happens before the SConstruct is read in. This on windows will try to load the "default" tool on windows which always tries to load MSVC. The tools in Parts I have do not have this issue, however, I have no way to tell SCons about this as the SConstruct is where I get imported. Honestly, there really is not any good way I know of to affect the load logic for the tools in SCons before it loads the SConsstruct.

Do you have any thoughts on this?

Jason
Bill Deegan
2018-02-20 17:06:38 UTC
Permalink
Try:

DefaultEnvironment(tools=[]) at top of SConstruct.



On Tue, Feb 20, 2018 at 11:52 AM, Jason Kenny <***@live.com> wrote:

> Hi Bill,
>
> I have a question for some advice on how to address an issue.
>
> As I am taking time again to fix up Parts. I have an issue open
> https://bitbucket.org/sconsparts/parts/issues/24/parts-fails-to-build-on-
> windows-if-msvc-is
>
> The issue here is that when starting SCons, logic to load the "default"
> environment happens before the SConstruct is read in. This on windows will
> try to load the "default" tool on windows which always tries to load MSVC.
> The tools in Parts I have do not have this issue, however, I have no way to
> tell SCons about this as the SConstruct is where I get imported. Honestly,
> there really is not any good way I know of to affect the load logic for the
> tools in SCons before it loads the SConsstruct.
>
> Do you have any thoughts on this?
>
> Jason
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
Jason Kenny
2018-02-20 19:34:57 UTC
Permalink
That worked.

Jason
________________________________
From: Scons-users <scons-users-***@scons.org> on behalf of Bill Deegan <***@baddogconsulting.com>
Sent: Tuesday, February 20, 2018 11:06 AM
To: SCons users mailing list
Subject: Re: [Scons-users] default toolchain in Scons breaking on windows

Try:

DefaultEnvironment(tools=[]) at top of SConstruct.



On Tue, Feb 20, 2018 at 11:52 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi Bill,

I have a question for some advice on how to address an issue.

As I am taking time again to fix up Parts. I have an issue open https://bitbucket.org/sconsparts/parts/issues/24/parts-fails-to-build-on-windows-if-msvc-is<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsconsparts%2Fparts%2Fissues%2F24%2Fparts-fails-to-build-on-windows-if-msvc-is&data=02%7C01%7C%7C5e60f83306b34c2ffe5308d578845263%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636547432060019739&sdata=S6v%2BVe44lvlwK2%2FRyfosNkBXQh3Du8nVKyvowN3rn5g%3D&reserved=0>

The issue here is that when starting SCons, logic to load the "default" environment happens before the SConstruct is read in. This on windows will try to load the "default" tool on windows which always tries to load MSVC. The tools in Parts I have do not have this issue, however, I have no way to tell SCons about this as the SConstruct is where I get imported. Honestly, there really is not any good way I know of to affect the load logic for the tools in SCons before it loads the SConsstruct.

Do you have any thoughts on this?

Jason
Bill Deegan
2018-02-20 20:04:29 UTC
Permalink
Note.. that should also reduce some startup time.
Especially if you're never using any of the builders without an
environment..

On Tue, Feb 20, 2018 at 2:34 PM, Jason Kenny <***@live.com> wrote:

> That worked.
>
> Jason
> ------------------------------
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Tuesday, February 20, 2018 11:06 AM
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] default toolchain in Scons breaking on
> windows
>
> Try:
>
> DefaultEnvironment(tools=[]) at top of SConstruct.
>
>
>
> On Tue, Feb 20, 2018 at 11:52 AM, Jason Kenny <***@live.com> wrote:
>
> Hi Bill,
>
> I have a question for some advice on how to address an issue.
>
> As I am taking time again to fix up Parts. I have an issue open
> https://bitbucket.org/sconsparts/parts/issues/24/parts-
> fails-to-build-on-windows-if-msvc-is
> <https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsconsparts%2Fparts%2Fissues%2F24%2Fparts-fails-to-build-on-windows-if-msvc-is&data=02%7C01%7C%7C5e60f83306b34c2ffe5308d578845263%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636547432060019739&sdata=S6v%2BVe44lvlwK2%2FRyfosNkBXQh3Du8nVKyvowN3rn5g%3D&reserved=0>
>
>
> The issue here is that when starting SCons, logic to load the "default"
> environment happens before the SConstruct is read in. This on windows will
> try to load the "default" tool on windows which always tries to load MSVC.
> The tools in Parts I have do not have this issue, however, I have no way to
> tell SCons about this as the SConstruct is where I get imported. Honestly,
> there really is not any good way I know of to affect the load logic for the
> tools in SCons before it loads the SConsstruct.
>
> Do you have any thoughts on this?
>
> Jason
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C5e60f83306b34c2ffe5308d578845263%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636547432060019739&sdata=5ezdqkNjcDBeTEMxl%2F6qwyNaP7opoATTGiyTkx7J%2FNE%3D&reserved=0>
>
>
>
Jason Kenny
2018-02-20 20:26:05 UTC
Permalink
It does speed up stuff a little. I honestly thought I tried this years ago and it did not work. I have Parts calling this logic at startup now.
This is great as Parts allows toolchains to be defined on the command line. This avoids the previously previous behavior of having to load the SCons toolchain once before Parts would get it turn to define the tools needed for the build.

Jason
________________________________
From: Bill Deegan <***@baddogconsulting.com>
Sent: Tuesday, February 20, 2018 2:04 PM
To: Jason Kenny
Cc: SCons users mailing list
Subject: Re: [Scons-users] default toolchain in Scons breaking on windows

Note.. that should also reduce some startup time.
Especially if you're never using any of the builders without an environment..

On Tue, Feb 20, 2018 at 2:34 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
That worked.

Jason
________________________________
From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Tuesday, February 20, 2018 11:06 AM
To: SCons users mailing list
Subject: Re: [Scons-users] default toolchain in Scons breaking on windows

Try:

DefaultEnvironment(tools=[]) at top of SConstruct.



On Tue, Feb 20, 2018 at 11:52 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi Bill,

I have a question for some advice on how to address an issue.

As I am taking time again to fix up Parts. I have an issue open https://bitbucket.org/sconsparts/parts/issues/24/parts-fails-to-build-on-windows-if-msvc-is<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsconsparts%2Fparts%2Fissues%2F24%2Fparts-fails-to-build-on-windows-if-msvc-is&data=02%7C01%7C%7C5e60f83306b34c2ffe5308d578845263%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636547432060019739&sdata=S6v%2BVe44lvlwK2%2FRyfosNkBXQh3Du8nVKyvowN3rn5g%3D&reserved=0>

The issue here is that when starting SCons, logic to load the "default" environment happens before the SConstruct is read in. This on windows will try to load the "default" tool on windows which always tries to load MSVC. The tools in Parts I have do not have this issue, however, I have no way to tell SCons about this as the SConstruct is where I get imported. Honestly, there really is not any good way I know of to affect the load logic for the tools in SCons before it loads the SConsstruct.

Do you have any thoughts on this?

Jason
Loading...