<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:00:08 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-737] #include &quot;mongo/client/dbclient.h&quot; give boost error</title>
                <link>https://jira.mongodb.org/browse/CXX-737</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;Compile: g++ -Wall -std=c++11 -l boost_system -pthread -I mongo-client-install/include -L mongo-client-install/lib -l mongoclient -l boost_thread -l boost_regex main.cpp -o Lucy $(mysql_config --libs --cflags) 2&amp;gt;&amp;amp;1&lt;/p&gt;


&lt;p&gt;/tmp/ccHC5mIq.o: In function `__static_initialization_and_destruction_0&apos;:&lt;br/&gt;
/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()&apos;&lt;br/&gt;
/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()&apos;&lt;br/&gt;
/usr/include/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()&apos;&lt;br/&gt;
collect2: error: ld returned 1 exit status&lt;/p&gt;

&lt;p&gt;Anybody else getting message like the above? i came accross saying bosst haing a problem with ubuntu 14,04 is that true?&lt;/p&gt;</description>
                <environment></environment>
        <key id="238389">CXX-737</key>
            <summary>#include &quot;mongo/client/dbclient.h&quot; give boost error</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="4">Incomplete</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="fransiskuslukman@gmail.com">Fransiskus Lukman</reporter>
                        <labels>
                            <label>legacy-cxx</label>
                    </labels>
                <created>Mon, 9 Nov 2015 05:04:52 +0000</created>
                <updated>Fri, 20 Nov 2015 13:57:08 +0000</updated>
                            <resolved>Fri, 20 Nov 2015 13:56:36 +0000</resolved>
                                    <version>legacy-1.0.6</version>
                                                    <component>BSON</component>
                    <component>Build</component>
                    <component>Implementation</component>
                    <component>Testing</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1094181" author="acm" created="Fri, 20 Nov 2015 13:56:36 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=fransiskuslukman%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;fransiskuslukman@gmail.com&quot;&gt;fransiskuslukman@gmail.com&lt;/a&gt; - I&apos;m closing this since I&apos;ve not heard back from you. If you are still having difficulty linking with the driver, please feel free to comment on the ticket and we can re-open it.&lt;/p&gt;</comment>
                            <comment id="1088589" author="fransiskuslukman@gmail.com" created="Sat, 14 Nov 2015 05:53:01 +0000"  >&lt;p&gt;sure ill upload it&lt;/p&gt;</comment>
                            <comment id="1086654" author="acm" created="Thu, 12 Nov 2015 14:50:55 +0000"  >&lt;p&gt;Could you possibly provide a minimal compilable source file that fails to link for you? I&apos;d like to try to reproduce on my local system.&lt;/p&gt;</comment>
                            <comment id="1086648" author="acm" created="Thu, 12 Nov 2015 14:48:01 +0000"  >&lt;p&gt;I had overlooked that you already had boost _system on the build line, just at the beginning, so clearly that was not actually the issue.&lt;/p&gt;</comment>
                            <comment id="1084647" author="fransiskuslukman@gmail.com" created="Tue, 10 Nov 2015 18:38:33 +0000"  >&lt;p&gt;Andrew,&lt;br/&gt;
 I tried rebuilding with&lt;br/&gt;
g++ -Wall -std=c++11 -l boost_system -pthread -I mongo-client-install/include -L mongo-client-install/lib -l mongoclient -l boost_thread -l boost_regex -l boost_system main.cpp -o Lucy $(mysql_config --libs --cflags)&lt;/p&gt;

&lt;p&gt;still the same output of:&lt;br/&gt;
/tmp/ccS9fOwE.o: In function `__static_initialization_and_destruction_0&apos;:&lt;br/&gt;
/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()&apos;&lt;br/&gt;
/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()&apos;&lt;br/&gt;
/usr/include/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()&apos;&lt;br/&gt;
collect2: error: ld returned 1 exit status&lt;/p&gt;</comment>
                            <comment id="1084642" author="fransiskuslukman@gmail.com" created="Tue, 10 Nov 2015 18:35:34 +0000"  >&lt;p&gt;Andrew Morrow I have tried, i think boost don&apos;t install easily on Ubuntu 14.04&lt;/p&gt;

&lt;p&gt;I used sudo apt-get install libboost-all-dev &lt;br/&gt;
currently when i run:&lt;br/&gt;
scons --prefix=$HOME/mongo-client-install --ssl --use-sasl-client --sharedclient --extrapath=/usr/include/boost --c++11=on install&lt;/p&gt;

