-
Notifications
You must be signed in to change notification settings - Fork 479
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
Compilation fails on macOS #200
Comments
It appears this is an issue when building for I've only tested compiling for Apple Silicon currently, I'll verify that this works in a Universal 2 binary and then I'll make a pull request. |
Thank you! A new architecture, this is exciting :)
…On Sat, 2 Jan 2021, 18:27 Phil, ***@***.***> wrote:
It appears this is an issue when building for arm64 for M1 chips. In
backward.hpp, with the population of the error address (if-else chain
beginning on line 4153), __aarch64__
<https://github.com/bombela/backward-cpp/blob/27a89004a86fe2a665f041c198c7fbab7489e278/backward.hpp#L4159>
is defined since an ARM chip is being compiled. However, the error address
is not uctx->uc_mcontext.pc for macOS. It is instead
uctx->uc_mcontext->__ss.__pc. Adding a conditional for __APPLE__ and
using uctx->uc_mcontext->__ss.__pc fixes the issue.
I've only tested compiling for Apple Silicon currently, I'll verify that
this works in a Universal 2 binary and then I'll make a pull request.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#200 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUZDGWDPWPTOMNVOOJCRLSX7IZRANCNFSM4VROVSAA>
.
|
When attempting to add Backward to my C++ project on macOS, compilation fails with this error:
I'm able to reproduce this with a simple "Hello World" project. I'm unsure if this is caused by compiling on Big Sur or an issue compiling for the M1 chip (I'm running a 2020 Mac mini). I haven't dived too deep into this but wanted to report an issue to see if anybody has run into the same problem or knows of a solution. I pulled the latest from
master
.The text was updated successfully, but these errors were encountered: