<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:21:24 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-4609] implicit declaration of function &apos;aligned_alloc&apos;</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-4609</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&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;src/libbson/src/bson/bson-memory.c:38:11: error: implicit declaration of function &apos;aligned_alloc&apos; is invalid in C99 [-Werror,-Wimplicit-function-declaration]&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;&#160; &#160;return aligned_alloc (alignment, num_bytes);&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;&#160; &#160; &#160; &#160; &#160; ^&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;src/libbson/src/bson/bson-memory.c:38:11: error: incompatible integer to pointer conversion returning &apos;int&apos; from a function with result type &apos;void *&apos; [-Werror,-Wint-conversion]&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;&#160; &#160;return aligned_alloc (alignment, num_bytes);&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;&#160; &#160; &#160; &#160; &#160; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&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;2 errors generated.&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;Environment&lt;/p&gt;

&lt;p&gt;mongo-c-driver 1.23.3&lt;/p&gt;

&lt;p&gt;macOS 10.14.x x86_64&lt;/p&gt;

&lt;p&gt;Apple LLVM version 10.0.1 (clang-1001.0.46.4)&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;Build mongo-c-driver on macOS 10.14.x with clang from Xcode 10.3&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;It builds fine with macOS 10.15.x and Xcode 11.7 and later macOS/Xcode combinations, but not on macOS 10.14.x and Xcode 10.3 and earlier macOS/Xcode combinations.&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2310213">CDRIVER-4609</key>
            <summary>implicit declaration of function &apos;aligned_alloc&apos;</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="ezra.chung@mongodb.com">Ezra Chung</assignee>
                                    <reporter username="ryandesign">Ryan Schmidt</reporter>
                        <labels>
                    </labels>
                <created>Sun, 9 Apr 2023 04:37:21 +0000</created>
                <updated>Fri, 27 Oct 2023 13:14:05 +0000</updated>
                            <resolved>Tue, 11 Apr 2023 14:18:10 +0000</resolved>
                                    <version>1.23.3</version>
                                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5338113" author="JIRAUSER1261413" created="Tue, 11 Apr 2023 14:17:53 +0000"  >&lt;p&gt;Hello, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ryandesign&quot; class=&quot;user-hover&quot; rel=&quot;ryandesign&quot;&gt;ryandesign&lt;/a&gt;. Thank you for submitting this report.&lt;/p&gt;

&lt;p&gt;We are planning to drop support for MacOS 10.14 as documented in &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4580&quot; title=&quot;Document dropping support of macOS 10.14 &amp;amp; 10.15&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4580&quot;&gt;&lt;del&gt;CDRIVER-4580&lt;/del&gt;&lt;/a&gt; (edit: corrected). Given this issue is exclusive to 10.14 and older, we will elect to close this ticket to avoid introducing workarounds for (to be) unsupported platforms.&lt;/p&gt;

&lt;p&gt;That being said, in addition to the patch you have already applied, you also may want to consider exploring the solutions documented in Homebrew &lt;a href=&quot;https://github.com/Homebrew/homebrew-core/pull/45585#issuecomment-554513855&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;PR #45585&lt;/a&gt; (referenced by &lt;a href=&quot;https://github.com/Homebrew/homebrew-core/issues/46393&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Issue #46393&lt;/a&gt;) to see if it is applicable to your situation:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;We&apos;ve discovered that the 11.0 CLT (11.1 CLT does not exist), which the CI uses, shipped with the wrong system headers in the 10.14 SDK: &lt;a href=&quot;https://github.com/Homebrew/homebrew-core/issues/46466#issuecomment-554511104&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;#46466 (comment)&lt;/a&gt;. The problem has been fixed in 11.2. Apparently a lot of people don&apos;t have the 11.0 CLT because Apple also botched up the update process, henced why this fix worked locally for some - they weren&apos;t using the broken CLT.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="5334150" author="ryandesign" created="Sun, 9 Apr 2023 05:55:32 +0000"  >&lt;p&gt;Rather than building up ever more complex &lt;tt&gt;ifdef&lt;/tt&gt;s, you may prefer to detect the availability of &lt;tt&gt;aligned_alloc&lt;/tt&gt; in your cmake script.&lt;/p&gt;</comment>
                            <comment id="5334144" author="ryandesign" created="Sun, 9 Apr 2023 05:31:17 +0000"  >&lt;p&gt;The compiler version doesn&apos;t seem to be relevant. I still see this problem when using a newer compiler on an older OS. It seems that the version of libc++ included in macOS 10.14.x and earlier doesn&apos;t have &lt;tt&gt;aligned_alloc&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;You already have alternative implementations that you use on other systems (such as on Windows, according to &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4550&quot; title=&quot;Do not use aligned_alloc() on Windows&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4550&quot;&gt;&lt;del&gt;CDRIVER-4550&lt;/del&gt;&lt;/a&gt;) so it should be possible to do the same for older macOS versions.&lt;/p&gt;

&lt;p&gt;This patch works for me and allows it to build on Mac OS X 10.6 and later (I didn&apos;t test earlier versions): &lt;a href=&quot;https://github.com/macports/macports-ports/blob/558d2ca208365d40cfc9b3b36d1dd9c175fb9a7b/devel/mongo-c-driver/files/aligned_alloc.patch&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/macports/macports-ports/blob/558d2ca208365d40cfc9b3b36d1dd9c175fb9a7b/devel/mongo-c-driver/files/aligned_alloc.patch&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2264817">CDRIVER-4580</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="441900" name="log.txt" size="92880" author="ryandesign" created="Sun, 9 Apr 2023 04:37:11 +0000"/>
                    </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|hr6i7r:f0whyi</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>