Install From Source Error: no member named 'kVersion_6_0'

Description

Issues compiling on Amazon Linux OS using the latest commit.

OS Information

# cat /etc/os-release
NAME="Amazon Linux"
VERSION="2022"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2022"
PLATFORM_ID="platform:al2022"
PRETTY_NAME="Amazon Linux 2022"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2022"
HOME_URL="https://amazonlinux.com/"

# uname -a
Linux xxxxxxxx.us-west-2.compute.internal 5.15.25-14.106.amzn2022.x86_64 #1 SMP Wed Mar 2 19:27:42 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Installation Information

# OS Tools Install
sudo dnf install -y binutils coreutils ca-certificates nano wget autoconf automake bison clang-devel \
                             cmake g++ gcc git glibc-devel kernel-headers libcurl libpcap-devel libtool libunwind \
                             libunwind-devel make memcached-devel openssl-devel python3 python3-devel rsync \
                             scons sqlite-devel tzdata xz-devel zip zlib-devel libatomic libcurl-devel

# Python Tools Install
sudo python3 -m pip install --ignore-installed --upgrade pip wheel setuptools regex cheetah3 smmap2 psutil

# Python Tools Upgrade
sudo python3 -m pip install --ignore-installed --upgrade $(sudo python3 -m pip list --outdated | awk 'NR>2 {print $1}')


# MongoDB Install
git clone --depth 1 --branch master https://github.com/mongodb/mongo.git ~/mongodb
cd ~/mongodb
git checkout b02798f3032ff6df56a45b4bcb9296b247c37be4
python3 -m pip install --upgrade -r etc/pip/compile-requirements.txt
python3 buildscripts/scons.py CC=clang CXX=clang++ MONGO_VERSION="5.3.1" install-core --disable-warnings-as-errors

Compile Errors

...
Generating build/opt/mongo/db/pipeline/document_source_replace_root_gen.cpp
Compiling build/opt/mongo/db/pipeline/document_source_replace_root.o
Compiling build/opt/mongo/db/pipeline/visitors/transformer_interface_walker.o
Compiling build/opt/mongo/db/pipeline/document_source_add_fields.o
Compiling build/opt/mongo/db/pipeline/document_source_sort.o
Compiling build/opt/mongo/db/pipeline/document_source_set_window_fields.o
Compiling build/opt/mongo/db/pipeline/document_source_group.o
Compiling build/opt/mongo/db/pipeline/document_source_list_catalog.o
src/mongo/db/pipeline/document_source_list_catalog.cpp:50:86: error: no member named 'kVersion_6_0' in 'mongo::multiversion::FeatureCompatibilityVersion'
                                          multiversion::FeatureCompatibilityVersion::kVersion_6_0);
                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/mongo/db/pipeline/document_source.h:111:44: note: expanded from macro 'REGISTER_DOCUMENT_SOURCE_WITH_MIN_VERSION'
                                           minVersion,                  \
                                           ^~~~~~~~~~
src/mongo/db/pipeline/document_source.h:145:85: note: expanded from macro 'REGISTER_DOCUMENT_SOURCE_CONDITIONALLY'
            DocumentSource::registerParser("$" #key, DocumentSource::parseDisabled, minVersion); \
                                                                                    ^~~~~~~~~~
src/mongo/db/pipeline/document_source_list_catalog.cpp:50:86: error: no member named 'kVersion_6_0' in 'mongo::multiversion::FeatureCompatibilityVersion'
                                          multiversion::FeatureCompatibilityVersion::kVersion_6_0);
                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/mongo/db/pipeline/document_source.h:111:44: note: expanded from macro 'REGISTER_DOCUMENT_SOURCE_WITH_MIN_VERSION'
                                           minVersion,                  \
                                           ^~~~~~~~~~
src/mongo/db/pipeline/document_source.h:154:62: note: expanded from macro 'REGISTER_DOCUMENT_SOURCE_CONDITIONALLY'
        DocumentSource::registerParser("$" #key, fullParser, minVersion);                        \
                                                             ^~~~~~~~~~
Compiling build/opt/mongo/db/pipeline/document_source_out.o
2 errors generated.
scons: *** [build/opt/mongo/db/pipeline/document_source_list_catalog.o] Error 1
scons: building terminated because of errors.
build/opt/mongo/db/pipeline/document_source_list_catalog.o failed: Error 1

I think that saying MONGO_VERSION=5.3.1 at the commit you have checked out may be having undesirable consequences. Do you still observe this issue if you build without that setting? The v6.0 branch was recently created and master has probably diverged such that it is no longer buildable when told that it is a v5.x release.

1 Like