[Scons-users] Re-2: GCC not found Error SCONS 3.1.2

Mats Wichmann mats at wichmann.us
Fri Mar 13 13:18:07 EDT 2020


On 3/12/20 8:50 AM, Paul Rötzer wrote:
> Hi Bill,
>  
> this is the function with scons 3.0.0:
> 
> def find(env):
>     # First search in the SCons path
>     path=env.WhereIs(key_program)
>     if (path):
>         return path
>     # then the OS path:
>     path=SCons.Util.WhereIs(key_program)
>     if (path):
>         return path
> 
>     # If that doesn't work try default location for mingw
>     save_path=env['ENV']['PATH']
>     env.AppendENVPath('PATH',r'c:\MinGW\bin')
>     path =env.WhereIs(key_program)
>     if not path:
>         env['ENV']['PATH']=save_path
>     return path
>  
>  
> This find function does not exist in scons 3.1.2 anymore.
> But there exists an array
>  
> mingw_paths = [
>     r'c:\MinGW\bin',
>     r'C:\cygwin64\bin',
>     r'C:\msys64',
>     r'C:\cygwin\bin',
>     r'C:\msys',
> ]
>  
> Still can't find gcc with the 3.1.2 version.

well, obviously that "shouldn't fail" since the same pathname component
is present in both versions.

There's now a mingw platform module - don't know if that existed in
3.0.0, would have to do some prospecting.  It defines
MINGW_DEFAULT_PATHS, which is a lot shorter than mingw_paths in the tool
module.  I wonder if that's in play somehow?

if sys.platform == 'win32':
    MINGW_DEFAULT_PATHS = [
        r'C:\msys64',
        r'C:\msys'
    ]





More information about the Scons-users mailing list