Skip to content
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

clock fails to build on aarch64 Darwin #70

Closed
vmchale opened this issue Oct 29, 2021 · 4 comments
Closed

clock fails to build on aarch64 Darwin #70

vmchale opened this issue Oct 29, 2021 · 4 comments

Comments

@vmchale
Copy link

vmchale commented Oct 29, 2021

In file included from /var/folders/t5/6d5ws1yj0g78plhhzy_03ybm0000gn/T/ghc19903_0/ghc_3.c:4:0: error:


In file included from /Users/vanessa/.ghcup/ghc/9.2.1/lib/ghc-9.2.1/lib/../lib/aarch64-osx-ghc-9.2.1/rts-1.0.2/include/ffi.h:66:0: error:


/Users/vanessa/.ghcup/ghc/9.2.1/lib/ghc-9.2.1/lib/../lib/aarch64-osx-ghc-9.2.1/rts-1.0.2/include/ffitarget.h:6:10: error:
     fatal error: 'ffitarget_arm64.h' file not found
  |
6 | #include "ffitarget_arm64.h"
  |          ^
#include "ffitarget_arm64.h"
         ^~~~~~~~~~~~~~~~~~~
1 error generated.
`gcc' failed in phase `C Compiler'. (Exit code: 1)
@vmchale vmchale closed this as completed Oct 29, 2021
@tfausak
Copy link

tfausak commented Oct 30, 2021

I also ran into this problem while trying to install clock-0.8.2 on an M1 Mac with GHC 9.2.1. How did you solve this problem?

@arafangion
Copy link

I've also had this same issue, I realise it might not be strictly related to 'clock', but what was the solution?

@arafangion
Copy link

Ah, found it. @tfausak, this appears to be https://gitlab.haskell.org/ghc/ghc/-/issues/20592 (Definitely not clock here!)

The fix mentioned in that ticket works for me.

@tfausak
Copy link

tfausak commented Dec 10, 2021

Thanks for connecting the dots there @arafangion! I can confirm that the solution proposed in this comment fixed the problem for me. To make that concrete, here's what was failing for me:

uname -a
# Darwin TayMini.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64

ghcup --version
# The GHCup Haskell installer, version v0.1.17.4

~/.ghcup/bin/ghc-9.2.1 --version
# The Glorious Glasgow Haskell Compilation System, version 9.2.1

~/.ghcup/bin/cabal-3.6.2.0 --version
# cabal-install version 3.6.2.0
# compiled using version 3.6.2.0 of the Cabal library

~/.ghcup/bin/cabal-3.6.2.0 build --with-compiler ~/.ghcup/bin/ghc-9.2.1

And doing this instead succeeded:

# note this is fish shell
env C_INCLUDE_PATH=(xcrun --show-sdk-path)/usr/include/ffi \
  ~/.ghcup/bin/cabal-3.6.2.0 build --with-compiler ~/.ghcup/bin/ghc-9.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants