Skip to content

Cant compile HLS from source to get around GHC ABI mismatch #3849

@tomhepworth

Description

@tomhepworth

Your environment

RHEL 8
Installed everything with ghcup, on recommended versions of everything

Which OS do you use?
RHEL 8

Which LSP client (editor/plugin) do you use?
NVIM LSP

Which version of HLS do you use and how did you install it?
2.4.0.0

What's wrong?

After installing all the haskell tools with ghcup I still get the "GHC ABIs don't match!" error. I have seen from the touble-shooting page that the workaround involves compiling hls from source.

So I run:

 ghcup compile hls --version 1.7.0.0 --ghc 9.4.7 

as per the instructions

Which fails with the message

[ Error ] [GHCup-08841] BuildFailed failed in dir /home/.../ghcup-f3d291a7b96c187c/haskell-language-server-1.7.0.0: Process "cabal" with arguments ["v2-install",
[ ...   ]                                                                                                                                                                "-w",
[ ...   ]                                                                                                                                                                "ghc-9.4.7",
[ ...   ]                                                                                                                                                                "--install-method=copy",
[ ...   ]                                                                                                                                                                "--overwrite-policy=always",
[ ...   ]                                                                                                                                                                "--disable-profiling",
[ ...   ]                                                                                                                                                                "--disable-tests",
[ ...   ]                                                                                                                                                                "--installdir=/home/codasip.com/thomas.hepworth/.ghcup/tmp/ghcup-f3d291a7b96c187c/haskell-language-server-1.7.0.0/out/9.4.7",
[ ...   ]                                                                                                                                                                "--project-file=cabal.project",
[ ...   ]                                                                                                                                                                "exe:haskell-language-server",
[ ...   ]                                                                                                                                                                "exe:haskell-language-server-wrapper"] failed with exit code 1.

Debug information

Versions:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.4.7

$ ghcup --version
The GHCup Haskell installer, version 0.1.19.4

$ cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library

$ stack --version
Version 2.11.1, Git revision c1167a6abc3f4978ccded5ba0246a57387da0e2f x86_64 hpack-0.35.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: supportUser support tickets, questions, help with setup etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions