-
Notifications
You must be signed in to change notification settings - Fork 172
Linking on Apple M1 Max #1356
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
Comments
I did a stack build and stack install hoping this would build a native ARM binary, but I still am seeing the link error. |
Typing (target-arch) in the repl shows this:
|
I was able to install the x86_64 libraries and use Rosetta2 emulation to build. I wasn't able to figure out how to get stack to build a arm version of carp. That may be a much more complex issue. |
Do you use pkg-config? If you do the following in your project you can see the complete shell command that carp uses to compile your code:
What does it say? (when you build) |
Responding to this incredibly late but last time I checked Stack still does not support ARM sadly... |
Can confirm this works now, GLFW example compiles and runs MBP M1, macOS 12.6.1
The flag is needed due to this issue https://gitlab.haskell.org/ghc/ghc/-/issues/20592 |
@roman01la Great information, thanks! |
When attempting to build the example file reptile.carp, I get the following error:
ld: warning: ignoring file /usr/local/lib/libSDL2.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
This makes sense, as I have built SDL2 for arm64.
Is there a way to tell carp to build and link for macOS-arm64?
The text was updated successfully, but these errors were encountered: