<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:17:05 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>[CDRIVER-3082] Build error on MSYS2</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3082</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;I&apos;m following the instructions on&#160;&lt;a href=&quot;http://mongoc.org/libmongoc/current/installing.html#building-on-windows-with-mingw-w64-and-msys2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/installing.html#building-on-windows-with-mingw-w64-and-msys2&lt;/a&gt;&#160; .&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;First, I had to use a single dot `.` at the end of the command, as the docs instruct to untar and enter the source code directory.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;$ CC=/mingw64/bin/gcc.exe /mingw64/bin/cmake -G &quot;MSYS Makefiles&quot; -DCMAKE_INSTALL_PREFIX=&quot;D:/install&quot; .&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The cmake build starts, but than it fails with these messages:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;fnoro@N-00933732 MINGW64 /d/src/mongo-c-driver&lt;br/&gt;
$ make&lt;br/&gt;
Scanning dependencies of target bson_shared&lt;br/&gt;
[ 0%] Building C object src/libbson/CMakeFiles/bson_shared.dir/src/bson/bcon.c.obj&lt;br/&gt;
In file included from D:/src/mongo-c-driver/src/libbson/src/bson/bson.h:23,&lt;br/&gt;
 from D:/src/mongo-c-driver/src/libbson/src/bson/bcon.h:26,&lt;br/&gt;
 from D:/src/mongo-c-driver/src/libbson/src/bson/bcon.c:24:&lt;br/&gt;
D:/src/mongo-c-driver/src/libbson/src/bson/bson-compat.h:27:2: error: #error &quot;__USE_MINGW_ANSI_STDIO &amp;gt; 0 is required for correct PRI* macros&quot;&lt;br/&gt;
 #error &quot;__USE_MINGW_ANSI_STDIO &amp;gt; 0 is required for correct PRI* macros&quot;&lt;br/&gt;
 ^~~~~&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;: *** &lt;span class=&quot;error&quot;&gt;&amp;#91;src/libbson/CMakeFiles/bson_shared.dir/build.make:63: src/libbson/CMakeFiles/bson_shared.dir/src/bson/bcon.c.obj&amp;#93;&lt;/span&gt; Error 1&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: *** &lt;span class=&quot;error&quot;&gt;&amp;#91;CMakeFiles/Makefile2:219: src/libbson/CMakeFiles/bson_shared.dir/all&amp;#93;&lt;/span&gt; Error 2&lt;br/&gt;
make: *** &lt;span class=&quot;error&quot;&gt;&amp;#91;Makefile:152: all&amp;#93;&lt;/span&gt; Error 2&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;</description>
                <environment>MSYS2, Windows 10</environment>
        <key id="737760">CDRIVER-3082</key>
            <summary>Build error on MSYS2</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="13201">Fixed</resolution>
                                        <assignee username="kevin.albertson@mongodb.com">Kevin Albertson</assignee>
                                    <reporter username="felipenoris">Felipe Noronha Tavares</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Apr 2019 21:37:46 +0000</created>
                <updated>Sat, 28 Oct 2023 11:29:19 +0000</updated>
                            <resolved>Wed, 22 May 2019 00:41:47 +0000</resolved>
                                    <version>1.14.0</version>
                                    <fixVersion>1.15.0</fixVersion>
                                    <component>docs</component>
                    <component>libbson</component>
                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2255261" author="kevin.albertson" created="Wed, 22 May 2019 00:41:47 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=felipenoris&quot; class=&quot;user-hover&quot; rel=&quot;felipenoris&quot;&gt;felipenoris&lt;/a&gt;, the documentation for building on MSYS2 has been updated after reproducing and verifying that the new steps work. Please feel free to re-open if this does not resolve the issue for you.&lt;/p&gt;</comment>
                            <comment id="2255258" author="xgen-internal-githook" created="Wed, 22 May 2019 00:40:18 +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/CDRIVER-3082&quot; title=&quot;Build error on MSYS2&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3082&quot;&gt;&lt;del&gt;CDRIVER-3082&lt;/del&gt;&lt;/a&gt; fix install docs for msys2&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/3a806bba4e703138aefa51db31c9e71035d439a0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/3a806bba4e703138aefa51db31c9e71035d439a0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2252941" author="kevin.albertson" created="Mon, 20 May 2019 17:05:27 +0000"  >&lt;p&gt;I&apos;ve reproduced and confirmed that defining the additional C flag fixes this issue.&lt;/p&gt;</comment>
                            <comment id="2252527" author="kevin.albertson" created="Mon, 20 May 2019 14:22:28 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=felipenoris&quot; class=&quot;user-hover&quot; rel=&quot;felipenoris&quot;&gt;felipenoris&lt;/a&gt;! Apologies for the late reply. And... I misread, the macro has two underscores. Try again 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;-DCMAKE_C_FLAGS=&quot;-D__USE_MINGW_ANSI_STDIO=1&quot; &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 will attempt to reproduce and update our documentation accordingly. Sorry for the confusion.&lt;/p&gt;</comment>
                            <comment id="2221994" author="felipenoris" created="Tue, 23 Apr 2019 16:02:30 +0000"  >&lt;p&gt;Thanks for helping!&lt;/p&gt;

