source python3-venv/bin/activate
rm -rf ./build/debug/install/bin
rm -rf ./build/opt/install/bin
./buildscripts/scons.py --variables-files=etc/scons/mongodbtoolchain_v4_gcc.vars --cxx-std=20 --link-model=dynamic --ssl --ninja generate-ninja ICECC=icecc CCACHE=ccache --dbg=on --modules=""
ninja -j500 install-all
I get this error:
[1900/3062 ( 62%) 51.481s] Compiling build/debug/mongo/util/time_support_test.o
FAILED: build/debug/mongo/util/time_support_test.o
export PATH='/opt/mongodbtoolchain/v4/bin:/usr/local/bin:/opt/bin:/bin:/usr/bin';export CCACHE_NOCPP2='1';export CCACHE_PREFIX='/home/ubuntu/mongo/build/scons/icecream/debug/run-icecc.sh';/opt/mongodbtoolchain/v4/bin/ccache /opt/mongodbtoolchain/v4/bin/g++ @build/debug/mongo/util/time_support_test.o.rsp
src/mongo/util/time_support_test.cpp: In member function ‘virtual void mongo::{anonymous}::UnitTest_SuiteNameTimeParsingTestNameInvalidDates::_doTest()’:
src/mongo/util/time_support_test.cpp:416:29: error: loop variable ‘s’ of type ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’} binds to a temporary constructed from type ‘const char* const’ [-Werror=range-loop-construct]
416 | for (const std::string& s : badDates) {
| ^
src/mongo/util/time_support_test.cpp:416:29: note: use non-reference type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to make the copy explicit or ‘const char* const&’ to prevent copying
cc1plus: all warnings being treated as errors
[1923/3062 ( 62%) 52.364s] Linking build/debug/mongo/util/net/libssl_manager.so
ninja: build stopped: subcommand failed.