SCons can't locate any tools

半腔热情 提交于 2019-12-25 07:49:54

问题


I was previously able to build this project with SCons, using the toolset from VS2013 CE.
Between then and now, all I have done is install then uninstall TDM-GCC, msys and MinGW.

Following that, whenever I try to run SCons, I receive this error:

D:\Projects>cd xsngine/src

D:\Projects\xsngine\src>scons -Q
The system cannot find the path specified.
IOError: The system cannot find the path specified.
:
  File "D:\Projects\xsngine\src\SConstruct", line 68:
    env = Environment( TARGET_ARCH = arch )
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Environment.py", line 1003:
    apply_tools(self, tools, toolpath)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Environment.py", line 107:
    env.Tool(tool)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Environment.py", line 1811:
    tool(self)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Tool\__init__.py", line 183:
    self.generate(env, *args, **kw)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Tool\default.py", line 41:
    SCons.Tool.Tool(t)(env)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Tool\__init__.py", line 183:
    self.generate(env, *args, **kw)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Tool\mslink.py", line 303:
    msvc_setup_env_once(env)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Tool\MSCommon\vc.py", line 374:
    msvc_setup_env(env)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Tool\MSCommon\vc.py", line 481:
    d = msvc_find_valid_batch_script(env,version)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Tool\MSCommon\vc.py", line 431:
    d = script_env(vc_script, args=arg)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Tool\MSCommon\vc.py", line 320:
    stdout = common.get_output(script, args)
  File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.4\SCons\Tool\MSCommon\common.py", line 193:
    raise IOError(stderr.decode("mbcs"))

D:\Projects\xsngine\src>echo %PATH%
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Pr
ogram Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\;C:\Program Files (x86)\MSBuild\12.0\bin;C:\Program
Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\V
C\BIN;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\
v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\VCPackages;C:\Program Files (x86)\HTML He
lp Workshop;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools;C:\Program Fil
es (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
\;C:\Python27\;C:\Python27\Scripts\;C:\Python27\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:
\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cm
d;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Visual Leak Detector\bin\Win32;C:\Program Files (x8
6)\Visual Leak Detector\bin\Win64;C:\Program Files (x86)\Lua\5.1;C:\Program Files (x86)\Lua\5.1\clibs;C:\Pr
ogram Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\Microsoft SQL Server\110\Tools\
Binn\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\System32\WindowsPowerShell\v1.0\;C:
\Windows\System32\WindowsPowerShell\v1.0\;C:\Python27;C:\Python27\Scripts;C:\Program Files (x86)\Windows Ki
ts\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\

D:\Projects\xsngine\src>scons --version
SCons by Steven Knight et al.:
        script: v2.3.4, 2014/09/27 12:51:43, by garyo on lubuntu
        engine: v2.3.4, 2014/09/27 12:51:43, by garyo on lubuntu
        engine path: ['C:\\Python27\\Scripts\\..\\Lib\\site-packages\\scons-2.3.4\\SCons']
Copyright (c) 2001 - 2014 The SCons Foundation

D:\Projects\xsngine\src>python --version
Python 2.7.8

D:\Projects\xsngine\src>

I have also tried reinstalling Python + SCons + PyWin32 at various versions and 32/64 bit, but no configuration has worked. I also tried uninstalling then reinstalling VS2013 CE, with no luck.

What could be causing SCons to not detect any tools?
If I print out the variables from that error line, it shows the only available tools are 'default' and None

My SConstruct can be found here

EDIT: Running SCons with SCONS_MSCOMMON_DEBUG set:

DEBUG:root:trying to find VC 12.0
DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
DEBUG:root:found VC 12.0
DEBUG:root:trying to find VC 12.0Exp
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VCExpress\\12.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 12.0Exp
DEBUG:root:trying to find VC 11.0
DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\
DEBUG:root:found VC 11.0
DEBUG:root:trying to find VC 11.0Exp
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VCExpress\\11.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 11.0Exp
DEBUG:root:trying to find VC 10.0
DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
DEBUG:root:found VC 10.0
DEBUG:root:trying to find VC 10.0Exp
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VCExpress\\10.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 10.0Exp
DEBUG:root:trying to find VC 9.0
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 9.0
DEBUG:root:trying to find VC 9.0Exp
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 9.0Exp
DEBUG:root:trying to find VC 8.0
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\8.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 8.0
DEBUG:root:trying to find VC 8.0Exp
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VCExpress\\8.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 8.0Exp
DEBUG:root:trying to find VC 7.1
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 7.1
DEBUG:root:trying to find VC 7.0
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 7.0
DEBUG:root:trying to find VC 6.0
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\6.0\\Setup\\Microsoft Visual C++\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 6.0
DEBUG:root:msvc_setup_env()
DEBUG:root:get_default_version()
DEBUG:root:get_default_version(): msvc_version:None msvs_version:None
DEBUG:root:installed_vcs:['12.0', '11.0', '10.0']
DEBUG:root:msvc_setup_env: using default installed MSVC version '12.0'

DEBUG:root:msvc_setup_env: using specified MSVC version '12.0'

DEBUG:root:vc.py:msvc_find_valid_batch_script()
DEBUG:root:vc.py:get_host_target()
DEBUG:root:vc.py:get_host_target() req_target_platform:x86
DEBUG:root:msvs_find_valid_batch_script(): req_target_platform x86 target_platform:x86
DEBUG:root:msvs_find_valid_batch_script(): host_platform: amd64 try_target_archs:['x86']
DEBUG:root:vc.py:msvc_find_valid_batch_script() trying target_platform:x86
DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
DEBUG:root:vc.py: find_batch_file() pdir:C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
DEBUG:root:sdk.py:get_installed_sdks()
DEBUG:root:MSCommon/sdk.py: trying to find SDK 7.0
DEBUG:root:find_sdk_dir(): checking registry:Software\Microsoft\Microsoft SDKs\Windows\v7.0\InstallationFolder
DEBUG:root:find_sdk_dir(): no SDK registry key 'Software\\Microsoft\\Microsoft SDKs\\Windows\\v7.0\\InstallationFolder'
DEBUG:root:MSCommon/sdk.py: trying to find SDK 6.1
DEBUG:root:find_sdk_dir(): checking registry:Software\Microsoft\Microsoft SDKs\Windows\v6.1\InstallationFolder
DEBUG:root:find_sdk_dir(): no SDK registry key 'Software\\Microsoft\\Microsoft SDKs\\Windows\\v6.1\\InstallationFolder'
DEBUG:root:MSCommon/sdk.py: trying to find SDK 6.0A
DEBUG:root:find_sdk_dir(): checking registry:Software\Microsoft\Microsoft SDKs\Windows\v6.0A\InstallationFolder
DEBUG:root:find_sdk_dir(): no SDK registry key 'Software\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A\\InstallationFolder'
DEBUG:root:MSCommon/sdk.py: trying to find SDK 6.0
DEBUG:root:find_sdk_dir(): checking registry:Software\Microsoft\Microsoft SDKs\Windows\v6.0\InstallationFolder
DEBUG:root:find_sdk_dir(): no SDK registry key 'Software\\Microsoft\\Microsoft SDKs\\Windows\\v6.0\\InstallationFolder'
DEBUG:root:MSCommon/sdk.py: trying to find SDK 2003R2
DEBUG:root:find_sdk_dir(): checking registry:Software\Microsoft\MicrosoftSDK\InstalledSDKS\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1\Install Dir
DEBUG:root:find_sdk_dir(): no SDK registry key 'Software\\Microsoft\\MicrosoftSDK\\InstalledSDKS\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1\\Install Dir'
DEBUG:root:MSCommon/sdk.py: trying to find SDK 2003R1
DEBUG:root:find_sdk_dir(): checking registry:Software\Microsoft\MicrosoftSDK\InstalledSDKS\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3\Install Dir
DEBUG:root:find_sdk_dir(): no SDK registry key 'Software\\Microsoft\\MicrosoftSDK\\InstalledSDKS\\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3\\Install Dir'
DEBUG:root:vc.py:msvc_find_valid_batch_script() vc_script:C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat sdk_script:None
DEBUG:root:vc.py:msvc_find_valid_batch_script() use_script 2 u'C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\vcvarsall.bat', args:x86

DEBUG:root:PATH: C:\Windows\System32
DEBUG:root:Calling 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat x86'

EDIT2: I have since reinstalled Windows, but other people may run into this issue - feel free to answer!

来源:https://stackoverflow.com/questions/30405738/scons-cant-locate-any-tools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!