<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:08:35 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-390] Build errors compiling PHP driver with bundled libmongocrypt 1.3.1 on Windows</title>
                <link>https://jira.mongodb.org/browse/MONGOCRYPT-390</link>
                <project id="17481" key="MONGOCRYPT">Libmongocrypt</project>
                    <description>&lt;p&gt;I observed several build errors (see: &lt;a href=&quot;https://ci.appveyor.com/project/jmikola/mongo-php-driver/builds/42767142/job/etgesv9thgr842dl#L449&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;AppVeyor task log&lt;/a&gt;) compiling PHPC with bundled libmongocrypt 1.3.1. An abridged log is below:&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;C:\projects\mongodb\src\libmongocrypt\src\mlib/thread.h(81): error C2440: &apos;function&apos;: cannot convert from &apos;BOOL (__cdecl *)(INIT_ONCE *,void *,void *)&apos; to &apos;PINIT_ONCE_FN&apos; (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt-util.c)&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;C:\projects\mongodb\src\libmongocrypt\src\mlib/thread.h(81): warning C4024: &apos;InitOnceExecuteOnce&apos;: different types for formal and actual parameter 2 (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt-util.c)&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;C:\projects\mongodb\src\libmongocrypt\src\mlib/thread.h(81): error C2440: &apos;function&apos;: cannot convert from &apos;BOOL (__cdecl *)(INIT_ONCE *,void *,void *)&apos; to &apos;PINIT_ONCE_FN&apos; (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\projects\mongodb\src\libmongocrypt\src\mlib/thread.h(81): warning C4024: &apos;InitOnceExecuteOnce&apos;: different types for formal and actual parameter 2 (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(103): warning C4005: &apos;AF_IPX&apos;: macro redefinition (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(457): note: see previous definition of &apos;AF_IPX&apos; (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(147): warning C4005: &apos;AF_MAX&apos;: macro redefinition (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(476): note: see previous definition of &apos;AF_MAX&apos; (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(187): warning C4005: &apos;SO_DONTLINGER&apos;: macro redefinition (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(399): note: see previous definition of &apos;SO_DONTLINGER&apos; (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(240): error C2011: &apos;sockaddr&apos;: &apos;struct&apos; type redefinition (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(482): note: see declaration of &apos;sockaddr&apos; (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2059: syntax error: &apos;constant&apos; (compiling source file C:\projects\mongodb\src\libmongocrypt\src\mongocrypt.c)&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;The errors in &lt;tt&gt;mlib/thread.h&lt;/tt&gt; stand out, but there are also many errors/warnings due to redefined macros and symbols. It&apos;s not clear to me if the issue is caused by our build environment or libmongocrypt directly, but I&apos;ll note that previous builds of libmongocrypt 1.3.0 had no issues (see: &lt;a href=&quot;https://ci.appveyor.com/project/jmikola/mongo-php-driver/builds/42762822/job/aeqqe43nkdqw5kfs?fullLog=true#L424e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;task log&lt;/a&gt;). The current errors appear throughout our CI matrix, which includes VS16 (PHP 8.0+) and VS15 (PHP 7.x).&lt;/p&gt;</description>
                <environment></environment>
        <key id="1993515">MONGOCRYPT-390</key>
            <summary>Build errors compiling PHP driver with bundled libmongocrypt 1.3.1 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="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="colby.pike@mongodb.com">Colby Pike</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Mar 2022 23:12:42 +0000</created>
                <updated>Sat, 28 Oct 2023 10:25:39 +0000</updated>
                            <resolved>Wed, 9 Mar 2022 23:19:09 +0000</resolved>
                                    <version>1.3.1</version>
                                    <fixVersion>1.3.2</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="4420909" author="xgen-internal-githook" created="Fri, 18 Mar 2022 15:27:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;vector-of-bool&apos;, &apos;email&apos;: &apos;vectorofbool@gmail.com&apos;, &apos;username&apos;: &apos;vector-of-bool&apos;}
&lt;p&gt;Message: No global WIN32_LEAN_AND_MEAN required. &lt;span class=&quot;error&quot;&gt;&amp;#91;Fix MONGOCRYPT-390&amp;#93;&lt;/span&gt; (#258)&lt;br/&gt;
Branch: r1.3&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libmongocrypt/commit/64e75583ce71094315e3a0ba0785ff394656c360&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/commit/64e75583ce71094315e3a0ba0785ff394656c360&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4402449" author="JIRAUSER1260880" created="Wed, 9 Mar 2022 23:19:09 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/mongodb/libmongocrypt/pull/256&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/pull/256&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/libmongocrypt/pull/258&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/pull/258&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4392536" author="xgen-internal-githook" created="Fri, 4 Mar 2022 20:53:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;vector-of-bool&apos;, &apos;email&apos;: &apos;vectorofbool@gmail.com&apos;, &apos;username&apos;: &apos;vector-of-bool&apos;}
&lt;p&gt;Message: No global WIN32_LEAN_AND_MEAN required. &lt;span class=&quot;error&quot;&gt;&amp;#91;Fix MONGOCRYPT-390&amp;#93;&lt;/span&gt; (#258)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libmongocrypt/commit/fb853ed4b3d1fc911f9533adba3ee6490e209000&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/commit/fb853ed4b3d1fc911f9533adba3ee6490e209000&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4392301" author="jmikola@gmail.com" created="Fri, 4 Mar 2022 19:14:16 +0000"  >&lt;blockquote&gt;&lt;p&gt;and PHPC can sort out the other errors by defining WIN32_LEAN_AND_MEAN during compilation of bundled libmongocrypt sources.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;It turns out this wasn&apos;t feasible to address in PHPC, as defining &lt;tt&gt;WIN32_LEAN_AND_MEAN&lt;/tt&gt; globally introduced other issues.&lt;/p&gt;

&lt;p&gt;Subsequent PR: &lt;a href=&quot;https://github.com/mongodb/libmongocrypt/pull/258&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/pull/258&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4390366" author="jmikola@gmail.com" created="Thu, 3 Mar 2022 20:45:11 +0000"  >&lt;p&gt;PR: &lt;a href=&quot;https://github.com/mongodb/libmongocrypt/pull/256&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/pull/256&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sharing some context from Slack:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;On Windows it now also requires &lt;tt&gt;WIN32_LEAN_AND_MEAN&lt;/tt&gt; to be defined for each source as well. That will fix the majority of the errors in the linked build failure. The error with &lt;tt&gt;PINIT_ONCE_FN&lt;/tt&gt; only emerges on 32-bit builds, so it wasn&apos;t caught before merging.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The PR above will address the &lt;tt&gt;PINIT_ONCE_FN&lt;/tt&gt; issue, and PHPC can sort out the other errors by defining &lt;tt&gt;WIN32_LEAN_AND_MEAN&lt;/tt&gt; during compilation of bundled libmongocrypt sources.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1994298">MONGOCRYPT-391</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1964246">PHPC-2031</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|i04y3g:</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>