[CDRIVER-2473] Port bson-stdint.h build logic from Autotools to CMake Created: 26/Jan/18 Updated: 28/Oct/23 Resolved: 15/Apr/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Build, libbson |
| Affects Version/s: | None |
| Fix Version/s: | 1.10.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Roberto Sanchez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | Remove Autotools |
| Description |
|
libbson has Autotools logic for generating a platform-specific version of stdint.h, called bson-stdint.h. On CMake we just always use a handwritten bson-stdint.h which just includes stdint.h. Determine whether there are platforms we care about which don't have stdint.h and if so, port the Autotools logic to CMake. Step One: determine if we need to do anything in particular here. |
| Comments |
| Comment by Githook User [ 25/May/18 ] |
|
Author: {'username': 'jmikola', 'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com'}Message: The output path for this file was left incorrect in the previous PR for |
| Comment by A. Jesse Jiryu Davis [ 15/Apr/18 ] |
|
Acknowledged, thanks for the thorough info. |
| Comment by Githook User [ 15/Apr/18 ] |
|
Author: {'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}Message: .h This change applies to non-MSVC compilers/platforms (for bson-stdint.h) |
| Comment by Roberto Sanchez [ 15/Apr/18 ] |
|
jesse, I just finished publishing my code review and I see that you preemptively LGTM-ed it I did want to add one more note here for the sake of completeness. I explored whether it was possible to ditch the section of the file under the comment MSVC++ does not include ssize_t, just size_t.. However, from what I was able to determine at least VS 2010 does not provide ssize_t, so that section appears to still be necessary for now. |
| Comment by A. Jesse Jiryu Davis [ 15/Apr/18 ] |
|
Terrific, make it so! |
| Comment by Roberto Sanchez [ 15/Apr/18 ] |
|
jesse, I have done some research into this and my conclusion is that we most likely do not need bson-stdint.h, so it would not make sense to put effort into porting the related Autotools logic to CMake. Basically, gcc (starting with version 4.5) and Visual Studio (starting with version 2010) ship stdint.h. I was not able to find definitive information regarding clang, but version 3.4 (the earliest listed in installing.rst) was released after gcc 4.5. Of the platforms/compilers listed in installing.rst, Visual Studio 2010 is the oldest. Of note, RHEL releases prior to 7 have older pre-4.5 gcc releases, though I am not certain if they have stdint.h or not. I would say that if the Evergreen matrix is considered comprehensive and the lack of a generated bson-stdint.h (the hand written bson-stdint.h that just includes stdint.h functions the same as if it were not present), then it would be a reasonable conclusion that we can do without the fancy bson-stdind.h generation logic. I recommend eliminating the file and its references from the CMake part of the build system to see what happens with the build matrix. I suspect that unless there are some very old odd platforms there, we should not see any failures attributable to this. |