&lt;p&gt;Defining -DCMAKE_C_FLAGS=&quot;-D_USE_MINGW_ANSI_STDIO=1&quot; has no effect on the outcome.&lt;/p&gt;

&lt;p&gt;The verbose build output is this below.&lt;/p&gt;

&lt;p&gt;```&lt;br/&gt;
$ make&lt;br/&gt;
/D/local/msys2/mingw64/bin/cmake.exe -S/D/local/src/mongo-c-driver-1.14.0 -B/D/local/src/mongo-c-driver-1.14.0 --check-build-system CMakeFiles/Makefile.cmake 0&lt;br/&gt;
/D/local/msys2/mingw64/bin/cmake.exe -E cmake_progress_start /D/local/src/mongo-c-driver-1.14.0/CMakeFiles /D/local/src/mongo-c-driver-1.14.0/CMakeFiles/progress.marks&lt;br/&gt;
make -f CMakeFiles/Makefile2 all&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: Entering directory &apos;/d/local/src/mongo-c-driver-1.14.0&apos;&lt;br/&gt;
make -f src/libbson/CMakeFiles/bson_shared.dir/build.make src/libbson/CMakeFiles/bson_shared.dir/depend&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;: Entering directory &apos;/d/local/src/mongo-c-driver-1.14.0&apos;&lt;br/&gt;
/D/local/msys2/mingw64/bin/cmake.exe -E cmake_depends &quot;MSYS Makefiles&quot; /D/local/src/mongo-c-driver-1.14.0 /D/local/src/mongo-c-driver-1.14.0/src/libbson /D/local/src/mongo-c-driver-1.14.0 /D/local/src/mongo-c-driver-1.14.0/src/libbson /D/local/src/mongo-c-driver-1.14.0/src/libbson/CMakeFiles/bson_shared.dir/DependInfo.cmake --color=&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;: Leaving directory &apos;/d/local/src/mongo-c-driver-1.14.0&apos;&lt;br/&gt;
make -f src/libbson/CMakeFiles/bson_shared.dir/build.make src/libbson/CMakeFiles/bson_shared.dir/build&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;: Entering directory &apos;/d/local/src/mongo-c-driver-1.14.0&apos;&lt;br/&gt;
[  0%] Building C object src/libbson/CMakeFiles/bson_shared.dir/src/bson/bcon.c.obj&lt;br/&gt;
cd /D/local/src/mongo-c-driver-1.14.0/src/libbson &amp;amp;&amp;amp; /D/local/msys2/mingw64/bin/gcc.exe -DBSON_COMPILATION -DJSONSL_PARSE_NAN -Dbson_shared_EXPORTS -I/D/local/src/mongo-c-driver-1.14.0/src/libbson/src -I/D/local/src/mongo-c-driver-1.14.0/src/libbson/../../src/common  -D_USE_MINGW_ANSI_STDIO=1 -O2 -g -DNDEBUG   -o CMakeFiles/bson_shared.dir/src/bson/bcon.c.obj   -c /D/local/src/mongo-c-driver-1.14.0/src/libbson/src/bson/bcon.c&lt;br/&gt;
In file included from D:/local/src/mongo-c-driver-1.14.0/src/libbson/src/bson/bson.h:23,&lt;br/&gt;
                 from D:/local/src/mongo-c-driver-1.14.0/src/libbson/src/bson/bcon.h:26,&lt;br/&gt;
                 from D:/local/src/mongo-c-driver-1.14.0/src/libbson/src/bson/bcon.c:24:&lt;br/&gt;
D:/local/src/mongo-c-driver-1.14.0/src/libbson/src/bson/bson-compat.h:27:2: error: #error &quot;__USE_MINGW_ANSI_STDIO &amp;gt; 0 is required for correct PRI* macros&quot;&lt;br/&gt;
 #error &quot;__USE_MINGW_ANSI_STDIO &amp;gt; 0 is required for correct PRI* macros&quot;&lt;br/&gt;
  ^~~~~&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;: *** &lt;span class=&quot;error&quot;&gt;&amp;#91;src/libbson/CMakeFiles/bson_shared.dir/build.make:66: src/libbson/CMakeFiles/bson_shared.dir/src/bson/bcon.c.obj&amp;#93;&lt;/span&gt; Error 1&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;: Leaving directory &apos;/d/local/src/mongo-c-driver-1.14.0&apos;&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: *** &lt;span class=&quot;error&quot;&gt;&amp;#91;CMakeFiles/Makefile2:222: src/libbson/CMakeFiles/bson_shared.dir/all&amp;#93;&lt;/span&gt; Error 2&lt;br/&gt;
make&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: Leaving directory &apos;/d/local/src/mongo-c-driver-1.14.0&apos;&lt;br/&gt;
make: *** &lt;span class=&quot;error&quot;&gt;&amp;#91;Makefile:155: all&amp;#93;&lt;/span&gt; Error 2&lt;br/&gt;
```&lt;/p&gt;</comment>
                            <comment id="2214185" author="kevin.albertson" created="Mon, 15 Apr 2019 20:03:10 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=felipenoris&quot; class=&quot;user-hover&quot; rel=&quot;felipenoris&quot;&gt;felipenoris&lt;/a&gt;. Thank you for the report. I have not yet had a chance to attempt to reproduce, but that error is triggered by &lt;tt&gt;_USE_MINGW_ANSI_STDIO&lt;/tt&gt; being defined as 0. This define controls compatibility of &lt;a href=&quot;https://sourceforge.net/p/mingw-w64/bugs/377/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;printf formats&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure where it would be defined, but perhaps try defining it yourself in the cmake config:&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;CC=/mingw64/bin/gcc.exe /mingw64/bin/cmake -G &quot;MSYS Makefiles&quot; -DCMAKE_INSTALL_PREFIX=&quot;D:/install&quot; -DCMAKE_C_FLAGS=&quot;-D_USE_MINGW_ANSI_STDIO=1&quot; .&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;If that does not solve the issue, can you try running cmake with verbosity turned on and copying the output of &lt;tt&gt;make&lt;/tt&gt; here? (-DCMAKE_VERBOSE_MAKEFILE=ON):&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;CC=/mingw64/bin/gcc.exe /mingw64/bin/cmake -G &quot;MSYS Makefiles&quot; -DCMAKE_INSTALL_PREFIX=&quot;D:/install&quot; -DCMAKE_VERBOSE_MAKEFILE=ON .&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;That should give more information, and might indicate where it&apos;s getting defined. &lt;/p&gt;</comment>
                            <comment id="2212045" author="felipenoris" created="Fri, 12 Apr 2019 21:41:04 +0000"  >&lt;p&gt;As additional information,&#160;this is the output of the first command, just before typing `make`.&lt;br/&gt;
