-
Notifications
You must be signed in to change notification settings - Fork 216
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
fixing the MacOS build #2586
fixing the MacOS build #2586
Conversation
Currently the macos build seems to be broken. I've been trying randomly poking around to fix it but I don't really know what I'm doing in this build system. #2586 Anyone has any ideas? The failure is around The error seems to be confusingly worded. The error message says that it found libsodium with arm64 architecture but it requires libsodium with x86 architecture. However, it is wrong that it should have looked for libsodium with x86 architecture, because the build is for It seems that macos-latest is configured to build arm64. However, I am also not able to change that into building x86. What I have tried so far:
|
The build fails immediately if the runner is set to The previous working version was |
I found this page:
So, we have a choice:
|
@winitzki Thank's for your efforts; I am trying to understand why this happens and here is what I have found so far: I suspect the reason is that GH changed the runners to arm64 only: actions/runner-images#9741 (comment) I also re-run an old GH action of this PR with debug logging enabled: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should pin the MacOS runner first in order to get working mac builds again, but #2587 should stay open and the subject should be adjusted. Thought?
.github/workflows/main.yml
Outdated
@@ -49,7 +49,7 @@ jobs: | |||
${{ matrix.os.runner }}- | |||
path: | | |||
${{ steps.setup-haskell-cabal.outputs.stack-root }} | |||
- name: Install libsodium | |||
- name: Install libsodium x86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Install libsodium x86_64 | |
- name: Install libsodium |
@winitzki It might be worth trying to use the latest haskell setup action -- Which is haskell-actions/setup@v2.7. The various "Downloading ..." debug messages (e.g. https://github.com/dhall-lang/dhall-haskell/actions/runs/9049961867/job/25621271094#step:3:465) in the GH Actions run linked previously originate from the haskell setup action: See https://github.com/haskell-actions/setup/blob/33585e1a16afa5875e124b0ebc89dd0c2f872c21/dist/index.js#L4523 in the definition and https://github.com/haskell-actions/setup/blob/33585e1a16afa5875e124b0ebc89dd0c2f872c21/src/installer.ts#L343 for the usage of the |
In my view, the root cause is that To resolve this issue, I propose the following path forward:
|
The Let me add a |
Let me know if this is OK to merge. This will unblock other builds. What needs to be done in order to publish both macos-x86 and macos-arm64 executables when a release is made? |
Indeed.
Would you mind adding that comment to the README?
👍
LGTM, merge it when you're done. If you include bigger changes, don't hesitate to ask for another review!
I'd proceed as follows:
|
@mmhat The current build with https://github.com/dhall-lang/dhall-haskell/actions/runs/9316129247/job/25643704112?pr=2586
So, it looks like macos-arm64 build is working and passing all tests. I don't think we need to say in the readme that it is unsupported. Should we? |
The goal of this PR is to fix any problems with the build of dhall-haskell.
Current issues:
saltine
afterstack build
.The error is in installing
libsodium
.This discussion https://stackoverflow.com/questions/72970363 suggests using the command:
arch -x86_64 /usr/local/bin/brew install libsodium