Hi, I’m currently trying to compile mongocxx-driver under Ubuntu, and I ran into some issues.
I use the guide found at
http://mongocxx.org/mongocxx-v3/installation/
and have successfully installed the dependencies as described under
http://mongoc.org/libmongoc/current/installing.html
Under Step 4, Configure the driver, I ran into the issues.
So far, any attempt of calling cmake resulted in this:
<<
CMake Error at src/bsoncxx/CMakeLists.txt:81 (find_package):
By not providing “Findlibbson-1.0.cmake” in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
“libbson-1.0”, but CMake did not find one.
Could not find a package configuration file provided by “libbson-1.0”
(requested version 1.13.0) with any of the following names:
libbson-1.0Config.cmake
libbson-1.0-config.cmake
Add the installation prefix of “libbson-1.0” to CMAKE_PREFIX_PATH or set
“libbson-1.0_DIR” to a directory containing one of the above files. If
“libbson-1.0” provides a separate development package or SDK, be sure it
has been installed.
Those files do not exist. I have libbson-1.0, but not any libbson cmake file.
So far, I found the similar questions
but those did not really help me. I feel that if I blindly start to edit some CMakeFile, this will do me no good.
If it is relevant, my last attempt at configuration used the command
cmake …
-DCMAKE_BUILD_TYPE=Release
-DBSONCXX_POLY_USE_MNMLSTC=1
-DCMAKE_INSTALL_PREFIX=/usr/local
I tried out several variants and also to execute it under sudo, same outcome.
I also tried to set CMAKE_PREFIX_PATH to something that contains the libbson library files, but as it specifically asks for a libbson cmake file, I didn’t expect it to work to begin with.