Linker error when building HLS on macOS
Summary
Our MacOS builds of HLS have started failing with the following error when building one of the test suites:
ld: B/BL out of range 181828760 (max +/-128MB) to '_newCAF'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ghc-9.6.5: `gcc' failed in phase `Linker'. (Exit code: 1)
This happens after bumping the cabal index-state, which means an unfortunately large difference in the versions of our dependencies.
See https://github.com/haskell/haskell-language-server/actions/runs/9480335667/job/26120781789?pr=4315 for an example run.
Steps to reproduce
I don't know if this will happen on an actual Mac, but:
- Check out the
mpj/try-bump-index-state
branch fromhaskell-language-server
cabal build hls-fourmolu-plugin-tests
Expected behavior
Not fail.
Environment
- GHC version used: 9.2-9.6 (9.10 unknown)
Optional:
- Operating System: MacOS
- System Architecture: