[CXX-1901] Building C++ driver from master fails to find cmake packages of C driver Created: 23/Dec/19 Updated: 28/Oct/23 Resolved: 27/Dec/19 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Build |
| Affects Version/s: | 3.4.0 |
| Fix Version/s: | 3.5.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Shogair Shogair | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS: Windows 10 Enterprise (Version 1909, OS build 18363.535) |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363. No build type selected, default is Release bsoncxx version: 3.4.0-pre CMake Error at src/bsoncxx/CMakeLists.txt:79 (find_package): Configuring incomplete, errors occurred! See also "D:/MongoDB/mcc2/CMakeFiles/CMakeOutput.log". |
| Comments |
| Comment by Githook User [ 27/Dec/19 ] | ||||||||||||
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message:
| ||||||||||||
| Comment by Shogair Shogair [ 26/Dec/19 ] | ||||||||||||
|
Ok now It works, Thanks | ||||||||||||
| Comment by Kevin Albertson [ 26/Dec/19 ] | ||||||||||||
|
I believe this is due to the changes of First, build and install the C driver into C:\mongo-c-driver from the master branch.
Next, build and install the C++ driver from the master branch.
The instructions above are for cmd.exe, with cmake version 3.16.2, and explicitly specify VS 2019 as the generator. As part of this ticket, we'll fix the C++ driver to support the old C driver target names too, to support building against older C driver releases. Apologies for the disruption. If this resolves your issue, please let us know if this resolves | ||||||||||||
| Comment by Shogair Shogair [ 23/Dec/19 ] | ||||||||||||
|
Hi kevin.albertson, I already did cmake -DCMAKE_PREFIX_PATH=C:\mongo-c-driver but still keep asking for the file | ||||||||||||
| Comment by Kevin Albertson [ 23/Dec/19 ] | ||||||||||||
|
Hi note8g2018@gmail.com! The error message in the description is due to cmake unable to find libbson or libmongoc. The C driver (consisting of libmongoc and libbson) must be installed before building the C++ driver. You can tell cmake where to find libmongoc/libbson by including the path via CMAKE_PREFIX_PATH. For example, if the C driver was installed in C:\mongo-c-driver, then configure the C++ driver with:
Also see "Step 4: Configure the driver" in the installation documentation: http://mongocxx.org/mongocxx-v3/installation/ for more information. |