-
Type:
Question
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Build
-
None
-
Environment:VS 2019+ Windows Server 2016 + MongoDB master branch 18f95f8 commit
-
None
-
None
-
None
-
None
-
None
-
None
-
None
We (the MSVC ++ team) is trying to use VS2019 to replace VS2017 to automatically build open source projects. When we build MongoDB, it always fails with FileNotFoundError: [WinError 3] The system cannot find the path specified: 'VC
Redist
MSVC':
File "F:\gitP\mongodb\mongo\SConstruct", line 4164:
variant_dir='$BUILD_DIR',
Note: We us vs2017 automatically build, no error.
We use MongoDB master branch 18f95f8 commit. Could you please have a look at this issue? Thanks a lot!
Repro steps:
- git clone -c core.autocrlf=true https://github.com/mongodb/mongo F:\gitP\mongodb\mongo
- Open a VS 2019 x64 command prompt and browse to F:\gitP\mongodb\mongo
- git checkout 18f95f8
- pip3 install -r etc/pip/compile-requirements.txt
- python buildscripts/scons.py all -j4
Acutal result:
##[command] Command #0 (Output in "build.log"): "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.4.5
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
##[debug] Command #0 exited with code [0].
##[command] Command #1 (Output in "build.log"): cd F:\gitP\mongodb\mongo
##[debug] Command #1 exited with code [0].
##[command] Command #2 (Output in "build.log"): python buildscripts/scons.py all -j4 2>&1
scons: Reading SConscript files ...
scons: running with args C:\Python\Python37\python.exe buildscripts/scons.py all -j4
Mkdir("build\scons")
scons version: 3.1.1
python version: 3 7 4 'final' 0
CC is cl
cl found in $PATH at C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\HostX64\x64\cl.EXE
CXX is $CC
$CC was not found in $PATH
$CC resolves to F:\gitP\mongodb\mongo\$CC
Checking whether the C compiler works... yes
Checking whether the C++ compiler works... yes
Checking that the C++ compiler can link a C++ program... yes
Checking if C++ compiler "$CC" is MSVC... yes
Checking if C compiler "cl" is MSVC... yes
Detected a x86_64 processor
Checking if target OS windows is supported by the toolchain... yes
Checking if C compiler is Microsoft Visual Studio 2017 15.9 or newer...yes
Checking if C++ compiler is Microsoft Visual Studio 2017 15.9 or newer...yes
Checking if we are using libstdc++... no
Checking for C++17... yes
Checking for memset_s... no
Checking for C function strnlen()... yes
Checking Windows SDK is 8.1 or newer... yes
Checking if we are on a POSIX system... no
Checking for storage class thread_local yes
Checking for C++14 std::enable_if_t support...yes
Using SSL Provider: windows
Checking for C++ header file execinfo.h... no
Checking for C library pcap... no
Checking for C library wpcap... no
Checking if std::atomic<int64_t> works... yes
Checking if std::atomic<uint64_t> works... yes
Checking if std::atomic<int32_t> works... yes
Checking if std::atomic<uint32_t> works... yes
Checking for extended alignment 64 for concurrency types... yes
Checking for mongoc_get_major_version() in C library mongoc-1.0... no
Checking for C function fallocate()... no
Checking for C function sync_file_range()... no
Checking for C header file x86intrin.h... no
Checking for C header file arm_neon.h... no
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'VC\\Redist
MSVC':
File "F:\gitP\mongodb\mongo\SConstruct", line 4164:
variant_dir='$BUILD_DIR',
File "F:\gitP\mongodb\mongo\src\third_party\scons-3.1.1\scons-local-3.1.1\SCons\Script\SConscript.py", line 605:
return _SConscript(self.fs, *files, **subst_kw)
File "F:\gitP\mongodb\mongo\src\third_party\scons-3.1.1\scons-local-3.1.1\SCons\Script\SConscript.py", line 286:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "F:\gitP\mongodb\mongo\src\SConscript", line 27:
env.SConscript('mongo/SConscript', exports=['env'])
File "F:\gitP\mongodb\mongo\src\third_party\scons-3.1.1\scons-local-3.1.1\SCons\Script\SConscript.py", line 605:
return _SConscript(self.fs, *files, **subst_kw)
File "F:\gitP\mongodb\mongo\src\third_party\scons-3.1.1\scons-local-3.1.1\SCons\Script\SConscript.py", line 286:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "F:\gitP\mongodb\mongo\src\mongo\SConscript", line 50:
'env',
File "F:\gitP\mongodb\mongo\src\third_party\scons-3.1.1\scons-local-3.1.1\SCons\Script\SConscript.py", line 605:
return _SConscript(self.fs, *files, **subst_kw)
File "F:\gitP\mongodb\mongo\src\third_party\scons-3.1.1\scons-local-3.1.1\SCons\Script\SConscript.py", line 286:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "F:\gitP\mongodb\mongo\src\mongo\installer\SConscript", line 12:
'env',
File "F:\gitP\mongodb\mongo\src\third_party\scons-3.1.1\scons-local-3.1.1\SCons\Script\SConscript.py", line 605:
return _SConscript(self.fs, *files, **subst_kw)
File "F:\gitP\mongodb\mongo\src\third_party\scons-3.1.1\scons-local-3.1.1\SCons\Script\SConscript.py", line 286:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "F:\gitP\mongodb\mongo\src\mongo\installer\msi\SConscript", line 59:
dirs = os.listdir(redist_root)
##[debug] Command #2 exited with code [2].
##[error] Detected error code [2].