<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:08:14 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>[MONGOCRYPT-217] Hide libbson symbols in libmongocrypt</title>
                <link>https://jira.mongodb.org/browse/MONGOCRYPT-217</link>
                <project id="17481" key="MONGOCRYPT">Libmongocrypt</project>
                    <description>&lt;p&gt;The current approach to building libmongocrypt statically links it to libbson.  However, this creates problems for users who link their applications to both libmongocrypt and also directly to libbson.  The problems result from potential symbol collisions between the libbson symbols which are in libmongocrypt via the static linking and the libbson symbols from the attempt to link directly to libbson.&lt;/p&gt;

&lt;p&gt;The solution is to switch libmongocrypt to dynamically link to libbson.  However, to prevent collisions with files which might be installed by the libbson package included in various distribution repositories, the libbson used by libmongocrypt must be located in a private subdirectory (e.g., &lt;tt&gt;/usr/lib/mongocrypt&lt;/tt&gt;) and linkage from libmongocrypt to that particular libbson will need to be managed with &lt;tt&gt;rpath&lt;/tt&gt;.  Additionally, the libbson to which libmongocrypt links will need to be added to the libmongocrypt package which is provided via the PPA.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=divjot.arora&quot; class=&quot;user-hover&quot; rel=&quot;divjot.arora&quot;&gt;divjot.arora&lt;/a&gt;, could you take a look at what is proposed here and let me know if you think it might negatively affect the Go driver?&lt;/p&gt;

&lt;p&gt;CC: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kevin.albertson&quot; class=&quot;user-hover&quot; rel=&quot;kevin.albertson&quot;&gt;kevin.albertson&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1047453">MONGOCRYPT-217</key>
            <summary>Hide libbson symbols in libmongocrypt</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="13201">Fixed</resolution>
                                        <assignee username="kevin.albertson@mongodb.com">Kevin Albertson</assignee>
                                    <reporter username="roberto.sanchez@mongodb.com">Roberto Sanchez</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 Dec 2019 23:21:56 +0000</created>
                <updated>Sat, 28 Oct 2023 10:25:24 +0000</updated>
                            <resolved>Wed, 8 Jan 2020 14:07:19 +0000</resolved>
                                                    <fixVersion>1.0.1</fixVersion>
                                    <component>Build</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2698374" author="xgen-internal-githook" created="Thu, 2 Jan 2020 15:04:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Kevin Albertson&apos;, &apos;email&apos;: &apos;kevin.albertson@mongodb.com&apos;, &apos;username&apos;: &apos;kevinAlbs&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/MONGOCRYPT-217&quot; title=&quot;Hide libbson symbols in libmongocrypt&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MONGOCRYPT-217&quot;&gt;&lt;del&gt;MONGOCRYPT-217&lt;/del&gt;&lt;/a&gt; hide and version libbson symbols&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;on macOS hide libbson symbols with -unexported_symbols_list&lt;/li&gt;
	&lt;li&gt;on Linux, hide and version libbson symbols with --version-script&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Hiding the libbson symbols prevents external libraries from using them.&lt;br/&gt;
Versioning the libbson symbols prevents (on Linux) libmongocrypt from&lt;br/&gt;
finding matching libbson symbols exposed from external libraries. On&lt;br/&gt;
macOS, versioning does not appear necessary as libmongocrypt always&lt;br/&gt;
appears to use the statically linked libbson symbols.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libmongocrypt/commit/217072a3f089820e9690ff03d3394c42d1d4cd20&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/commit/217072a3f089820e9690ff03d3394c42d1d4cd20&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2602637" author="kevin.albertson" created="Thu, 12 Dec 2019 21:03:27 +0000"  >&lt;p&gt;Per discussion, let&apos;s flesh out the options in WRITING-4771 so we&apos;re all in agreement.&lt;/p&gt;</comment>
                            <comment id="2602446" author="roberto.sanchez" created="Thu, 12 Dec 2019 19:54:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jmikola&quot; class=&quot;user-hover&quot; rel=&quot;jmikola&quot;&gt;jmikola&lt;/a&gt;, we could, but it would introduce the potential for future complications.&#160; All we really want is a dynamically linked private libbson for use by libmongocrypt.&#160; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kevin.albertson&quot; class=&quot;user-hover&quot; rel=&quot;kevin.albertson&quot;&gt;kevin.albertson&lt;/a&gt; and I discussed this and if we provide a libbson package then we have consider alternate naming, conflicts with distro-provided libbson packages, etc.&#160; We can avoid that by just shipping the libbson artifact in a subdirectory of /usr/lib (which is the convention for private libraries) and achieve our objective without the complications.&lt;/p&gt;</comment>
                            <comment id="2602219" author="jmikola@gmail.com" created="Thu, 12 Dec 2019 18:17:36 +0000"  >&lt;blockquote&gt;&lt;p&gt;Additionally, the libbson to which libmongocrypt links will need to be added to the libmongocrypt package which is provided via the PPA.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Can we consider making a separate libbson package and declaring the dependency in the libmongocrypt package? As far as PPAs are concerned, I don&apos;t see why this would conflict. Using Ubuntu PHP packages as example, there are PPAs that provide newer builds of PHP binaries with newer version numbers than the equivalently named packages in the main Ubuntu repos &amp;#8211; and I don&apos;t believe there&apos;s any issue with these co-existing.&lt;/p&gt;</comment>
                            <comment id="2598727" author="kevin.albertson" created="Wed, 11 Dec 2019 14:34:05 +0000"  >&lt;p&gt;Right, this should not make any change to the output of pkg-config. Internally libmongocrypt will no longer contain libbson symbols, but rather have a link to a shared libbson library that it would not expose directly. Off-hand I don&apos;t foresee any issues. I don&apos;t think users will need to recompile their applications if they&apos;ve upgraded libmongocrypt. But we should certainly dry-run this, and for libmongoc too. We can do an rc release (or manually upload packages) to a different location and test them before we overwrite the production packages in a real release.&lt;/p&gt;</comment>
                            <comment id="2598704" author="divjot.arora" created="Wed, 11 Dec 2019 14:16:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=roberto.sanchez&quot; class=&quot;user-hover&quot; rel=&quot;roberto.sanchez&quot;&gt;roberto.sanchez&lt;/a&gt;&#160;I don&apos;t&#160;&lt;b&gt;think&lt;/b&gt; this should cause any issues for Go. From what you&apos;re saying, it sounds like the new linking process is more complex than the current one, but it will all be managed by the PPA, correct?&lt;/p&gt;

&lt;p&gt;However, I&apos;m not at all certain about this and the Go driver is currently building from source on Ubuntu machines in Evergreen because we were seeing transient apt issues, so we wouldn&apos;t know if this actually works. Is it possible to &quot;dry-run&quot; this (e.g. test with the Go driver before releasing)?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </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|hvy6ov:</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>