[Scons-dev] This morning's WTF moment

Gary Oberbrunner garyo at oberbrunner.com
Sat Sep 6 07:59:41 EDT 2014


On Sat, Sep 6, 2014 at 7:34 AM, anatoly techtonik <techtonik at gmail.com>
wrote:

> On Sat, Sep 6, 2014 at 1:10 PM, Gary Oberbrunner <garyo at oberbrunner.com>
> wrote:
> > On Sat, Sep 6, 2014 at 5:42 AM, Russel Winder <russel at winder.org.uk>
> wrote:
> >>
> >> scons: warning: No version of Visual Studio compiler found – C/C++
> >> compilers most likely not set correctly
> >> File … engine\SCons\Script\Main.py", line 602, in
> >> _scons_internal_warning
> >
> >
> > Yes, known problem.  The right solution is the toolchain revamp.  A less
> > invasive solution is surprisingly hard to find, though Anatoly has a
> > possible idea.
> > If you initialize your Environment with only the tools of interest, you
> > won't see that warning.
>
> The problem repeats on all Windows systems with SCons 2.3.x and
> below.
>
> Well, "revamp" is the name, but not the action. It is actually a trap,
> because it is not actionable.


I disagree.  I am currently taking action on it.  There is some
documentation on the wiki describing my direction, and I'm writing some
test code to explore further.


> My attempt to fix the issue uncovered
> more complex stuff. The actual thread is here:
>
> https://bitbucket.org/scons/scons/pull-request/169/once-more-suppress-warning-about-missing/diff
>
> I wish I could summarize the problem, but it is very elusive, but over
> the last week the idea had ripen into a concept of making tool lookup
> logic cross-platform. Right now it is plarform-dependent and rules are
> not clear.
>
> complexity#001 - FAQ
>
> http://www.scons.org/wiki/FrequentlyAskedQuestions#Why_doesn.27t_SCons_find_my_compiler.2BAC8-linker.2BAC8-etc..3F_I_can_execute_it_just_fine_from_the_command_line
> .
> Q: "Why doesn't SCons find my compiler/linker/etc.? ..."
> A: env = Environment(ENV = {'PATH' : os.environ['PATH']})
>
> But dammit, the most simple SConstruct Program('hello.c') works on
> Linux with GCC, and I believe it should work on Windows with MSVC
> too. So, default tools are obviously an exception from this rule.
>

It does work on Windows with MSVC (as long as the MSVC version is supported
by SCons, installed correctly, etc.).  The problem we're discussing here is
that a SConscript that _doesn't_ use Program() gets warnings if MSVC is not
installed.


>
> complexity#002 - How default tools work?
> SCons is somehow able to find default GCC or default MSVC without
> env/PATH patch. But when MSVC is unavailable on Windows, SCons
> doesn't fallback to GCC even if GCC is in PATH. Why?
>

Because the current "tool chain" logic doesn't support that.  It's one of
the major goals of my revamp to have fallback tools.  See the wiki page.

>
> This should be described before moving further and before I can
> support any talks about revamp.


Sorry if you don't support it, but I'm making progress nonetheless. :-)

-- 
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20140906/a89ca3a6/attachment.html>


More information about the Scons-dev mailing list