-
Type:
Bug
-
Resolution: Gone away
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
C Drivers
-
None
-
None
-
None
-
None
-
None
-
None
I am trying to install cxx driver but i have several issue with c driver side i believe.
This is my sh script:
sudo apt-get install cmake libmongoc-1.0-0 libbson-1.0 cmake libssl-dev libsasl2-dev zlib1g-dev #wget https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.25.0.tar.gz #tar xzf 1.25.0.tar.gz git clone https://github.com/mongodb/mongo-c-driver.git \ --branch r1.25 --depth 1 cd mongo-c-driver mkdir cmake-build cd cmake-build cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .. sudo make install cd .. cd .. git clone https://github.com/mongodb/mongo-cxx-driver.git \ --branch releases/stable --depth 1 cd mongo-cxx-driver/build sudo cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DBSONCXX_POLY_USE_MNMLSTC=1 \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DCMAKE_PREFIX_PATH=/home/fjolnirr/mongo-c-driver
Everything works as expected however;
issue 1: using tar(thats why i am cloning the branch directly) is printing errors at the cmake steps for both mongo c and mongo cxx drivers as follows;
-- Computing the current release version... fatal: not a git repository (or any of the parent directories): .git Traceback (most recent call last): File "/home/fjolnirr/mongo-c-driver-1.25.0/build/cmake/../calc_release_version.py", line 400, in <module> RELEASE_VER = previous(main()) if PREVIOUS else main() File "/home/fjolnirr/mongo-c-driver-1.25.0/build/cmake/../calc_release_version.py", line 320, in main head_commit_short = check_output(['git', 'rev-parse', '--revs-only', File "/home/fjolnirr/mongo-c-driver-1.25.0/build/cmake/../calc_release_version.py", line 136, in check_output raise subprocess.CalledProcessError(ret, args[0]) subprocess.CalledProcessError: Command 'git' returned non-zero exit status 128. CMake Error at build/cmake/BuildVersion.cmake:43 (message): Computing the build version failed! [1]: Call Stack (most recent call first): build/cmake/BuildVersion.cmake:50 (compute_build_version) CMakeLists.txt:5 (include) -- Configuring incomplete, errors occurred!
issue 2: After successful installation of C driver and cloning mongocxx driver, at cmake step of mongocxx I always got this and it redownloads the mongo c 1.25.0
-- No Mongo C Driver path provided via CMAKE_PREFIX_PATH, will download C driver version 1.25.0 from the internet. -- Download and configure C driver version 1.25.0 ... begin
At first i did not use this line below but then give it a shot if it works and might see the mongo c driver but no it kept downloading. Am i giving a wrong directory for c driver? All the files installed to /usr/local which i have tried to give that dir too.
-DCMAKE_PREFIX_PATH=/home/fjolnirr/mongo-c-driver
I want to use mongo cxx driver in offline env for my project. I need a solution without git clones or downloading from internet. I am not sure if it is a bug or my configuration mistake.