&lt;p&gt;This is the output:&lt;br/&gt;
scons: Reading SConscript files ...&lt;br/&gt;
scons version: 2.3.0&lt;br/&gt;
python version: 2 7 6 &apos;final&apos; 0&lt;br/&gt;
Checking whether the C++ compiler worksyes&lt;br/&gt;
Checking whether the C compiler worksyes&lt;br/&gt;
Checking if C++ compiler &quot;g++&quot; is GCC... yes&lt;br/&gt;
Checking if C compiler &quot;gcc&quot; is GCC... yes&lt;br/&gt;
Checking if C compiler supports -Wno-unused-local-typedefs... yes&lt;br/&gt;
Checking if C compiler supports -Wno-unused-function... yes&lt;br/&gt;
Checking if C compiler supports -Wno-unused-private-field... no&lt;br/&gt;
Checking if C compiler supports -Wno-deprecated-declarations... yes&lt;br/&gt;
Checking if C compiler supports -Wno-tautological-constant-out-of-range-compare.                                                                                        .. no&lt;br/&gt;
Checking if C compiler supports -Wno-unused-const-variable... no&lt;br/&gt;
Checking if C compiler supports -Wno-missing-braces... yes&lt;br/&gt;
Checking if we are using libstdc++... yes&lt;br/&gt;
Checking for libstdc++ 4.6.0 or better... yes&lt;br/&gt;
Checking if C++ compiler supports -std=c++11... yes&lt;br/&gt;
Checking if C compiler supports -std=c99... yes&lt;br/&gt;
Checking if we are on a POSIX system... yes&lt;br/&gt;
Checking if the POSIX monotonic clock is supported... yes&lt;br/&gt;
Checking for __thread... no&lt;br/&gt;
Checking for C++11 &amp;lt;atomic&amp;gt; support... no&lt;br/&gt;
Checking for gcc __atomic builtins... no&lt;br/&gt;
Checking for useable __sync builtins... no&lt;br/&gt;
Checking for C++11 is_trivially_copyable support... no&lt;br/&gt;
Checking for C++ header file boost/version.hpp... yes&lt;br/&gt;
Checking for C++ library boost_regex-mt... no&lt;br/&gt;
Checking for C++ library boost_regex... no&lt;br/&gt;
can&apos;t find boost&lt;/p&gt;

&lt;p&gt;is there a direction or suggestion for me?&lt;/p&gt;</comment>
                            <comment id="1084583" author="acm" created="Tue, 10 Nov 2015 17:43:17 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=fransiskuslukman%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;fransiskuslukman@gmail.com&quot;&gt;fransiskuslukman@gmail.com&lt;/a&gt; - Building with --config=force shouldn&apos;t ever cause a problem. Actually though, I think the solution might be much simpler: I think you need to add boost_system to your link line. Can you try building your application with :&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;g++ -Wall -std=c++11 -l boost_system -pthread -I mongo-client-install/include -L mongo-client-install/lib -l mongoclient -l boost_thread -l boost_regex -l boost_system main.cpp -o Lucy $(mysql_config --libs --cflags)&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;Also, please be aware that boost installed in /usr is most likely not built with C&amp;#43;&amp;#43;11. The current understanding of the C&amp;#43;&amp;#43; driver developers is that boost does not offer a stable ABI between C&amp;#43;&amp;#43;03 and C&amp;#43;&amp;#43;11 builds, so it is still something to look out for.&lt;/p&gt;</comment>
                            <comment id="1084578" author="fransiskuslukman@gmail.com" created="Tue, 10 Nov 2015 17:37:12 +0000"  >&lt;p&gt;Hi andrew,&lt;/p&gt;

&lt;p&gt;i build the scons with&lt;br/&gt;
scons --prefix=$HOME/mongo-client-install --ssl --sharedclient --c++11=on install&lt;/p&gt;

&lt;p&gt;i am currently making a fresh build on ubuntu 14.04 reinstalling because on the previous one i might have used --config=force&lt;/p&gt;</comment>
                            <comment id="1083289" author="acm" created="Mon, 9 Nov 2015 15:48:41 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=fransiskuslukman%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;fransiskuslukman@gmail.com&quot;&gt;fransiskuslukman@gmail.com&lt;/a&gt; - I see that you are building your application with C&amp;#43;&amp;#43;11. Did you build the mongo C&amp;#43;&amp;#43; driver with C&amp;#43;&amp;#43;11 enabled? Is the boost in /usr built with C&amp;#43;&amp;#43;11 (it usually is not). It is unfortunate, but boost does not offer a stable ABI between C&amp;#43;&amp;#43;03 and C&amp;#43;&amp;#43;11 builds of the library. As a result, all of your application, the driver, and boost must be consistently built with either C&amp;#43;&amp;#43;03 or C&amp;#43;&amp;#43;11.&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|hrdwmv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="723">Platform C (11/20/15)</customfieldvalue>
    <customfieldvalue id="756">Platform D (12/11/15)</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>