<!-- 
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-127] OID::init and mongo::jsTime unresolved in shared client (.so)</title>
                <link>https://jira.mongodb.org/browse/CXX-127</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;Building an application with the shared client leaves all the symbols from OID.cpp unresolved. Not sure where mongo::jsTime() is defined, but that is also unresolved for my build. I am using the git tag for legacy-0.0=26compat-2.6.0-rc1, but the same also happens for the legacy branch.&lt;/p&gt;

&lt;p&gt;When linking with the static library, I do not see this behaviour.&lt;/p&gt;</description>
                <environment>Linux 3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:52:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux&lt;br/&gt;
&lt;br/&gt;
sudo scons -j 4 --ssl --sharedclient --use-system-boost --extrapath=/usr/local --full</environment>
        <key id="118965">CXX-127</key>
            <summary>OID::init and mongo::jsTime unresolved in shared client (.so)</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="climax">Pieter Willem Jordaan</reporter>
                        <labels>
                            <label>legacy-cxx</label>
                    </labels>
                <created>Sun, 9 Mar 2014 13:46:59 +0000</created>
                <updated>Thu, 10 Apr 2014 18:05:45 +0000</updated>
                            <resolved>Tue, 11 Mar 2014 17:39:05 +0000</resolved>
                                    <version>legacy-0.0-26compat-2.6.0-rc1</version>
                                    <fixVersion>legacy-0.0-26compat-2.6.0-rc2</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="514314" author="jason.carey" created="Wed, 12 Mar 2014 17:14:44 +0000"  >&lt;p&gt;Found some evidence for a long time bug with MSVC (you can&apos;t have multiple static variables declared in a single statement in a class with dllimport or dllexport)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://support.microsoft.com/kb/127900&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://support.microsoft.com/kb/127900&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="514287" author="xgen-internal-githook" created="Wed, 12 Mar 2014 16:49:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-127&quot; title=&quot;OID::init and mongo::jsTime unresolved in shared client (.so)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-127&quot;&gt;&lt;del&gt;CXX-127&lt;/del&gt;&lt;/a&gt; Work around C2487 error with MSVC&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/014bb985eec5b7e8b5826f7cc54237502bb268b3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/014bb985eec5b7e8b5826f7cc54237502bb268b3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="512881" author="acm" created="Mon, 10 Mar 2014 21:27:03 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/18&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/18&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="512746" author="acm" created="Mon, 10 Mar 2014 18:24:56 +0000"  >&lt;p&gt;Thanks, we will be sure to pick up the OID stream operator when we apply export macros in oid.h. &lt;/p&gt;</comment>
                            <comment id="512743" author="climax" created="Mon, 10 Mar 2014 18:20:57 +0000"  >&lt;p&gt;Thank you, I am looking forward to the fix. I have one more symbol: undefined reference to `mongo::operator&amp;lt;&amp;lt;(std::ostream&amp;amp;, mongo::OID const&amp;amp;)&apos;. This will fix it for me, but as you mentioned, there may be others as well which could cause unresolved symbols.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="512732" author="acm" created="Mon, 10 Mar 2014 18:08:18 +0000"  >&lt;p&gt;Hi Pieter- &lt;/p&gt;

&lt;p&gt;Yes, the object files contain the symbols, but the symbols have not had _&lt;em&gt;attribute&lt;/em&gt;_((visibility(&quot;default&quot;))) (or the windows equivalent) applied to them as they should, so they cannot be used by consumers of the shared library which is built so that symbols default to being hidden (-fvisibility=hidden).&lt;/p&gt;

&lt;p&gt;We will add the necessary MONGO_CLIENT_API macros to the symbols you identified for rc2 which will make them available. It works in the static library because symbol visibility is not in play.&lt;/p&gt;

&lt;p&gt;There are likely to be other instances of this same problem, so if you encounter any please do not hesitate to file tickets.&lt;/p&gt;</comment>
                            <comment id="512716" author="climax" created="Mon, 10 Mar 2014 17:59:23 +0000"  >&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;mongo::OID packet_oid;&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;packet_oid.init();&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;This snippet brings the OID::init symbol problem. The jsTime symbol comes from the usage of the label. The symbol is defined in time_support.cpp&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;mongo::DATENOW&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 strikes me baffled is that the object files after the build contain the symbols. The static library (.a) contains them as well (as it is the archive of all the object files). The .so, however, does not contain those symbols.&lt;/p&gt;

&lt;p&gt;I am willing to help with debugging and testing&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|hrwmn3:</customfieldvalue>

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