&#160;&lt;br/&gt;
```&lt;br/&gt;
$ CC=/mingw64/bin/gcc.exe /mingw64/bin/cmake -G &quot;MSYS Makefiles&quot; -DCMAKE_INSTALL_PREFIX=&quot;D:/install&quot; .&lt;br/&gt;
&amp;#8211; No CMAKE_BUILD_TYPE selected, defaulting to RelWithDebInfo&lt;br/&gt;
file VERSION_CURRENT contained BUILD_VERSION 0.0.0&lt;br/&gt;
  &amp;#8211; Using bundled libbson&lt;br/&gt;
libbson version (from VERSION_CURRENT file): 0.0.0&lt;br/&gt;
&amp;#8211;     struct timespec found&lt;br/&gt;
libmongoc version (from VERSION_CURRENT file): 0.0.0&lt;br/&gt;
&amp;#8211; Searching for zlib CMake packages&lt;br/&gt;
&amp;#8211;   zlib found version &quot;1.2.11&quot;&lt;br/&gt;
&amp;#8211;   zlib include path &quot;D:/local/msys2/mingw64/include&quot;&lt;br/&gt;
&amp;#8211;   zlib libraries &quot;D:/local/msys2/mingw64/lib/libz.dll.a&quot;&lt;br/&gt;
&amp;#8211; Searching for compression library header snappy-c.h&lt;br/&gt;
&amp;#8211;   Not found (specify -DCMAKE_INCLUDE_PATH=/path/to/snappy/include for Snappy compression)&lt;br/&gt;
&amp;#8211; No ICU library found, SASLPrep disabled for SCRAM-SHA-256 authentication.&lt;br/&gt;
&amp;#8211; If ICU is installed in a non-standard directory, define ICU_ROOT as the ICU installation path.&lt;br/&gt;
&amp;#8211; Compiling against Secure Channel&lt;br/&gt;
&amp;#8211; Compiling against Windows SSPI&lt;br/&gt;
&amp;#8211; Configuring done&lt;br/&gt;
&amp;#8211; Generating done&lt;br/&gt;
&amp;#8211; Build files have been written to: D:/src/mongo-c-driver&lt;br/&gt;
```&lt;br/&gt;
&#160;&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|hujv0n:</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>