[CXX-841] Cmake fails if libbson_dir provided but not pkg-config found Created: 11/Feb/16 Updated: 15/Mar/16 Resolved: 15/Mar/16 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Build |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mario Valle | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
If you enter LIBBSON_DIR and there is no pkg-config around, makefile fails with a FindPkgConfig.cmake error even if I entered a LIBBSON_DIR value. |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 15/Mar/16 ] |
|
Hi - I'm closing this issue as I've not heard any more information. Please feel free to re-open it if you need further help. |
| Comment by Andrew Morrow (Inactive) [ 26/Feb/16 ] |
|
Sorry for the delay. Not to ask an obvious question, but do you actually have libbson 1.3.1 or newer? That error message seems to indicate that pkg-config was in fact used, but it found too old of a version of libbson. |
| Comment by Mario Valle [ 22/Feb/16 ] |
|
Here is what the cmake-gui outputs after restoring the two Find*.cmake Checking for module 'libbson-1.0>=1.3.1' CMake Error at Configuring incomplete, errors occurred! See also Note that the FindPkgConfig.cmake file is there and CMAKE is at its |
| Comment by Andrew Morrow (Inactive) [ 19/Feb/16 ] |
|
Hi mvalle@cscs.ch - First, I'm happy to hear that the new driver build system is working better for you. We like it better too. Any thoughts or opinions on the new API in the C++11 driver? I read your explanation of what is going wrong, and I'm a little puzzled that you are seeing that behavior. The search for PkgConfig is supposed to be "quiet", so that it won't break if it isn't found: https://github.com/mongodb/mongo-cxx-driver/blob/master/cmake/FindLibBSON.cmake#L22-L25 Can you provide the console output from your CMake invocation so I can see the error that you are getting? |
| Comment by Mario Valle [ 19/Feb/16 ] |
|
Dear Andrew, I want to add, that the new c++ driver with the cmake build environment Best. – |
| Comment by Andrew Morrow (Inactive) [ 19/Feb/16 ] |
|
Hi, thanks for the bug report. I'm not sure I totally understand why you want to make this change. The way it is written, it should only be attempting to use the pkg-config mechanism if pkg-config is found. Or are you describing a situation where the pkg-config binary is found, but there is no .pc file available for libmongoc? I think I might see why in that latter case you would want the _DIR variables to function as overrides. Can you clarify a bit? Also, if you want to contribute your changes, a github PR is the preferred way to send us changes. |