Opened 3 years ago
Closed 3 years ago
#64836 closed defect (fixed)
ghc build error on arm: 'ffitarget_arm64.h' file not found
Reported by: | essandess (Steve Smith) | Owned by: | essandess (Steve Smith) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | ghc |
Description
sudo port install ghc
:info:build /opt/local/var/macports/build/_opt_local_ports_lang_ghc/ghc/work/bootstrap/lib/ghc-9.2.1/lib/../lib/aarch64-osx-ghc-9.2.1/rts-1.0.2/include/ffitarget.h:6:10: error: :info:build fatal error: 'ffitarget_arm64.h' file not found :info:build | :info:build 6 | #include "ffitarget_arm64.h" :info:build | ^ :info:build #include "ffitarget_arm64.h" :info:build ^~~~~~~~~~~~~~~~~~~ :info:build 1 error generated. :info:build `clang' failed in phase `C Compiler'. (Exit code: 1)
The file ffitarget_arm64.h
exists in both Xcode and CLT:
$ locate ffitarget_arm64.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi/ffitarget_arm64.h /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/ffi/ffitarget_arm64.h /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/ffi/ffitarget_arm64.h /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/ffi/ffitarget_arm64.h
Does anyone know how to tell MacPorts to find this file on arm? (Log attached.)
Attachments (1)
Change History (6)
Changed 3 years ago by essandess (Steve Smith)
Attachment: | main.log.gz added |
---|
comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Add -I${configure.sdkroot}/usr/include/ffi
to CPPFLAGS?
comment:2 Changed 3 years ago by essandess (Steve Smith)
Thanks, I tried both of these without success:
configure.cppflags-append \ -I${configure.sdkroot}/usr/include/ffi
build.env-append "C_INCLUDE_PATH=${configure.sdkroot}/usr/include/ffi"
comment:3 Changed 3 years ago by essandess (Steve Smith)
comment:4 Changed 3 years ago by jmroot (Joshua Root)
It looks like ghc includes its own copy of libffi, which doesn't include the right files to work on arm64. Either that needs to be fixed, or an external libffi needs to be used. Mixing and matching files from different versions won't end well.
comment:5 Changed 3 years ago by essandess (Steve Smith)
Owner: | set to essandess |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
ghc main.log.gz