-
Notifications
You must be signed in to change notification settings - Fork 55
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
_MR_atomic_sub_int symbol not found on macOS #110
Comments
I assume that you are using clang as the C compiler here. The problem is simply that there is not a definition of MR_atomic_sub_int for clang on Aarch64 based systems in the runtime; we will need to add one. |
Yes, I'm using clang. I added the bare minimum of <stdatomic.h> code to get the build to complete. It could be quite a lot of work, but there are some nice features that Mercury could make use of if you introduced a minimum required version of C11. |
Requiring the use of C11 is not an option in the short to medium term. MSVC only just gained some initial experimental support for C11/C17 style atomics (and I gather even that is not complete). It would make sense for us to starting C11 |
I logged PR #114 in an attempt to do this. Feel free to review ... |
The full error message is:
I installed Mercury from homebrew using
brew install mercury
. This is on an M1 Mac running the latest Ventura. A sequential "hello world" program compiles and runs no problem. And indeed, when I compile the Dining Philosophers sample code with either--parallel
or--grade hlc.par.gc
it compiles ok, but when I run it gives the above error message.The text was updated successfully, but these errors were encountered: