-
Notifications
You must be signed in to change notification settings - Fork 691
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
Foreign Libraries not building on Darwin A64 #8227
Comments
IIRC, this is a (certain version of) GHC limitation. Could you kindly confirm? E.g., does it work with GHC 9.4 alpha taken from |
I'm afraid it still doesn't work:
|
You are right, this needs both a new GHC and cabal, see #7764. |
I'll test tomorrow! Im guessing it will be included in next release? |
Yes, given that it's in the pre-release, the one you can get from ghcup. Take care! |
Ah! Checked now. Not working with ghc 9.4 and cabal 3.8.0.20220526. But if you are sure the fix will appear, shall I close? |
The #7764 fix is included in the 3.8.0.20220526 pre-release. If that doesn't work for you, then your problem must be different. Can you summarise how your commandline and/or OS/arch/versions are is different from #7763 which all seem to be fixed? BTW, you can try GHC 9.2.3 just in case something got broken anew in GHC 9.4 alpha? BTW2, are you sure you are using cabal 3.8.0.20220526, if you have several installed? What does |
Doesn't work on 9.2.3
Everything is the same as #7837, I'm just not sure it was fixed. My guess is that cabal doesn't actually work out that it's still Mac os. The message says 'OSX', which predates Mac OS which predates apple silicon. I've grepped the code base, and this message comes up at The code is:
Unless I don't know how to use git blame, it looks as though this was the very code added 7 years ago, long before apple silicon. So what I'll do is get it to ignore the architecture of Mac OS and see if it works. Hopefully it works identically to the X86_64. |
It takes a looong time to build cabal, that's for sure! I got it fixed, I'm glad to say! I'm building the change in my own fork with the intent of making a pull request. If anyone knows anything about backports, that knowledge would be useful! |
- Allowed building Foreign Libraries for all architecture on apple silicon - Updated error message to name Mac OS instead of OSX as supported platform
Yay! I willy backport to branch 3.8 so that it's included in cabal 3.8. |
Apple Silicon Foreign Library Support (#8227)
- Allowed building Foreign Libraries for all architecture on apple silicon - Updated error message to name Mac OS instead of OSX as supported platform (cherry picked from commit 99f928e)
Oh, yes, I think it's an oversight. Thanks a lot @yobson! |
The Bug
When trying to compile a project that produces a foreign library on an M1 MacBook Pro, you get the error:
To Reproduce
Steps to reproduce the behavior:
Create an empty foreign library project, then simply run:
Expected behavior
A lovely dylib to be produced!
System information
The text was updated successfully, but these errors were encountered: