[CDRIVER-2071] mongoc-sspi.c and mongoc-cluster-sspi.c not distributed in release tarball Created: 25/Feb/17  Updated: 29/Mar/17  Resolved: 24/Mar/17

Status: Closed
Project: C Driver
Component/s: Build, libmongoc
Affects Version/s: 1.6.0
Fix Version/s: 1.6.2

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

Windows 10 64 bits


Issue Links:
Related
is related to CDRIVER-2076 Test building from tarballs with MSVC Closed

 Description   

After successfully making and installing libbson I tried to do the same for MongoDB C driver. However when executing:

cmake -G "Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" "-DBSON_ROOT_DIR=C:\mongo-c-driver"

I got the following:

-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing:  OPENSSL_LIBRARIES) (found version "1.0.2j")
-- Searching for sasl/sasl.h
--   Not found (specify -DCMAKE_INCLUDE_PATH=C:/path/to/sasl/include for SASL support)
-- Searching for libsasl2
--   Not found (specify -DCMAKE_LIBRARY_PATH=C:/path/to/sasl/lib for SASL support)
Current version (from VERSION_CURRENT file): 1.6.0
-- Compiling against Windows SSPI
-- Configuring done
CMake Error at CMakeLists.txt:426 (add_library):
  Cannot find source file:
 
    C:/Mongo-driver/mongo-c-driver-1.6.0/src/mongoc/mongoc-cluster-sspi.c
 
  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx
 
CMake Error: CMake can not determine linker language for target: mongoc_shared
CMake Error: CMake can not determine linker language for target: mongoc_static
-- Generating done
-- Build files have been written to: C:/Mongo-driver/mongo-c-driver-1.6.0

And trying to build it in the VS ide, allproject linking failed with the error messages:

warning : The referenced project 'C:/Mongo-driver/mongo-c-driver-1.6.0/mongoc_shared.vcxproj' does not exist
LINK : fatal error LNK1104: cannot open file 'Debug\mongoc-1.0.lib'
LINK : fatal error LNK1104: cannot open file 'Debug\mongoc-static-1.0.lib'



 Comments   
Comment by Olivier Bertrand [X] [ 29/Mar/17 ]

Indeed I could compile, install and test the driver. Thanks.

Comment by A. Jesse Jiryu Davis [ 24/Mar/17 ]

On r1.6: https://github.com/mongodb/mongo-c-driver/commit/3c2a2dd37b2250d496fe4c95538e4072405dabf8

Comment by Hannes Magnusson [ 14/Mar/17 ]

Buggynours

Assuming you don't need to authenticate against kerberos, then the following will allow you to successfully compile and install the driver:

$ cmake -G "Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" "-DBSON_ROOT_DIR=C:\mongo-c-driver" -DENABLE_SASL:BOOL=OFF

Comment by Githook User [ 09/Mar/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: verify all C files are distributed

Catch mistakes like CDRIVER-2071.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/666007e9763c6a8a1ac939bb27c7fc416f154e90

Comment by Githook User [ 09/Mar/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-2071 distribute mongoc-sspi.c
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b5337c563da8c0cebbfc704cb90c743378271ff1

Comment by Githook User [ 09/Mar/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: verify all C files are distributed

Catch mistakes like CDRIVER-2071.
Branch: master
https://github.com/mongodb/libbson/commit/287c01f5a332479b8657415ccbce7394db4c3e4e

Comment by Olivier Bertrand [X] [ 09/Mar/17 ]

Can you tell me what I must do to reload and install this product?

Comment by A. Jesse Jiryu Davis [ 09/Mar/17 ]

I've added mongoc-cluster-sspi.c but not mongoc-sspi.c. We're not catching these kinds of errors because we build on Windows in Evergreen from source, not from the release tarball.

Comment by A. Jesse Jiryu Davis [ 02/Mar/17 ]

r1.6: https://github.com/mongodb/mongo-c-driver/commit/3aa053d2f428d878f5b21498c3fa2ab1d3a4a531

Comment by Githook User [ 02/Mar/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-2071 distribute mongoc-cluster-sspi.c
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2e6156afa8fa6234044ba010ead1158510816854

Comment by A. Jesse Jiryu Davis [ 25/Feb/17 ]

Hannes, can we update our Evergreen config to build on Windows from tarballs so we avoid mistakes like this?

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