-
Notifications
You must be signed in to change notification settings - Fork 237
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
aarch64-multiplatform-musl: llc' failed in phase LLVM Compiler'
#1652
Comments
llc' failed in phase
LLVM Compiler'llc' failed in phase LLVM Compiler'
Maybe you want to use GHC 9.2.4 if you want to compile for aarch64-linux. |
Well, I am not sure that the project and dependencies will compile with GHC 9+; Haven't tried though. How will that help? Was there any work being done regarding arm support since 9.2.4? |
There are PRs for getting stuff to work on 9.2.4. See IntersectMBO/cardano-node#4256 |
Thanks for the link. Though coming back to the original question, is there any reason to believe that 9.2.4 would work better for cross-compilation to arm64? |
I know 9.2.4 has better aarch64 support. Also, ARM support in GHC is not first class citizen yet, you need LLVM to build for example, where you don't need LLVM on AMD64. "LLVM Compiler" error here i see from your above output, do you have LLVM-12 in the build process? |
@reqlez what do you mean by "in the build process"? Is it too naive to think that haskell.nix's I have llvm installed on that system, the exact version I'd have to check. Though it's installed through homebrew, not Nix and both don't usually interoperate with one another so I wouldn't expect Nix to pick up any llvm installation already present on the system. |
Well, i don't know nix ... but i do know, that GHC NEEDS llvm under aarch64 to build, and does not need it under amd64. Our Ogmios FreeBSD port builds under aarch64 for example, but it pulls llvm-12 for the process. |
@reqlez note that I have no problem building natively on aarch64 (which indeed requires LLVM for a few Cardano tools); however, I was hoping to give a try to the cross-compilation framework from Haskell.nix to avoid having to build on aarch64 machines. |
Ah, I see! Well, cannot help with that, sorry! NIX is not my cup of tea. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi there,
I am trying to cross-compile and statically build my project from linux/amd64 to linux/arm64, with musl-lib and GHC-8.10.7. If that is even a thing. A bit by chance, I did found and try the
aarch64-multiplatform-musl
platform target frompkgsCross
which sounded like what I want (seedefault.nix
below).The build started and went through for a while -- seemed like I've been trying to rebuild GHC and eventually failed:
Why would this attempt to build GHC with musl -- and not only my project and its dependencies? What am I doing wrong / missing 🤔 ? Should I abandon all hope to cross-compile (w/ static linking) to aarch64?
default.nix
The text was updated successfully, but these errors were encountered: