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

Haskell toolchain libraries (e.g. base) cannot be found on darwin_arm64 with GHC 9.2 #1809

Closed
fwcd opened this issue Aug 21, 2022 · 3 comments · Fixed by #1825
Closed

Haskell toolchain libraries (e.g. base) cannot be found on darwin_arm64 with GHC 9.2 #1809

fwcd opened this issue Aug 21, 2022 · 3 comments · Fixed by #1825

Comments

@fwcd
Copy link
Contributor

fwcd commented Aug 21, 2022

Describe the bug
When using GHC 9.2 on arm64 macOS (M1), after applying the fix from #1808, building the tutorial still errors with:

Error in fail: 
base is not a toolchain library.
Check that it ships with your version of GHC.
The following toolchain libraries are available:
{}

To Reproduce
Apply #1808 and update the GHC version in tutorial/WORKSPACE:23:

- rules_haskell_toolchains(version = "8.10.7")
+ rules_haskell_toolchains(version = "9.2.1")

Then run bazel build //.. in tutorial.

Expected behavior
A clear and concise description of what you expected to happen.

Environment

  • OS name + version: macOS 12.5.1 on arm64
  • Bazel version: 5.2.0
  • Version of the rules: 5b3eb69

Additional context
From what I can tell the issue is that the location of toolchain libraries (e.g. base) moved from

<ghc install root>/lib/ghc-8.10.7/base-4.14.3.0

in GHC 8.10 to

<ghc install root>/lib/ghc-9.2.1/lib/aarch64-osx-ghc-9.2.1/base-4.16.0.0

in GHC 9.2. (notice the additional aarch64-osx-ghc-9.2.1 directory)

@avdv
Copy link
Member

avdv commented Oct 31, 2022

Could you try GHC 9.2.3 instead? This does not seem to have the extra aarch64-osx-ghc-9.2.* directory. Scratch that, I did not look close enough.

avdv added a commit that referenced this issue Nov 3, 2022
... according to the os and architecture.

This way it should just work for future GHC versions, if the packaging scheme is not changed upstream.

It is still possible to override these settings if need be.

Fixes #1809
avdv added a commit that referenced this issue Nov 3, 2022
... according to the os and architecture.

This way it should just work for future GHC versions, if the packaging scheme is not changed upstream.

It is still possible to override these settings if need be.

Fixes #1809
@avdv
Copy link
Member

avdv commented Nov 3, 2022

Could you please try PR #1825 and see if it fixes this problem for you?

avdv added a commit that referenced this issue Nov 3, 2022
... according to the os and architecture.

This way it should just work for future GHC versions, if the packaging scheme is not changed upstream.

It is still possible to override these settings if need be.

Fixes #1809
@tsiq-aaronh
Copy link

It got past that step! Thanks! We're hitting an issue where llvm needs to be installed... but that's a separate issue. Feel free to close this one.

avdv added a commit that referenced this issue Nov 17, 2022
... according to the os and architecture.

This way it should just work for future GHC versions, if the packaging scheme is not changed upstream.

It is still possible to override these settings if need be.

Fixes #1809
@mergify mergify bot closed this as completed in #1825 Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants