[Scons-users] Build fails due to MissingConfiguration error

Simon White squareyes99 at googlemail.com
Thu Sep 21 18:55:32 EDT 2023


Hi all, sending an email to this list before raising an issue on github as
advised by the docs.

I just tried to build the Godot engine by following their instructions:
https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_windows.html
https://docs.godotengine.org/en/stable/contributing/development/configuring_an_ide/visual_studio.html

In my cmd window I ran these commands from the Godot directory as
instructed (also enabled more debug info):
set SCONS_MSCOMMON_DEBUG=-
set env=Environment(MSVC_VERSION='14.2',TARGET_ARCH='x86_64')
scons platform=windows vsproj=yes dev_build=yes

But the build would always fail at this step:

debug: 04283ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 14.2
debug: 04284ms:MSCommon/vc.py:find_vc_pdir_vswhere#677: VSWHERE: C:\Program
Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
debug: 04284ms:MSCommon/vc.py:find_vc_pdir_vswhere#682: running:
['C:\\Program Files (x86)\\Microsoft Visual
Studio\\Installer\\vswhere.exe', '-version', '[16.0, 17.0)', '-property',
'installationPath']
debug: 04307ms:MSCommon/vc.py:find_vc_pdir#739: VC found: '14.2'
debug: 04307ms:MSCommon/vs.py:find_vs_dir#101: found VS in C:\Program Files
(x86)\Microsoft Visual Studio\2019\Community
debug: 04307ms:MSCommon/vs.py:get_executable#131: not in cache:C:\Program
Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.com
debug: 04308ms:MSCommon/vs.py:get_installed_visual_studios#437: found VS
14.2
debug: 04308ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 14.1
debug: 04308ms:MSCommon/vc.py:find_vc_pdir_vswhere#677: VSWHERE: C:\Program
Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
debug: 04309ms:MSCommon/vc.py:find_vc_pdir_vswhere#682: running:
['C:\\Program Files (x86)\\Microsoft Visual
Studio\\Installer\\vswhere.exe', '-version', '[15.0, 16.0)', '-property',
'installationPath']
debug: 04333ms:MSCommon/vc.py:find_vc_pdir#739: VC found: '14.1'
debug: 04333ms:MSCommon/vs.py:find_vs_dir#101: found VS in C:\Program Files
(x86)\Microsoft Visual Studio\2017\Community
debug: 04334ms:MSCommon/vs.py:get_executable#131: not in cache:C:\Program
Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.com
debug: 04334ms:MSCommon/vs.py:get_installed_visual_studios#437: found VS
14.1
debug: 04334ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 14.1Exp
debug: 04335ms:MSCommon/vc.py:find_vc_pdir_vswhere#677: VSWHERE: C:\Program
Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
debug: 04335ms:MSCommon/vc.py:find_vc_pdir_vswhere#682: running:
['C:\\Program Files (x86)\\Microsoft Visual
Studio\\Installer\\vswhere.exe', '-version', '[15.0, 16.0)', '-property',
'installationPath']
debug: 04359ms:MSCommon/vc.py:find_vc_pdir#739: VC found: '14.1'
debug: 04359ms:MSCommon/vs.py:find_vs_dir#101: found VS in C:\Program Files
(x86)\Microsoft Visual Studio\2017\Community
debug: 04360ms:MSCommon/vs.py:find_executable#112: C:\Program Files
(x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\WDExpress.exe not
on file system
debug: 04361ms:MSCommon/vs.py:get_executable#131: not in cache:None
debug: 04361ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 14.0
debug: 04362ms:MSCommon/vs.py:find_vs_dir_by_reg#87: no VS registry key
'Software\\Wow6432Node\\Microsoft\\VisualStudio\\14.0\\Setup\\VS\\ProductDir'
debug: 04362ms:MSCommon/vc.py:find_vc_pdir#753: no VC registry key
'Microsoft\\VisualStudio\\14.0\\Setup\\VC\\ProductDir'
debug: 04362ms:MSCommon/vs.py:find_vs_dir_by_vc#71: no installed VC 14.0
debug: 04362ms:MSCommon/vs.py:find_vs_dir#101: found VS in None
debug: 04363ms:MSCommon/vs.py:find_executable#107: no vs_dir (None)
debug: 04363ms:MSCommon/vs.py:get_executable#131: not in cache:None
debug: 04363ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 14.0Exp
debug: 04364ms:MSCommon/vs.py:find_vs_dir_by_reg#87: no VS registry key
'Software\\Wow6432Node\\Microsoft\\VisualStudio\\14.0\\Setup\\VS\\ProductDir'
debug: 04364ms:MSCommon/vc.py:find_vc_pdir#753: no VC registry key
'Microsoft\\VisualStudio\\14.0\\Setup\\VC\\ProductDir'
debug: 04364ms:MSCommon/vs.py:find_vs_dir_by_vc#71: no installed VC 14.0
debug: 04365ms:MSCommon/vs.py:find_vs_dir#101: found VS in None
debug: 04365ms:MSCommon/vs.py:find_executable#107: no vs_dir (None)
debug: 04365ms:MSCommon/vs.py:get_executable#131: not in cache:None
debug: 04366ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 12.0
debug: 04366ms:MSCommon/vs.py:find_vs_dir_by_reg#87: no VS registry key
'Software\\Wow6432Node\\Microsoft\\VisualStudio\\12.0\\Setup\\VS\\ProductDir'
debug: 04366ms:MSCommon/vc.py:find_vc_pdir#753: no VC registry key
'Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir'
debug: 04367ms:MSCommon/vs.py:find_vs_dir_by_vc#71: no installed VC 12.0
debug: 04367ms:MSCommon/vs.py:find_vs_dir#101: found VS in None
debug: 04367ms:MSCommon/vs.py:find_executable#107: no vs_dir (None)
debug: 04367ms:MSCommon/vs.py:get_executable#131: not in cache:None
debug: 04368ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 12.0Exp
debug: 04368ms:MSCommon/vs.py:find_vs_dir_by_reg#87: no VS registry key
'Software\\Wow6432Node\\Microsoft\\VisualStudio\\12.0\\Setup\\VS\\ProductDir'
debug: 04369ms:MSCommon/vc.py:find_vc_pdir#753: no VC registry key
'Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir'
debug: 04369ms:MSCommon/vs.py:find_vs_dir_by_vc#71: no installed VC 12.0
debug: 04369ms:MSCommon/vs.py:find_vs_dir#101: found VS in None
debug: 04370ms:MSCommon/vs.py:find_executable#107: no vs_dir (None)
debug: 04370ms:MSCommon/vs.py:get_executable#131: not in cache:None
debug: 04370ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 11.0
debug: 04371ms:MSCommon/vs.py:find_vs_dir_by_reg#87: no VS registry key
'Software\\Wow6432Node\\Microsoft\\VisualStudio\\11.0\\Setup\\VS\\ProductDir'
debug: 04371ms:MSCommon/vc.py:find_vc_pdir#753: no VC registry key
'Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir'
debug: 04371ms:MSCommon/vs.py:find_vs_dir_by_vc#71: no installed VC 11.0
debug: 04372ms:MSCommon/vs.py:find_vs_dir#101: found VS in None
debug: 04372ms:MSCommon/vs.py:find_executable#107: no vs_dir (None)
debug: 04372ms:MSCommon/vs.py:get_executable#131: not in cache:None
debug: 04373ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 11.0Exp
debug: 04373ms:MSCommon/vs.py:find_vs_dir_by_reg#87: no VS registry key
'Software\\Wow6432Node\\Microsoft\\VisualStudio\\11.0\\Setup\\VS\\ProductDir'
debug: 04373ms:MSCommon/vc.py:find_vc_pdir#753: no VC registry key
'Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir'
debug: 04374ms:MSCommon/vs.py:find_vs_dir_by_vc#71: no installed VC 11.0
debug: 04374ms:MSCommon/vs.py:find_vs_dir#101: found VS in None
debug: 04374ms:MSCommon/vs.py:find_executable#107: no vs_dir (None)
debug: 04375ms:MSCommon/vs.py:get_executable#131: not in cache:None
debug: 04375ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 10.0
debug: 04375ms:MSCommon/vs.py:find_vs_dir_by_reg#89: found VS in registry:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\
debug: 04376ms:MSCommon/vs.py:find_vs_dir#101: found VS in C:\Program Files
(x86)\Microsoft Visual Studio 10.0\
debug: 04378ms:MSCommon/vs.py:find_executable#112: C:\Program Files
(x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com not on file system
debug: 04379ms:MSCommon/vs.py:get_executable#131: not in cache:None
debug: 04379ms:MSCommon/vs.py:get_installed_visual_studios#435: trying to
find VS 10.0Exp
debug: 04379ms:MSCommon/vs.py:find_vs_dir_by_reg#87: no VS registry key
'Software\\Wow6432Node\\Microsoft\\VCExpress\\10.0\\Setup\\VS\\ProductDir'
debug: 04380ms:MSCommon/vc.py:find_vc_pdir#758: found VC in registry:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
debug: 04380ms:MSCommon/vc.py:find_vc_pdir#762: reg says dir is C:\Program
Files (x86)\Microsoft Visual Studio 10.0\VC\, but it does not exist.
(ignoring)
MissingConfiguration: registry dir C:\Program Files (x86)\Microsoft Visual
Studio 10.0\VC\ not found on the filesystem:
  File "D:\My DSC\temporary pics\godot\SConstruct", line 569:
    detect.configure(env)
  File "D:\My DSC\temporary pics\godot\./platform/windows\detect.py", line
648:
    setup_msvc_auto(env)
  File "D:\My DSC\temporary pics\godot\./platform/windows\detect.py", line
292:
    env.Tool("mssdk")  # we want the MS SDK
  File "F:\ProgramFiles\Python311\Lib\site-packages\SCons\Environment.py",
line 2033:
    tool(self)
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\__init__.py", line
265:
    self.generate(env, *args, **kw)
  File "F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\mssdk.py",
line 41:
    mssdk_setup_env(env)
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\MSCommon\sdk.py",
line 376:
    msvs = vs.get_vs_by_version(msvs_version)
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\MSCommon\vs.py",
line 498:
    get_installed_visual_studios()
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\MSCommon\vs.py",
line 436:
    if vs.get_executable(env):
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\MSCommon\vs.py",
line 129:
    executable = self.find_executable(env)
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\MSCommon\vs.py",
line 105:
    vs_dir = self.get_vs_dir(env)
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\MSCommon\vs.py",
line 138:
    vs_dir = self.find_vs_dir(env)
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\MSCommon\vs.py",
line 100:
    vs_dir = self.find_vs_dir_by_vc(env)
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\MSCommon\vs.py",
line 69:
    dir = SCons.Tool.MSCommon.vc.find_vc_pdir(env, self.vc_version)
  File
"F:\ProgramFiles\Python311\Lib\site-packages\SCons\Tool\MSCommon\vc.py",
line 763:
    raise MissingConfiguration("registry dir {} not found on the
filesystem".format(comps))

SCons tries to find all existing installations of VC, and for most of the
ones it can't find it (correctly) moves on, but for some reason when
finding VC 10.0 it returns the  MissingConfiguration error.

I was able to fix this by removing the line raising the error and instead
returning None, in the function find_vc_pdir in vc.py

debug('reg says dir is %s, but it does not exist. (ignoring)', comps)
return None
#raise MissingConfiguration("registry dir {} not found on the
filesystem".format(comps))

My build then completed successfully. I guess this must be a bug in SCons,
because the attempt to find the missing VC 10.0 installation *should *return
the same as the attempts to find the other missing VC installations.

Si.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20230921/eaac8c1f/attachment-0001.htm>


More information about the Scons-users mailing list