[CXX-1656] Could not find header files Created: 26/Sep/18 Updated: 27/Sep/18 Resolved: 27/Sep/18 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | 3.3.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Klaus [X] | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I am trying to use mongocxx driver version 3.3.1 but when I am compiling the sample given in the docs, I have the following issue:
I built and installed the driver as follows:
What do you think ? Have I forgotten something?
|
| Comments |
| Comment by Klaus [X] [ 27/Sep/18 ] | ||||||||||||||||||
|
Yes, it would be great to have an official RPM of the C++ Driver. In the meantime, I managed to packaged it myself so everything’s good ! I am ready to start coding and using it now (: | ||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 27/Sep/18 ] | ||||||||||||||||||
|
Thanks for the info. I couldn't reproduce your issue when I was built the C++ Driver myself, so I hypothesize that there's a problem with building it as part of an RPM install. We'll keep this in mind when we create an official RPM of the C++ Driver in the future. | ||||||||||||||||||
| Comment by Klaus [X] [ 27/Sep/18 ] | ||||||||||||||||||
|
I am using CentOS release 6.5, with gcc 4.8.2 and cmake3 version 3.6.1. I tried to package mongocxx driver to have a RPM I can install easily but I don't know why, I don’t have headers in /usr/local/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc when I am installing the generated RPM. What I did in my spec file is the following:
Do you have an idea of what I did wrong? EDIT: I solved my problem by doing the following in my spec file:
It is not particularly beautiful... but it works. If you have a better idea, please let me know! | ||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 27/Sep/18 ] | ||||||||||||||||||
|
Thanks Klaus. What compiler version and Linux distro and verson are you using? I want to investigate those compiler warnings. But no, you don't need to worry about them. For me with Ubuntu 18.04, cmake 3.10.2, and gcc 7.3.0, the C++ driver's build system properly chooses MNMLSTC as the polyfill by default. The following steps properly install both MNMLSTC and the driver:
| ||||||||||||||||||
| Comment by Klaus [X] [ 27/Sep/18 ] | ||||||||||||||||||
|
Thanks for the quick reply Jesse. Indeed, I thought that MNMLSTC/core would be chosen by default for non-Windows platforms and Boost would be chosen by default for Windows platforms. By the way, by compiling the example, I have some warnings on MNMLSTC cpp sources, like for instance:
or even some warnings on bsoncxx sources, like for instance:
Do I need to worry ? | ||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 26/Sep/18 ] | ||||||||||||||||||
|
Thanks for the info. It seems like our CMakeLists.txt should have chosen MNMLSTC by default, right? Is the problem that “make install” installs the driver but doesn’t install MNMLSTC, and then when you’re using the installed driver MNMLSTC is not available systemwide? | ||||||||||||||||||
| Comment by Klaus [X] [ 26/Sep/18 ] | ||||||||||||||||||
|
My bad, I forgot to choose a C++17 polyfill with:
This ticket can be closed. |