whenever i try to build the mongocxx 4.0 driver using the instructions online on my debian 12 vm (works fine in ubuntu 22), it gives me the folllowing errors.
Please help. i have absolutely no idea why this wont work
user@debian:~/Downloads/mongo-cxx-driver-r4.0.0/build$ cmake … -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17
– No MongoDB C Driver path provided via CMAKE_PREFIX_PATH, will download C driver version 1.29.0 from the internet.
– Download and configure C driver version 1.29.0 … begin
[ 11%] Performing update step for ‘mongo-c-driver-populate’
CMake Error at /home/user/Downloads/mongo-cxx-driver-r4.0.0/build/_deps/mongo-c-driver-subbuild/mongo-c-driver-populate-prefix/tmp/mongo-c-driver-populate-gitupdate.cmake:25 (message):
Failed to get the hash for HEAD:
fatal: not a git repository: ‘.git’
gmake[2]: *** [CMakeFiles/mongo-c-driver-populate.dir/build.make:130: mongo-c-driver-populate-prefix/src/mongo-c-driver-populate-stamp/mongo-c-driver-populate-update] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/mongo-c-driver-populate.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
CMake Error at /usr/share/cmake-3.25/Modules/FetchContent.cmake:1616 (message):
Build step for mongo-c-driver failed: 2
Call Stack (most recent call first):
/usr/share/cmake-3.25/Modules/FetchContent.cmake:1756:EVAL:2 (__FetchContent_directPopulate)
/usr/share/cmake-3.25/Modules/FetchContent.cmake:1756 (cmake_language)
/usr/share/cmake-3.25/Modules/FetchContent.cmake:1970 (FetchContent_Populate)
cmake/FetchMongoC.cmake:39 (FetchContent_MakeAvailable)
CMakeLists.txt:78 (include)
– Configuring incomplete, errors occurred!