[SERVER-3331] building of the standalone c++ driver from source tarball fails on windows Created: 24/Jun/11  Updated: 19/May/14  Resolved: 11/Sep/13

Status: Closed
Project: Core Server
Component/s: Build, Internal Client
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sridhar Nanjundeswaran Assignee: Andrew Morrow (Inactive)
Resolution: Won't Fix Votes: 0
Labels: Windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

win7 x64 with Visual Studio 2010 python 2.7.2


Issue Links:
Related
is related to SERVER-9766 Remove C++ driver client tarball and ... Closed
Operating System: ALL
Participants:

 Description   

Building the core db from the same environment works and so does building just the driver using scons mongoclient

scons: Reading SConscript files ...
boost found at 'C:/boost'
Checking for C library boost_thread-mt... (cached) no
Checking for C library boost_thread... (cached) no
Checking for C library boost_filesystem-mt... (cached) no
Checking for C library boost_filesystem... (cached) no
Checking for C library boost_system-mt... (cached) no
Checking for C library boost_system... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
cl /Foclient\examples\authTest.obj /c client\examples\authTest.cpp /nologo /TP /
nologo /D_SCONS /DMONGO_EXPOSE_MACROS /Imongo
authTest.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xlocale(323) : wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled. S
pecify /EHsc
c:\source\mongo-cxx-driver-v1.8\mongo\client\../pch.h(72) : fatal error C1083: C
annot open include file: 'boost/any.hpp': No such file or directory
scons: *** [client\examples\authTest.obj] Error 2
scons: building terminated because of errors.



 Comments   
Comment by Andrew Morrow (Inactive) [ 11/Sep/13 ]

For the 2.5/2.6 release cycle we are eliminating the separate C++ driver tarball in favor of building the driver from the full mongodb sources, since this enables several driver build options that the tarball did not offer.

Please see SERVER-9766 for additional details.

Since we have removed the client tarball, this ticket is obsoleted, so I'm closing it as won't fix.

Comment by Andrew Morrow (Inactive) [ 09/Jul/13 ]

Here are some (somewhat dated) notes on building the driver on Windows: http://grokbase.com/t/gg/mongodb-user/128tmfjfdj/how-i-installed-the-windows-7-64x-c-driver-mongodb-to-work-with-visual-studio-2010

Comment by Ian Whalen (Inactive) [ 17/May/12 ]

lots of improvements made; still more work to do.

Comment by auto [ 13/Apr/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-3331: Fix log.cpp on Windows to compile when LPTSTR is a char , not a wchar.

When building the C++ driver, log.cpp is compiled with LPTSTR === LPCSTR, not LPWSTR.
This uses the W-form of the Windows system calls as appropriate.
Branch: master
https://github.com/mongodb/mongo/commit/458ef44a0812dc5bbe893642ed3f50d92f274751

Comment by auto [ 13/Apr/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-3331: On Windows, build the client driver, even if you cannot find the boost libraries.

Boost headers provide information that MSVC can use to find the correct version of boost libraries,
so it does not matter if SCons cannot find the libraries. Build anyways.
Branch: master
https://github.com/mongodb/mongo/commit/c6bc7907749ac7dc849607addd144647cd4dca89

Comment by auto [ 03/Apr/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-3331: Changes to the client SConstruct to improve windows building.
Branch: master
https://github.com/mongodb/mongo/commit/b099fd4ba8c01742ae367979531e6774f0ff19c7

Comment by Balint Szente [ 09/Nov/11 ]

Indeed, the standalone C++ client cannot be built on Windows. The SConstruct file lacks the Windows related parts. You should use the full source tarball, and compile only the mongoclient target. You must link your application dynamically with boost, for details check issue SERVER-4234.

Alternatively if you want a shared client, you must apply the patch from issue SERVER-3364.

Comment by Spencer Brody (Inactive) [ 06/Oct/11 ]

I suspect that this has never actually worked. Comparing the SConstruct in the main mongo source to the SConstruct in the stand-only c++ driver source, the mongo SConstruct has a ton of logic for locating the boost libraries in windows (as well as doing a bunch of other windows-specific stuff), none of which exists in the client SConstruct.

Comment by Eliot Horowitz (Inactive) [ 24/Jun/11 ]

scons file is in distsrc/client/

Generated at Thu Feb 08 03:02:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.