[CXX-89] Add Evergreen builder for MinGW Created: 01/Feb/10 Updated: 23/Jul/21 Resolved: 22/May/18 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Build, Portability |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | David G Ortega | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 10 |
| Labels: | cxxmove, windows | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows XP |
||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Epic Link: | CXX Driver Testing (Evergreen) | ||||||||||||
| Description |
|
C++ Driver does not compile with Mingw. mongo/client/../util/goodies.h: In member function `mongo::WrappingInt mongo/client/../util/goodies.h:131: error: initializing argument 1 mongo/client/../util/goodies.h:172: warning: unused variable 'ctime_s' mongo/client/../db/jsobj.h: In constructor `mongo::JSObj1::JSObj1()': |
| Comments |
| Comment by J Rassi [ 28/Jan/17 ] |
|
gbschenkel: thanks for the report! I'm glad to hear to hear that you were able to successfully compile the latest version of the driver with MinGW. I've filed |
| Comment by Gustavo Brondani Schenkel [ 27/Jan/17 ] |
|
I found the problem related by me in CXX-1206, was the third party software Catch, which could handle the code(c++11), in my humble opinion. I downloaded the last stable version and updated the "mongo-cxx-driver/src/third_party/catch/include/catch.hpp". After that i was able to compile and install it. I used Msys2 with mingw-w64-x86_64 + (gcc + cmake + openssl + boost) for x86_64. For CMake I used the generator 'CodeBlocks - MinGW Makefiles'. |
| Comment by J Rassi [ 02/Sep/16 ] |
|
I'm re-purposing this ticket to focus on official support for MinGW on the master branch. Relatedly, I've closed pull request #108; see my closing comment there for details. |
| Comment by David Golden [ 12/Aug/16 ] |
|
Related PR was submitted as https://github.com/mongodb/mongo-cxx-driver/pull/108 |
| Comment by Pieter Willem Jordaan [ 30/Jun/14 ] |
|
Here is a blog post describing the detail and also a github link with a pull request |
| Comment by Andrew Morrow (Inactive) [ 26/Mar/14 ] |
|
climax Mingw support is not currently a priority for us, though certainly a nice to have, so I'm not sure how soon we will be able to get to working on this. However, we are certainly interested in your scons diff as that will give us some guidance for when we do revisit this topic in the future. If you have any questions about the scons build system for the driver, mongodb-dev is probably an appropriate forum for questions. Thanks, |
| Comment by Pieter Willem Jordaan [ 26/Mar/14 ] |
|
I managed to get the C++ driver built with mingw on Windows with minor changes to the code. The changes to the scons file, however, were not so easy. I will try to create a patch which makes it easier for cross-toolchains as that is currently my use case. I am not very familiar with scons so this is delaying my progress. |
| Comment by Andrea Fontana [ 09/May/12 ] |
|
still not work on linux using mingw :\ |
| Comment by Pieter Willem Jordaan [ 21/Mar/12 ] |
|
I remember now that you have to specify the UNICODE and _UNICODE defines when building the source, not sure if it is applicable. |
| Comment by Pieter Willem Jordaan [ 21/Mar/12 ] |
|
This is correct, Thomas. I've noticed that the code using the *_s functions check if WIN32 is defined. The assumption is then made that it is Visual C++ compiling and not MingW. I have managed to build the source using mingw64 from TDM. The latest is utilizing gcc 4.6.1. I am uploading the patch I made. Please note that the patch also includes changes to SConstruct to use boost 1.48, but it is irrelevant for making mingw to work. I am not sure which version mongo it was, but I believe the patch file will specify the git version used. Please let met know if anything is missing and I will do my best to help out. |
| Comment by Thomas Pönitz [ 06/Dec/10 ] |
|
Yes there are similar issues with ming64. What's the use of the *_s functions? Shouldn't the CRT be thread safe (Thread local storage...)? In Mingw there are macros like this: |
| Comment by Justin Dearing [ 04/Sep/10 ] |
|
Does the same thing happen on mingw64? |
| Comment by Andrea Fontana [ 29/Jun/10 ] |
|
mingw on Linux gives same errors... |