[SERVER-59656] scons 4.2.0 fails compilation of mongodb 5.0 Created: 27/Aug/21  Updated: 02/Sep/21  Resolved: 02/Sep/21

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

Type: Bug Priority: Major - P3
Reporter: R K Assignee: Ryan Egesdahl (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Dev Platform 2021-09-06
Participants:

 Description   

See https://www.mongodb.com/community/forums/t/scons-4-2-0-fails-compilation/120611?u=r_k

 

Compiling MongoDB with scons 4.2.0 fails (on FreeBSD). It fails from MongoDB 4.2 up until your git code from github. Scons 4.1.0 worked.

The error I get while compiling from github is:

 

Checking for C function sync_file_range()... noChecking for C header file x86intrin.h... yesChecking for C header file arm_neon.h... noTypeError: '<' not supported between instances of 'str' and 'NoneType': File "/root/src/mongo/SConstruct", line 5243: env.SConscript( File "/usr/local/lib/python3.8/site-packages/SCons/Script/SConscript.py", line 597: return _SConscript(self.fs, *files, **subst_kw)

{{}}

{{}}



 Comments   
Comment by Ryan Egesdahl (Inactive) [ 02/Sep/21 ]

This is going to be taken care of in the upstream PR noted in this ticket, so there's nothing more to do here. Please track that PR for further progress. We will make sure that if and when we upgrade our vendored SCons version, it will include a fix for the observed behavior.

Comment by Ryan Egesdahl (Inactive) [ 31/Aug/21 ]

Upstream PR: https://github.com/SCons/scons/pull/4010

Comment by Ryan Egesdahl (Inactive) [ 31/Aug/21 ]

ronald-lists@klop.ws It looks like the problem is caused by a change to SCons in 4.2.0 - specifically, here:
https://github.com/SCons/scons/commit/69dcebbd2deb8cb0fbb37be550362a1f1aa78666?branch=69dcebbd2deb8cb0fbb37be550362a1f1aa78666&diff=unified#diff-779d01a99a2759799ee18e18d2a6c202e45f552c16b047e1399728938e275a59L1078

That change unintentionally caused the default value of SCons.Util.CLVar to be [None] instead of [], which affects how we set up dependencies. I'm working on an upstream PR now for it, and I'll request that it be included in the next SCons 4.2 release (if any). Until a SCons version is released with a fix, you can use buildscripts/scons.py to build, which is always guaranteed to work, as acm mentioned in the forum thread.

Generated at Thu Feb 08 05:47:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.