[CDRIVER-4609] implicit declaration of function 'aligned_alloc' Created: 09/Apr/23 Updated: 27/Oct/23 Resolved: 11/Apr/23 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | BSON |
| Affects Version/s: | 1.23.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Ryan Schmidt | Assignee: | Ezra Chung |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
| Comments |
| Comment by Ezra Chung [ 11/Apr/23 ] |
|
Hello, ryandesign. Thank you for submitting this report. We are planning to drop support for MacOS 10.14 as documented in That being said, in addition to the patch you have already applied, you also may want to consider exploring the solutions documented in Homebrew PR #45585 (referenced by Issue #46393) to see if it is applicable to your situation:
|
| Comment by Ryan Schmidt [ 09/Apr/23 ] |
|
Rather than building up ever more complex ifdefs, you may prefer to detect the availability of aligned_alloc in your cmake script. |
| Comment by Ryan Schmidt [ 09/Apr/23 ] |
|
The compiler version doesn'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't have aligned_alloc. You already have alternative implementations that you use on other systems (such as on Windows, according to This patch works for me and allows it to build on Mac OS X 10.6 and later (I didn't test earlier versions): https://github.com/macports/macports-ports/blob/558d2ca208365d40cfc9b3b36d1dd9c175fb9a7b/devel/mongo-c-driver/files/aligned_alloc.patch |