[CDRIVER-2447] Update install instructions for MSYS2 Created: 04/Jan/18 Updated: 28/Oct/23 Resolved: 29/Jan/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | docs, libmongoc |
| Affects Version/s: | 1.9.0 |
| Fix Version/s: | 1.10.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | mithril | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
|
||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Description |
|
I test with mingw32 and mingw64 1.9.0 release got this error:
PS:
|
| Comments |
| Comment by Githook User [ 29/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by mithril [ 06/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
1. remove `msys/usr/bin` in windows environment Then succeeded. I think full steps should be add to http://mongoc.org/libmongoc/current/installing.html#building-from-a-release-tarball
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by mithril [ 06/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It looks like make found wrong path ?? `D:/msys64/usr/lib/` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by mithril [ 06/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I think you miss `cd ../..` before
And make got another different error:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 06/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oh, sorry, I missed one line in my previous example, but I've added it now. Please see my previous comment. I use cmake, not ./configure. I've never gotten ./configure to work in MSYS2 so I only use cmake. If you follow the steps I pasted above I expect you will be able to compile the driver with MSYS2 and cmake. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by mithril [ 06/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
What is the option you pass to ./configure ? Not show in your example. I found `./configure` under `mongo-c-driver-1.9.0\src` and `mongo-c-driver-1.9.0\src\libbson` , the result is different. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 06/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes, and "make install" then installs libbson in system paths. I have then successfully compiled libmongoc using MSYS2. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by mithril [ 06/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This line
You only compiled libbson, libbson is fine I have said in previous comment . The problem is libmongoc can't be compiled. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 05/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here are steps that worked for me: Install MSYS2 from msys2.github.io, the x86_64 version (not i686) Open c:\msys64\ming64_shell.bat (not the msys2_shell!)
Pacman told me to close and reopen shell and do it again:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by mithril [ 05/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I have tried two way (both can compile libbson successfully, but libmongoc not) 1. build from release followed this section http://mongoc.org/libmongoc/current/installing.html#building-from-a-release-tarball launch mingw32 shell( http://www.msys2.org/ ) then,
`./configure` succeeded. But `make` got
2. Build using windows cmd run cmake Use source code https://github.com/mongodb/mongo-c-driver/ Alter this script to
it build `libbson-1.0` successfully But failed with libmongoc :
Set `BSON_INCLUDE_DIRS ` in `compile-windows-mingw.bat` , not work .
log file uploaded. PS: I don't know much about compiling c lib, only know ./configure, make command ... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 04/Jan/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, could you tell me more about how you're compiling the driver, please? Do you use cmake or the Autotools? Could you attach a copy of the generated mongoc-config.h? |