[CDRIVER-1072] mingw-w64 warning: "linker path does not have real file for library -lws2_32" Created: 25/Jan/16  Updated: 03/May/17  Resolved: 01/Feb/16

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Building current libbson on master with mingw-w64 4.9.1 on a VS2013 Evergreen spawnhost:

 [2016/01/25 11:02:12.800] Making all in src/libbson
...
[2016/01/25 11:03:07.509]   CCLD     libyajl.la
 [2016/01/25 11:03:07.817]   CCLD     libbson-1.0.la
 [2016/01/25 11:03:09.013] *** Warning: linker path does not have real file for library -lws2_32.
 [2016/01/25 11:03:09.013] *** I have the capability to make that library automatically link in when
 [2016/01/25 11:03:09.013] *** you link to this library.  But I can only do this if you have a
 [2016/01/25 11:03:09.013] *** shared version of the library, which you do not appear to have
 [2016/01/25 11:03:09.013] *** because I did check the linker path looking for a file starting
 [2016/01/25 11:03:09.013] *** with libws2_32 but no candidates were found. (...for file magic test)
 [2016/01/25 11:03:09.013] *** The inter-library dependencies that have been dropped here will be
 [2016/01/25 11:03:09.013] *** automatically added whenever a program is linked with this library
 [2016/01/25 11:03:09.013] *** or is declared to -dlopen it.
 [2016/01/25 11:03:09.013] *** Since this library must not contain undefined symbols,
 [2016/01/25 11:03:09.013] *** because either the platform does not support them or
 [2016/01/25 11:03:09.014] *** it was explicitly requested with -no-undefined,
 [2016/01/25 11:03:09.014] *** libtool will only create a static version of it.



 Comments   
Comment by A. Jesse Jiryu Davis [ 01/Feb/16 ]

Just need to ensure the latest mingw-w64 is installed (I used the MSYS2 installer) and its library path is configured. It ships with a libws2_32.a in its lib directory which I suppose is a thin wrapper around Windows's ws2_32.dll.

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