<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:58:17 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CXX-128] Sconscript does not respect Boost naming conventions on Windows</title>
                <link>https://jira.mongodb.org/browse/CXX-128</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;The Boost pre-built binaries include metadata in the library filenames that Scons does not recognize.  For example:  libboost_system-vc110-mt-sgd-1_53.lib.  But the Sconscript looks for boost_system-mt.lib.  Needless to say, the Sconscript does not find them:&lt;/p&gt;

&lt;p&gt;Checking for C++ library boost_thread-mt... no&lt;br/&gt;
Checking for C++ library boost_thread... no&lt;br/&gt;
Checking for C++ library boost_filesystem-mt... no&lt;br/&gt;
Checking for C++ library boost_filesystem... no&lt;br/&gt;
Checking for C++ library boost_program_options-mt... no&lt;br/&gt;
Checking for C++ library boost_program_options... no&lt;br/&gt;
Checking for C++ library boost_system-mt... no&lt;br/&gt;
Checking for C++ library boost_system... no&lt;/p&gt;

&lt;p&gt;Yes, the boost libraries can be built in a way that doesn&#8217;t include the extra metadata (or they can be manually renamed).  However, given that the MongoDB C++ Driver depends on Boost, it would make more sense to conform to the naming that Boost provides.  The Boost headers themselves are designed to properly link to the correct lib file with full metadata in the filename.  Furthermore, the reduced names can lead to build issues due to simple human error of pointing to a lib file that does not exactly match the build context (debug/release and dynamic/static).  The extra metadata in the name ensures the correct lib file is selected.&lt;/p&gt;

&lt;p&gt;While the &#8220;sgd&#8221; portion of the Boost lib filename can be deduced from options like --static and --dbg:on, the &#8220;vc110&#8221; and &#8220;1_53&#8221; portions could be specified as new program options to the Sconscript.&lt;/p&gt;

&lt;p&gt;Furthermore, when the --static flag is specified, the Sconscript still appears to look for boost_system-mt (the dynamic version of the lib) yet it should be looking for, libboost_system-mt (the static version of the lib).  That is, fully static should really be fully static.&lt;/p&gt;</description>
                <environment>Windows 7, 64-bit, Visual Studio 2012, Visual Studio 2010</environment>
        <key id="118977">CXX-128</key>
            <summary>Sconscript does not respect Boost naming conventions on Windows</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="james.coulter">James Coulter</reporter>
                        <labels>
                            <label>legacy-cxx</label>
                            <label>windows</label>
                    </labels>
                <created>Sun, 9 Mar 2014 19:41:57 +0000</created>
                <updated>Wed, 23 Apr 2014 16:01:12 +0000</updated>
                            <resolved>Wed, 23 Apr 2014 16:01:12 +0000</resolved>
                                    <version>legacy-0.0-26compat-2.6.0-rc1</version>
                                    <fixVersion>legacy-0.8.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="559112" author="acm" created="Tue, 22 Apr 2014 17:38:54 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=james.coulter&quot; class=&quot;user-hover&quot; rel=&quot;james.coulter&quot;&gt;james.coulter&lt;/a&gt; -&lt;/p&gt;

&lt;p&gt;Is there anything else we can do for you in relation to this ticket? If not I would like to close it. You can always re-open it if needed.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Andrew&lt;/p&gt;</comment>
                            <comment id="520593" author="james.coulter" created="Fri, 21 Mar 2014 05:32:16 +0000"  >&lt;p&gt;Thanks again for all the helpful info.  I will give the new fixes for static builds a try.  I really like the new direction for the C++ driver.  Keep up the great work!&lt;/p&gt;</comment>
                            <comment id="517613" author="acm" created="Mon, 17 Mar 2014 18:06:04 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=james.coulter&quot; class=&quot;user-hover&quot; rel=&quot;james.coulter&quot;&gt;james.coulter&lt;/a&gt; A few comments in addition to what Eric mentioned above:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;We have just recently fixed the ability to use the static archive on windows in the 26compat branch. The fix is available in the 26compat RC1 release.&lt;/li&gt;
	&lt;li&gt;If you intend to consume the static library you should build the consuming application with STATIC_LIBMONGOCLIENT defined to suppress the import/export macros.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="517591" author="milkie" created="Mon, 17 Mar 2014 17:44:45 +0000"  >&lt;p&gt;At the moment, the static C++ driver library does not correctly work on Windows, as there is no ability with MS LINK to reproduce the behavior of the --whole-archive Unix ld option.  We&apos;re working on possible solutions to this.&lt;/p&gt;

&lt;p&gt;The --variant-dir flag allows you to explicitly set SCons&apos; VariantDir explicitly, rather than have it build the path dynamically from the arguments passed to scons.  Because we are passing so many arguments for this particular build, the dynamically built variant directory name ends up being longer than the longest allowed pathname on Windows, so we must override it to be something shorter.  (For an illustration of this, try omitting the --variant-dir=m flag.)&lt;/p&gt;

&lt;p&gt;We are also working on a better functioning macro to remove the declspec() calls when compiling with /MT&lt;span class=&quot;error&quot;&gt;&amp;#91;d&amp;#93;&lt;/span&gt;.&lt;/p&gt;</comment>
                            <comment id="516644" author="james.coulter" created="Fri, 14 Mar 2014 23:45:48 +0000"  >&lt;p&gt;Indeed, despite the sconscript reporting that it does not find the boost libs, it does appear to link correctly if the --libpath is set.  I was able to get both 64-bit release and debug builds to work, but only for dynamic linking /MD or /MDd using mongoclient.lib and mongoclient.dll, with the help of your suggestions:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;scons --64 -j 3 --sharedclient --dynamic-windows --release --full  --win-version-min=win7  --prefix=C:\Dev_Sources\Mongo\mongo_client\legacy --use-system-boost --cpppath=C:\local\boost_1_53_0 --libpath=C:\local\boost_1_53_0\lib64-msvc-11.0 --variant-dir=m install-mongoclient&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;What exactly does the --variant flag accomplish?  I could not find a clear explanation for that in the docs.  Also, there is some weirdness with the debug build where, in my console output, I see some debug warnings:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;_DEBUG warning trying to lock a mongo::mutex during static shutdown&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;Although, despite these warnings, everything seems to work fine.  At least now I can work on the actual application using the successful builds and play with scons settings in the background.  Hurrah!&lt;/p&gt;

&lt;p&gt;I&apos;d really like to have /MT and /MTd. but whenever I try to link against libmongoclient.lib, I get link errors along the lines of:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;DriverTest.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: __cdecl mongo::DBClientConnection::DBClientConnection(bool,class mongo::DBClientReplicaSet *,double)&quot; (__imp_??0DBClientConnection@mongo@@QEAA@_NPEAVDBClientReplicaSet@1@N@Z) referenced in function &quot;void __cdecl run(void)&quot; (?run@@YAXXZ)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;If anyone has been successful with fully static linking, I&apos;d appreciate any tips on how you did it.  I&apos;ve tried many combinations of settings.&lt;/p&gt;</comment>
                            <comment id="513075" author="james.coulter" created="Tue, 11 Mar 2014 02:21:21 +0000"  >&lt;p&gt;Thanks Eric and Kaloian for this helpful information.  I will do some additional tests as soon as time permits.  My preference is to build a fully static client lib so that no DLLs are required (neither Boost nor a mongoclient.dll), if possible.&lt;/p&gt;</comment>
                            <comment id="512474" author="kaloian.manassiev" created="Mon, 10 Mar 2014 14:57:00 +0000"  >&lt;p&gt;FYI, you could use the following command line as a sample of how to build the C++ client:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;scons --64 -j 4 --sharedclient --dynamic-windows --release --full --prefix=&amp;lt;path to place the binaries&amp;gt; --use-system-boost --cpppath=&amp;lt;boost root&amp;gt; --libpath=&amp;lt;boost root&amp;gt;\lib64-msvc-[10|11|12].0 --variant-dir=m install-mongoclient&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="512464" author="milkie" created="Mon, 10 Mar 2014 14:44:48 +0000"  >&lt;p&gt;The filenames are leftover from when the build used the vendorized Boost that came included in the source tree.  Building the driver this way was problematic, of course.  The recommended way to build the driver is to --use-system-boost, which on Windows will do the right thing and use Boost&apos;s auto-linking support.  As part of the new C++ driver development, I believe it will be changed to default to using the system installed Boost and you will no longer have to specify it on the build command line.  &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrwmpr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>104454</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>