C:1.22.1 build ok. cxx:3.6.7 build failed. os:Linux Mint 20.3 Cinnamon

build mongo cxx driver…
– The CXX compiler identification is GNU 9.4.0
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found PythonInterp: /usr/bin/python (found version “2.7.18”)
– The C compiler identification is GNU 9.4.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Auto-configuring bsoncxx to use MNMLSTC for polyfills since C++17 is inactive
bsoncxx version: 0.0.0
CMake Error at src/bsoncxx/CMakeLists.txt:107 (find_package):
Could not find a configuration file for package “libbson-static-1.0” that
is compatible with requested version “1.13.0”.

The following configuration files were considered but not accepted:

/opt/third_party/debug/mongo_c_driver/lib/cmake/libbson-static-1.0/libbson-static-1.0-config.cmake, version: 0.0.0

– Configuring incomplete, errors occurred!
See also “/home/hgc/workspace/gerrit/hilton/third_party/archives/debug/mongo-cxx-driver-r3.6.7/debug_build/CMakeFiles/CMakeOutput.log”.
ninja: error: loading ‘build.ninja’: No such file or directory
ninja: error: loading ‘build.ninja’: No such file or directory
ninja: error: loading ‘build.ninja’: No such file or directory

cmake command:
/usr/bin/cmake -G “${CMAKE_GENERATOR}” -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE_VALUE} -DCMAKE_INSTALL_PREFIX=${MONGO_CXX_DRIVER_INSTALL_DIR}
-DBUILD_SHARED_LIBS_WITH_STATIC_MONGOC=ON -DCMAKE_PREFIX_PATH=${MONGO_C_DRIVER_INSTALL_DIR} …

and the MONGO_C_DRIVER_INSTALL_DIR=/opt/third_party/debug/mongo_c_driver/

c driver build ok:
/usr/bin/cmake -G “${CMAKE_GENERATOR}” -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE_VALUE} -DCMAKE_INSTALL_PREFIX=${MONGO_C_DRIVER_INSTALL_DIR}
-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_SNAPPY=OFF -DENABLE_TESTS=OFF -DENABLE_EXAMPLES=OFF …
/usr/bin/cmake --build .
sudo /usr/bin/cmake --build . --target install

hgc@hgc-virtual-machine:~/workspace/gerrit/hilton/third_party/build$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

hgc@hgc-virtual-machine:~/workspace/gerrit/hilton/third_party/build$ g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

hgc@hgc-virtual-machine:~/workspace/gerrit/hilton/third_party/build$ ninja --version
1.11.0
hgc@hgc-virtual-machine:~/workspace/gerrit/hilton/third_party/build$ cmake --version
cmake version 3.24.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).
hgc@hgc-virtual-machine:~/workspace/gerrit/hilton/third_party/build$