[CDRIVER-3082] Build error on MSYS2 Created: 12/Apr/19 Updated: 28/Oct/23 Resolved: 22/May/19 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | docs, libbson, libmongoc |
| Affects Version/s: | 1.14.0 |
| Fix Version/s: | 1.15.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Felipe Noronha Tavares | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MSYS2, Windows 10 |
||
| Description |
|
I'm following the instructions on http://mongoc.org/libmongoc/current/installing.html#building-on-windows-with-mingw-w64-and-msys2 .
First, I had to use a single dot `.` at the end of the command, as the docs instruct to untar and enter the source code directory.
``` $ CC=/mingw64/bin/gcc.exe /mingw64/bin/cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="D:/install" . ```
The cmake build starts, but than it fails with these messages:
``` fnoro@N-00933732 MINGW64 /d/src/mongo-c-driver ``` |
| Comments |
| Comment by Kevin Albertson [ 22/May/19 ] | ||
|
Hi felipenoris, the documentation for building on MSYS2 has been updated after reproducing and verifying that the new steps work. Please feel free to re-open if this does not resolve the issue for you. | ||
| Comment by Githook User [ 22/May/19 ] | ||
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message: | ||
| Comment by Kevin Albertson [ 20/May/19 ] | ||
|
I've reproduced and confirmed that defining the additional C flag fixes this issue. | ||
| Comment by Kevin Albertson [ 20/May/19 ] | ||
|
Hi felipenoris! Apologies for the late reply. And... I misread, the macro has two underscores. Try again with:
I will attempt to reproduce and update our documentation accordingly. Sorry for the confusion. | ||
| Comment by Felipe Noronha Tavares [ 23/Apr/19 ] | ||
|
Thanks for helping! Defining -DCMAKE_C_FLAGS="-D_USE_MINGW_ANSI_STDIO=1" has no effect on the outcome. The verbose build output is this below. ``` | ||
| Comment by Kevin Albertson [ 15/Apr/19 ] | ||
|
Hi felipenoris. Thank you for the report. I have not yet had a chance to attempt to reproduce, but that error is triggered by _USE_MINGW_ANSI_STDIO being defined as 0. This define controls compatibility of printf formats. I'm not sure where it would be defined, but perhaps try defining it yourself in the cmake config:
If that does not solve the issue, can you try running cmake with verbosity turned on and copying the output of make here? (-DCMAKE_VERBOSE_MAKEFILE=ON):
That should give more information, and might indicate where it's getting defined. | ||
| Comment by Felipe Noronha Tavares [ 12/Apr/19 ] | ||
|
As additional information, this is the output of the first command, just before typing `make`. |