[CDRIVER-544] Can't compile with MinGW-w64 Created: 26/Feb/15  Updated: 13/Jan/17  Resolved: 10/Mar/15

Status: Closed
Project: C Driver
Component/s: mingw
Affects Version/s: 1.1.0
Fix Version/s: 1.1.2

Type: Bug Priority: Major - P3
Reporter: Demelier David Assignee: Mira Carey
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7, MinGW w64



 Description   

I can't compile mongo-c-driver 1.1.0 with MinGW w64.

Steps to reproduce :

1. Open a MSYS shell
2. Set the environment (for OpenSSL support)

export CFLAGS="-IC:/Libs/amd64/libopenssl/include"
export LDFLAGS="-LC:/Libs/amd64/libopenssl/lib"

3. Run configure and make

./configure --prefix=C:/Libs/amd64/libmongo
make

The error:

Making all in src/libbson
make[1]: Entering directory `/c/mongo-c-driver-1.1.0/src/libbson'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/c/mongo-c-driver-1.1.0/src/libbson'
make[1]: Entering directory `/c/mongo-c-driver-1.1.0'
CCLD libmongoc-priv.la
libtool: error: can't build i686-pc-mingw32 shared library unless -no-undefined is specified
make[1]: *** [libmongoc-priv.la] Error 1
make[1]: Leaving directory `/c/mongo-c-driver-1.1.0'
make: *** [all-recursive] Error 1



 Comments   
Comment by Demelier David [ 27/Feb/15 ]

Thank you very much for your quick answer!

Just tested it this morning and it compiled fine under both 32-bit and 64-bit .

Comment by Mira Carey [ 26/Feb/15 ]

Hi,

Thanks for trying this out, I hadn't tested the mingw configuration in a while.

I've pushed a new master branch for libbson and libmongoc that fixes the build system problem you saw, as well as an unrelated bug that would have popped up eventually.

One caveat: There also appear to be a number of warnings I haven't worked out how I want to quiet yet, but I think I've covered all the actual errors floating around.

Regards,
Jason

Generated at Wed Feb 07 21:09:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.