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

Help building for aarch64 #189

Closed
renesecur opened this issue Mar 17, 2022 · 5 comments
Closed

Help building for aarch64 #189

renesecur opened this issue Mar 17, 2022 · 5 comments
Labels
server Issues which regard the server waiting for author Stale issue, needs details from the author

Comments

@renesecur
Copy link

renesecur commented Mar 17, 2022

I'd like to build Ogmios for ARM64. I've come a long way, but seem to be stuck. This issue is an ask for help to see if we can get it working.

Please find a Dockerfile attached that I am using. Note that I've copied parts (GCH, Cabal and Libsodium) from the Dockerfile I have been using already to successfully build cardano-node. The tricky bit I think is with stack.

I've found commercialhaskell/stack#2103 (comment) this comment. It mentions that they are looking to add aarch64 build artifacts to their releases and I can see one for 2.7.1 which I am grabbing in my Dockerfile.

The part where it seems to be failing is with the actual stack command. I have no idea whether it is a compatibility between stack and cabal/GHC versions or that ogmios requires higher than 2.7.1 of stack.

This is the build error I'm currently running into:

image

Dockerfile.txt

Btw: git clone command here can be improved to use the https link as the git link requires authentication

@KtorZ
Copy link
Member

KtorZ commented Mar 17, 2022

@renesecur, a little disclaimer: I am very not versed in system architecture and this is really touching the edge of my expertise :/

My get-go approach here would be to look at Haskell.nix and the cross-compilation features from it. Regarding your approach however, note that there's no reason to use stack here; Ogmios does also support cabal builds; I do mostly use stack for development because I find it more developer-friendly, but the cabal builds are supported and maintained (since they're used as part of the current nix pipeline).

Thus, if you're already familiar with cabal and got something to work for cardano-node, I'd encourage you to continue in that direction?

@renesecur
Copy link
Author

renesecur commented Mar 17, 2022

Excellent. That was the golden tip. Got it building now at least. Next step is to test the binary actually does what it's supposed to.

Updated Dockerfile attached. Ran for 59 minutes on AWS CodeBuild with config

        Type: ARM_CONTAINER
        Image: "aws/codebuild/amazonlinux2-aarch64-standard:2.0"
        ComputeType: BUILD_GENERAL1_LARGE

Dockerfile.txt

@KtorZ
Copy link
Member

KtorZ commented Mar 18, 2022

@renesecur that's nice! Are you going to maintain this configuration somewhere versioned? Maybe we can link to it from the user guide?

@rene84
Copy link

rene84 commented Mar 18, 2022

Yes I will, but we have all our code in codeCommit at the moment. I'll move this one to github for ease of use

@KtorZ KtorZ added server Issues which regard the server waiting for author Stale issue, needs details from the author labels Mar 18, 2022
@KtorZ
Copy link
Member

KtorZ commented Apr 6, 2022

@renesecur May we close this one in the end 🤔 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Issues which regard the server waiting for author Stale issue, needs details from the author
Projects
None yet
Development

No branches or pull requests

3 participants