<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:02:54 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-1513] Can I use mongocxx 3.1.3 and MongoDB 3.4 with 32-bit software?</title>
                <link>https://jira.mongodb.org/browse/CXX-1513</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;I have some code that I compile using the -m32 option with g+&lt;ins&gt;. The software is 32-bit so it needs to be compiled as such. I want to integrate MongoDB and the Mongo C&lt;/ins&gt;+ driver with this code.&lt;/p&gt;

&lt;p&gt;When I compile my code I get errors like this:&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;   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;/usr/bin/ld: skipping incompatible /usr/local/lib/libmongocxx.so when searching for -lmongocxx&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;/usr/bin/ld: skipping incompatible /usr/local/lib/libmongocxx.a when searching for -lmongocxx&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;/usr/bin/ld: skipping incompatible /usr/local/lib/libmongocxx.so when searching for -lmongocxx&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;/usr/bin/ld: skipping incompatible /usr/local/lib/libmongocxx.a when searching for -lmongocxx&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;/usr/bin/ld: cannot find -lmongocxx&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;/usr/bin/ld: skipping incompatible /usr/local/lib/libbsoncxx.so when searching for -lbsoncxx&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;/usr/bin/ld: skipping incompatible /usr/local/lib/libbsoncxx.a when searching for -lbsoncxx&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;/usr/bin/ld: skipping incompatible /usr/local/lib/libbsoncxx.so when searching for -lbsoncxx&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;/usr/bin/ld: skipping incompatible /usr/local/lib/libbsoncxx.a when searching for -lbsoncxx&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;/usr/bin/ld: cannot find -lbsoncxx&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;I have been able to successfully use the C++ driver to write programs that I didn&apos;t compile with the -m32 option, but is there a workaround to using C++ driver 3.1.3 and MongoDB 3.4 with 32-bit compilation?&lt;/p&gt;

&lt;p&gt;Or do I have to use an older version of MongoDB and the legacy C++ driver?&lt;/p&gt;</description>
                <environment>x86_64 machine with VMWare/CentOS 7.4 and MongoDB 3.4, Mongo C++ driver 3.1.3 installed</environment>
        <key id="495674">CXX-1513</key>
            <summary>Can I use mongocxx 3.1.3 and MongoDB 3.4 with 32-bit software?</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="13202">Works as Designed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="adwaitl">Adwait Lele</reporter>
                        <labels>
                            <label>32-bit</label>
                            <label>compatability</label>
                    </labels>
                <created>Fri, 9 Feb 2018 16:37:58 +0000</created>
                <updated>Fri, 27 Oct 2023 13:13:43 +0000</updated>
                            <resolved>Thu, 1 Mar 2018 19:14:56 +0000</resolved>
                                    <version>3.1.3</version>
                                                    <component>BSON</component>
                    <component>Build</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1820150" author="adwaitl" created="Thu, 1 Mar 2018 18:44:37 +0000"  >&lt;p&gt;I think you can close this issue for now.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Adwait&lt;/p&gt;</comment>
                            <comment id="1819932" author="acm" created="Thu, 1 Mar 2018 16:28:54 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=adwaitl&quot; class=&quot;user-hover&quot; rel=&quot;adwaitl&quot;&gt;adwaitl&lt;/a&gt; - Is there any additional assistance we can provide?&lt;/p&gt;</comment>
                            <comment id="1810889" author="jesse" created="Tue, 20 Feb 2018 21:22:32 +0000"  >&lt;p&gt;Hi, to compile libbson and libmongoc in 32-bit mode, I suggest:&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;   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;export CFLAGS=&quot;-m32 -march=i386&quot;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;./configure&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;make&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;sudo make install&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="1810240" author="adwaitl" created="Tue, 20 Feb 2018 15:50:07 +0000"  >&lt;p&gt;Any idea about this?^&lt;/p&gt;</comment>
                            <comment id="1802884" author="adwaitl" created="Mon, 12 Feb 2018 16:05:20 +0000"  >&lt;p&gt;How do I compile the C driver and libbson in 32-bit mode? Like I mentioned previously I used the &lt;em&gt;Building from a release tarball&lt;/em&gt; section from here (&lt;a href=&quot;http://mongoc.org/libmongoc/current/installing.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/installing.html&lt;/a&gt;) to install the C driver and libbson.&lt;/p&gt;

&lt;p&gt;The Makefile is 5700 lines long - what places would I indicate the -m32 flag?&lt;/p&gt;</comment>
                            <comment id="1801100" author="acm" created="Fri, 9 Feb 2018 17:57:41 +0000"  >&lt;p&gt;You should just be able to compile with the new flags, it should overwrite any changed files for both C and C++ drivers.&lt;/p&gt;</comment>
                            <comment id="1801051" author="adwaitl" created="Fri, 9 Feb 2018 17:36:15 +0000"  >&lt;p&gt;Yes you are correct. Not the server source code. I just want to integrate the C++ driver into the 32-bit code.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;If I already have a 64-bit &quot;build&quot; of libmongoc and libbson on my machine, do I have to clean anything up or can I just compile it using make with the -m32 option? I used the &lt;em&gt;Building from a release tarball&lt;/em&gt; section here (&lt;a href=&quot;http://mongoc.org/libmongoc/current/installing.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/installing.html&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;Same question for the C++ driver. I assume I can just run the CMake in the Mongo C++ Driver directory with right flags for 32-bit compilation. No need to do any &quot;cleanup&quot;.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I&apos;ll take a look at the CMake documentation.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                            <comment id="1801005" author="acm" created="Fri, 9 Feb 2018 17:06:42 +0000"  >&lt;p&gt;Just to clarify, when you say &quot;want to integrate MongoDB and the Mongo C++ driver with this code&quot;, you really mean just the C++ driver right? Not the server source code? As written it is a little unclear. But I&apos;m going to reply assuming that you really mean that you want to integrate the C++ driver into your 32-bit code so that you can talk to a remote MongoDB server.&lt;/p&gt;

&lt;p&gt;As far as I know, there is no reason that the driver will not work in 32-bit mode. You will however, need to compile it (and the C driver and libbson) in 32-bit mode as well. You will need to pass the -m32 flag into the C driver build when using autotools or CMake, and into the C++ driver when using CMake. For CMake you can do this by using the &lt;tt&gt;CMAKE_C_FLAGS&lt;/tt&gt; and &lt;tt&gt;CMAKE_CXX_FLAGS&lt;/tt&gt; to incorporate the &lt;tt&gt;-m32&lt;/tt&gt; flag into the compiler invocations used when building the drivers. Please consult the CMake documentation for more details on how to do this.&lt;/p&gt;</comment>
                            <comment id="1800949" author="adwaitl" created="Fri, 9 Feb 2018 16:42:35 +0000"  >&lt;p&gt;In the description, the first sentence should say:&lt;/p&gt;

&lt;p&gt;I have some code that I compile using the -m32 option with g+&amp;#43;. The software is 32-bit so it needs to be compiled as such. I want to integrate MongoDB and the Mongo C+&amp;#43; driver with this code.&lt;/p&gt;

&lt;p&gt;I forgot that JIRA uses &quot;+&quot; to format underlines.&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|hthidr:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>