-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer #1066
Comments
OpenAL Soft 1.24 relies on C++17. Even if those specific errors were fixed, various other structs rely on the over-alignment allocators being invoked when creating objects that have higher alignment needs. If they silently use the normal allocators without the necessary alignment, it can result in random crashes or other buggy behavior. I don't relish the idea of adding back the custom malloc functions and sprinkling in custom alignment new/delete methods, when it's been part of the standard for over 7 years. You can try using a newer compiler and static-linking the C++ runtime to avoid relying on the system having a newer libc++, but C++17 is needed for compiling. |
@kcat This issue is probably unrelated to C++ standard. |
@ryandesign FWIW, there is no error on 10.6 with gcc. So this looks like Apple libc++ bug. |
The issue is as the error says:
macOS 10.12 was released on September 20, 2016, while macOS 10.13 was released on September 25, 2017, so it'd make sense that 10.13 may be needed for more complete C++17 support. |
@kcat The error text is actually misleading, since here C++ runtime matters and not the macOS version. (I assumed initially that the code may use |
Is there a way for users to upgrade the C++ runtime on their system (and developers to upgrade the compiler/system SDK) to a more modern version, without updating macOS to 10.13? I assume 10.12 has a compiler and C++ runtime that doesn't support it, while 10.13 does. If there's no way to upgrade the C++ runtime to a sufficiently compatible version, then the runtime and macOS versions are linked. |
@kcat Yes, of course, there is nothing preventing someone from using a modern C++ runtime. As I notice above, everything works fine on my 10.6 (from 2008), which uses a modern |
openal-soft 1.24.0 doesn't build on macOS 10.12:
Full build log: https://build.macports.org/builders/ports-10.12_x86_64-builder/builds/291362/steps/install-port/logs/stdio
It builds on macOS 12 and later.
This is a regression; 1.23.1 didn't have this problem.
The text was updated successfully, but these errors were encountered: