[CXX-2419] Wrong CMAKE configuration for std::experimental build Created: 10/Dec/21 Updated: 27/Oct/23 Resolved: 07/Apr/22 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | API |
| Affects Version/s: | 3.6.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Dariusz D | Assignee: | Roberto Sanchez |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | needs-first-responder | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
SummaryUnable to install it via vcpkg install mongo-cxx-driver[std-experimental] due to CMAKE_CXX_STANDARD set to 11 instead of 14+ https://github.com/microsoft/vcpkg/issues/21877
Environment WIndows 10x64 msvc2019 How to Reproducevcpkg install mongo-cxx-driver[std-experimental] Additional Backgroundhttps://github.com/microsoft/vcpkg/issues/21877
|
| Comments |
| Comment by Roberto Sanchez [ 07/Apr/22 ] | ||||||||||||||||||||||||||||
|
dariusz1989@gmail.com, you're welcome. The problem is that the vcpkg portfile is not setting the proper c++ standards version when building with the std::experimental polyfill. If you point the vcpkg maintainers at the patch I suggested in my last comment, they should be able to fix the mongo-cxx-driver build in vcpkg. You can also built with the default Boost polyfill and bypass the failure you are experiencing that way. As far as compiling mongodb, note that mongo-c-driver and mongo-cxx-driver are drivers that allow you build programs to interact with the MongoDB server. Neither of those are the server itself. If you require further assistance, the best place to request it is in the Community Forums. | ||||||||||||||||||||||||||||
| Comment by Dariusz D [ 07/Apr/22 ] | ||||||||||||||||||||||||||||
|
Hey @Roberto Sanchez Thanks for checking out this issue. I'm not sure, I do not configure anything. I just try to install mongodb via vcpkg. Here is my post on githun issue > https://github.com/microsoft/vcpkg/issues/21877 They told me its mongodb issue and to ask here before > https://github.com/microsoft/vcpkg/issues/21877#issuecomment-989440957 So, is it mongo cmake issue or is it vcpkg issue? Who is maintaining what here? Also, I'd like to finally get mongodb compiled... Regards Dariusz
| ||||||||||||||||||||||||||||
| Comment by Roberto Sanchez [ 07/Apr/22 ] | ||||||||||||||||||||||||||||
|
dariusz1989@gmail.com, the issue you have reported is not a bug in the C++ driver build. Rather, when choosing the std::experimental polyfill it is necessary to ensure that the correct C++ standard level is set. The error message at the end of the failed build clearly states that CMAKE_CXX_STANDARD must have a value of 14 or higher when building with the std::experimental polyfill. The C++ driver build defaults to C++11 for the benefit of older compilers which are supported for building the project. Additionally, the std::experimental polyfill carries the caveat "Note that this polyfill is not recommended and is unsupported" in the installation documentation. I recommend updating the mongo-cxx-driver portfile with the following changes to allow the std-experimental variant of your port to successfully build:
If we can be of further assistance, please | ||||||||||||||||||||||||||||
| Comment by Kevin Albertson [ 12/Dec/21 ] | ||||||||||||||||||||||||||||
|
Hi dariusz1989@gmail.com, thank you for the report. We will look into this soon. |