[CDRIVER-633] Undefined RTL_RUN_ONCE and suseconds_t with mingw Created: 05/May/15 Updated: 18/Jan/17 Resolved: 18/Jan/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Build, libbson, mingw |
| Affects Version/s: | 1.1.4 |
| Fix Version/s: | 1.6.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Compiling libbson on Windows with mingw64:
|
| Comments |
| Comment by Githook User [ 18/Jan/17 ] | |||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: RTL_RUN_ONCE and suseconds_t were undefined when building with CMake and | |||||
| Comment by Virgile Devaux [ 20/Dec/16 ] | |||||
|
ok, tx. | |||||
| Comment by A. Jesse Jiryu Davis [ 16/Dec/16 ] | |||||
|
Thanks Virgile, if you're not a CMake expert, don't concern yourself with this. We'll fix it in the next couple months. I've moved it to the top of our backlog. We've recently added MinGW toolchains to our build farm, so we can finally test our fixes. We'll add configure checks to the CMake and Autotools build systems. | |||||
| Comment by Virgile Devaux [ 15/Dec/16 ] | |||||
|
unfortunatly no, I'm not very experienced with cmake. | |||||
| Comment by A. Jesse Jiryu Davis [ 14/Dec/16 ] | |||||
|
Thanks Virgile. If you're familiar with CMake, it'd be nice to use two CMake CheckCSourceCompiles tests, one for RTL_RUN_ONCE and one suseconds_t. For each, set a CMake variable like BSON_HAS_RTL_RUN_ONCE and BSON_HAS_SUSECONDS_T. Then add those variables to bson-config.h.in, then in bson-compat.h use those variables to define RTL_RUN_ONCE and suseconds_t if necessary. RTL_RUN_ONCE is typedef'ed here: We can use that code in bson-compat.h if necessary. We also need a test for these two symbols in libbson's Autoconf build system, you can leave that work to us if you want. | |||||
| Comment by Virgile Devaux [ 14/Dec/16 ] | |||||
|
As far as I am concerned, for the 1.5.0 release and the git master, the problem still arises. It looks like The problem is in libbson. $ cd libbson/ (1) If you are just trying to build this project, ignore this warning or (2) If you are developing this project, add the line set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required at the top of your top-level CMakeLists.txt file or set the minimum – Check for working C compiler: /mingw64/bin/cc.exe $ make If you need any information, from my configuration, running tests, anything, just drop a comment. | |||||
| Comment by Hannes Magnusson [ 18/Oct/16 ] | |||||
|
I've seen other successfully compiling under mingw64 on Windows, so this might be fixed already. Marking this as improvement as we don't have a mingw64 builder in evergreen to be able to properly support it | |||||
| Comment by A. Jesse Jiryu Davis [ 05/May/15 ] | |||||
|
Caused by a commit to fix | |||||
| Comment by A. Jesse Jiryu Davis [ 05/May/15 ] | |||||
|
To make a repro environment on a Mac, install VirtualBox and install Windows 8.1 from an ISO: Install msys2, the 64-bit version "msys2-x86_64-20150202.exe": Then start C:\msys64\mingw64_shell.bat (irritatingly, msys2_shell.bat is just a distractor, run mingw64_shell.bat to get an actual build environment). In the window mingw64_shell.bat opens:
This produces the error output above. |