compile error on Mac wrt aligned allocation #728
Replies: 2 comments 1 reply
-
Hey, thanks for reporting. Yes, Quill does support macOS, I actually tested I suspect the alignment issue might be specific to Apple Silicon on macOS 12. If you happen to find a workaround, please let me know—I’d appreciate it It does work on Apple Silicon as well. Unfortunately, I’m currently using an M3 with macOS 14, so I can’t easily test macOS 12. There’s also a CI job for macOS 14 running on GitHub runners with Apple Silicon, and it’s been working fine on macOS 13 before too. You can check out the workflow here: As for the std::filesystem issue, I believe macOS SDK 10.15 didn’t have full support for it, which could explain the problems you're encountering. macOS 12 has also reached the end of life and no longer receives security updates, apple usually only supports the latest versions. Let me know how things go, and if I can help with anything else
|
Beta Was this translation helpful? Give feedback.
-
Hey If I change that minimum target to 10.14, clang balks again, but this time the alignment errors go away and use of the standard filesystem calls causes the error, e.g. error: 'path' is unavailable: introduced in macOS 10.15 I'll confirm it's ok to force a big jump in the OS minimum, but maybe will end up using that standard file system project I mentioned above (/gulrak/filesystem.git) for at least a few older OS versions. FWIW, I am using a later clang than the one in your output. Thanks for your help |
Beta Was this translation helpful? Give feedback.
-
Hi. I'm trying to integrate Quill into a Windows/Mac project. I did the initial integration on Windows and have it working. It's good.
When I pulled the work onto an M2 Mac, I get the following error:
quill/include/quill/core/UnboundedSPSCQueue.h:76:17: error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer
76 | : _producer(new Node(initial_bounded_queue_capacity, huge_pages_policy)), _consumer(_producer)
| ^
I reinstalled the latest Xcode CLI tools, I assume I'm using the latest clang. The docs indicated Mac support. There is a little chatter on other projects about a compiler flag, -faligned-allocation, but I haven't worked through that yet with Quill.
Any thoughts?
Thanks for
Matt
Update:
As above, the docs indicate Mac support, but does Quill support the platform? Maybe it is assumed because unix underpinnings? I made progress by targeting MacOS SDK 10.15 for deployment. But then I run into issues where the MacOS Clang doesn't have std::filesystem, which Quill relies on. I'm contemplating adding "https://github.com/gulrak/filesystem.git" to Quill (on Mac at least) to solve this
Beta Was this translation helpful? Give feedback.
All reactions