[SERVER-32377] ERROR: Refusing to build with compiler that does not meet requirements Created: 17/Dec/17  Updated: 26/Jan/18  Resolved: 26/Dec/17

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: shawn Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

scons mongod.exe MONGO_VERSION=3.4.10

scons: Reading SConscript files ...
scons version: 3.0.0
python version: 2 7 13 'final' 0
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 2015 Update 3 or newer...no
Checking if C++ compiler is Microsoft Visual Studio 2015 Update 3 or newer...no
ERROR: Refusing to build with compiler that does not meet requirements

the actual vs version is:
Visual Studio 2015 Update3 v14.0. 25431.01



 Comments   
Comment by shawn [ 23/Dec/17 ]

@Andrew Morrow

I got it,
Thanks.

Comment by Andrew Morrow (Inactive) [ 23/Dec/17 ]

Ahhh.... thank you for that. It has jogged my memory. You need a compiler hotfix for VS2015 to fix a bug in /WHOLEARCHIVE. We intentionally included the version code that included the hotfix so that people wouldn't get failing builds.

Your choices are to either build with --link-model=objects --disable-minimum-compiler-version-enforcement which will instruct the build system to ignore the version check and to not attempt to use the /WHOLEARCHIVE flag, or to install the following hotfix:

https://support.microsoft.com/en-us/help/4020481/fix-link-exe-crashes-with-a-fatal-lnk1000-error-when-you-use-wholearch

Comment by shawn [ 22/Dec/17 ]

@Andrew Morrow

my _MSC_FULL_VER. is 19.00.24215.1

so, i changed " #if _MSC_VER < 1900 || (_MSC_VER == 1900 && _MSC_FULL_VER < 190024218)" to "_MSC_FULL_VER < 190024215" from file SConstruct.
and ,it works.
but link mongd.exe failed at the end.
info was:
Linking build\opt\mongo\mongod.exe
LINK : fatal error LNK1000: unknown error at 00007FF6C7D64241; consult documentation for technical support options
scons: *** [build\opt\mongo\mongod.exe] error 1000
scons: building terminated because of errors.
build\opt\mongo\mognod.exe failed:Error 1000

Comment by Andrew Morrow (Inactive) [ 18/Dec/17 ]

Can you re-run your build with the flag --config=force, and then attach the file build/scons/config.log to this ticket? It would also be helpful to know what values your compiler expresses for _MSC_VER and _MSC_FULL_VER.

Generated at Thu Feb 08 04:30:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.